Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ProjekatDizajniranje
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jelena Gogic
ProjekatDizajniranje
Commits
f1513a02
Commit
f1513a02
authored
Feb 14, 2022
by
Jelena Gogic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dodat projekat
parents
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1858 additions
and
0 deletions
+1858
-0
SloziSliku_56_2018/SloziSliku_56_2018.sln
+25
-0
SloziSliku_56_2018/SloziSliku_56_2018/App.config
+7
-0
SloziSliku_56_2018/SloziSliku_56_2018/ConnectionDb.cs
+33
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form1.Designer.cs
+332
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form1.cs
+467
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form1.resx
+121
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form2.Designer.cs
+109
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form2.cs
+48
-0
SloziSliku_56_2018/SloziSliku_56_2018/Form2.resx
+130
-0
SloziSliku_56_2018/SloziSliku_56_2018/IgDb.cs
+70
-0
SloziSliku_56_2018/SloziSliku_56_2018/Igrac.cs
+24
-0
SloziSliku_56_2018/SloziSliku_56_2018/Program.cs
+22
-0
SloziSliku_56_2018/SloziSliku_56_2018/Properties/AssemblyInfo.cs
+36
-0
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Resources.Designer.cs
+70
-0
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Resources.resx
+118
-0
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Settings.Designer.cs
+49
-0
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Settings.settings
+7
-0
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku.mdf
+0
-0
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_56_2018.csproj
+133
-0
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_56_2018.csproj.user
+14
-0
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_log.ldf
+0
-0
SloziSliku_56_2018/SloziSliku_56_2018/Stanje.cs
+43
-0
No files found.
SloziSliku_56_2018/SloziSliku_56_2018.sln
0 → 100644
View file @
f1513a02
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SloziSliku_56_2018", "SloziSliku_56_2018\SloziSliku_56_2018.csproj", "{B592434C-605D-4086-83EE-266AB18A716B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B592434C-605D-4086-83EE-266AB18A716B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B592434C-605D-4086-83EE-266AB18A716B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B592434C-605D-4086-83EE-266AB18A716B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B592434C-605D-4086-83EE-266AB18A716B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C9DC4CE6-F06C-4CAF-A4F7-C4E58D46D8E1}
EndGlobalSection
EndGlobal
SloziSliku_56_2018/SloziSliku_56_2018/App.config
0 → 100644
View file @
f1513a02
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.7.2"
/>
</
startup
>
</
configuration
>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/ConnectionDb.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Data.SqlClient
;
namespace
SloziSliku_56_2018
{
class
ConnectionDb
{
private
static
SqlConnection
instance
=
null
;
private
static
readonly
object
padlock
=
new
object
();
public
static
SqlConnection
Instance
{
get
{
if
(
instance
==
null
)
{
lock
(
padlock
)
{
if
(
instance
==
null
)
{
instance
=
new
SqlConnection
(
Properties
.
Settings
.
Default
.
connection
);
}
}
}
return
instance
;
}
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Form1.Designer.cs
0 → 100644
View file @
f1513a02
namespace
SloziSliku_56_2018
{
partial
class
Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
btn_ucitajSliku
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_novaIgra
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_odigraniPotezi
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
vrsta5
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
vrsta4
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
vrsta3
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
kolona5
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
kolona4
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
kolona3
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
btn_bojaLinija
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_Kraj
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lbl_nazivSlike
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_sacuvaj
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_otvori
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_unesiIme
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btn_prikaziRezultate
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_upisiIme
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// btn_ucitajSliku
//
this
.
btn_ucitajSliku
.
Location
=
new
System
.
Drawing
.
Point
(
938
,
26
);
this
.
btn_ucitajSliku
.
Name
=
"btn_ucitajSliku"
;
this
.
btn_ucitajSliku
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
28
);
this
.
btn_ucitajSliku
.
TabIndex
=
0
;
this
.
btn_ucitajSliku
.
Text
=
"Ucitaj sliku"
;
this
.
btn_ucitajSliku
.
UseVisualStyleBackColor
=
true
;
this
.
btn_ucitajSliku
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_ucitajSliku_Click
);
//
// btn_novaIgra
//
this
.
btn_novaIgra
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
88
);
this
.
btn_novaIgra
.
Name
=
"btn_novaIgra"
;
this
.
btn_novaIgra
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
28
);
this
.
btn_novaIgra
.
TabIndex
=
1
;
this
.
btn_novaIgra
.
Text
=
"Nova igra"
;
this
.
btn_novaIgra
.
UseVisualStyleBackColor
=
true
;
this
.
btn_novaIgra
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
936
,
132
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
Text
=
"Poteza:"
;
//
// lbl_odigraniPotezi
//
this
.
lbl_odigraniPotezi
.
AutoSize
=
true
;
this
.
lbl_odigraniPotezi
.
Location
=
new
System
.
Drawing
.
Point
(
998
,
132
);
this
.
lbl_odigraniPotezi
.
Name
=
"lbl_odigraniPotezi"
;
this
.
lbl_odigraniPotezi
.
Size
=
new
System
.
Drawing
.
Size
(
16
,
17
);
this
.
lbl_odigraniPotezi
.
TabIndex
=
3
;
this
.
lbl_odigraniPotezi
.
Text
=
"0"
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
vrsta5
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
vrsta4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
vrsta3
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
160
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
143
);
this
.
groupBox1
.
TabIndex
=
4
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"Broj vrsta:"
;
this
.
groupBox1
.
Enter
+=
new
System
.
EventHandler
(
this
.
groupBox1_Enter
);
//
// vrsta5
//
this
.
vrsta5
.
AutoSize
=
true
;
this
.
vrsta5
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
116
);
this
.
vrsta5
.
Name
=
"vrsta5"
;
this
.
vrsta5
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
vrsta5
.
TabIndex
=
2
;
this
.
vrsta5
.
TabStop
=
true
;
this
.
vrsta5
.
Text
=
"5"
;
this
.
vrsta5
.
UseVisualStyleBackColor
=
true
;
this
.
vrsta5
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
vrsta5_CheckedChanged
);
//
// vrsta4
//
this
.
vrsta4
.
AutoSize
=
true
;
this
.
vrsta4
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
77
);
this
.
vrsta4
.
Name
=
"vrsta4"
;
this
.
vrsta4
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
vrsta4
.
TabIndex
=
1
;
this
.
vrsta4
.
TabStop
=
true
;
this
.
vrsta4
.
Text
=
"4"
;
this
.
vrsta4
.
UseVisualStyleBackColor
=
true
;
this
.
vrsta4
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
vrsta4_CheckedChanged
);
//
// vrsta3
//
this
.
vrsta3
.
AutoSize
=
true
;
this
.
vrsta3
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
37
);
this
.
vrsta3
.
Name
=
"vrsta3"
;
this
.
vrsta3
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
vrsta3
.
TabIndex
=
0
;
this
.
vrsta3
.
TabStop
=
true
;
this
.
vrsta3
.
Text
=
"3"
;
this
.
vrsta3
.
UseVisualStyleBackColor
=
true
;
this
.
vrsta3
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
vrsta3_CheckedChanged
);
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
kolona5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
kolona4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
kolona3
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
314
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
143
);
this
.
groupBox2
.
TabIndex
=
5
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"Broj kolona:"
;
//
// kolona5
//
this
.
kolona5
.
AutoSize
=
true
;
this
.
kolona5
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
114
);
this
.
kolona5
.
Name
=
"kolona5"
;
this
.
kolona5
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
kolona5
.
TabIndex
=
2
;
this
.
kolona5
.
TabStop
=
true
;
this
.
kolona5
.
Text
=
"5"
;
this
.
kolona5
.
UseVisualStyleBackColor
=
true
;
this
.
kolona5
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
kolona5_CheckedChanged
);
//
// kolona4
//
this
.
kolona4
.
AutoSize
=
true
;
this
.
kolona4
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
73
);
this
.
kolona4
.
Name
=
"kolona4"
;
this
.
kolona4
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
kolona4
.
TabIndex
=
1
;
this
.
kolona4
.
TabStop
=
true
;
this
.
kolona4
.
Text
=
"4"
;
this
.
kolona4
.
UseVisualStyleBackColor
=
true
;
this
.
kolona4
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
kolona4_CheckedChanged
);
//
// kolona3
//
this
.
kolona3
.
AutoSize
=
true
;
this
.
kolona3
.
Location
=
new
System
.
Drawing
.
Point
(
30
,
37
);
this
.
kolona3
.
Name
=
"kolona3"
;
this
.
kolona3
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
kolona3
.
TabIndex
=
0
;
this
.
kolona3
.
TabStop
=
true
;
this
.
kolona3
.
Text
=
"3"
;
this
.
kolona3
.
UseVisualStyleBackColor
=
true
;
this
.
kolona3
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
kolona3_CheckedChanged
);
//
// btn_bojaLinija
//
this
.
btn_bojaLinija
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
468
);
this
.
btn_bojaLinija
.
Name
=
"btn_bojaLinija"
;
this
.
btn_bojaLinija
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
28
);
this
.
btn_bojaLinija
.
TabIndex
=
6
;
this
.
btn_bojaLinija
.
Text
=
"Boja linija"
;
this
.
btn_bojaLinija
.
UseVisualStyleBackColor
=
true
;
this
.
btn_bojaLinija
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_bojaLinija_Click
);
//
// btn_Kraj
//
this
.
btn_Kraj
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
791
);
this
.
btn_Kraj
.
Name
=
"btn_Kraj"
;
this
.
btn_Kraj
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
29
);
this
.
btn_Kraj
.
TabIndex
=
7
;
this
.
btn_Kraj
.
Text
=
"Kraj"
;
this
.
btn_Kraj
.
UseVisualStyleBackColor
=
true
;
this
.
btn_Kraj
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_Kraj_Click
);
//
// lbl_nazivSlike
//
this
.
lbl_nazivSlike
.
AutoSize
=
true
;
this
.
lbl_nazivSlike
.
Location
=
new
System
.
Drawing
.
Point
(
943
,
64
);
this
.
lbl_nazivSlike
.
Name
=
"lbl_nazivSlike"
;
this
.
lbl_nazivSlike
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
17
);
this
.
lbl_nazivSlike
.
TabIndex
=
8
;
//
// btn_sacuvaj
//
this
.
btn_sacuvaj
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
514
);
this
.
btn_sacuvaj
.
Name
=
"btn_sacuvaj"
;
this
.
btn_sacuvaj
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
28
);
this
.
btn_sacuvaj
.
TabIndex
=
9
;
this
.
btn_sacuvaj
.
Text
=
"Sacuvaj"
;
this
.
btn_sacuvaj
.
UseVisualStyleBackColor
=
true
;
this
.
btn_sacuvaj
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_sacuvaj_Click
);
//
// btn_otvori
//
this
.
btn_otvori
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
561
);
this
.
btn_otvori
.
Name
=
"btn_otvori"
;
this
.
btn_otvori
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
28
);
this
.
btn_otvori
.
TabIndex
=
10
;
this
.
btn_otvori
.
Text
=
"Otvori"
;
this
.
btn_otvori
.
UseVisualStyleBackColor
=
true
;
this
.
btn_otvori
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_otvori_Click
);
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
938
,
605
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
111
,
17
);
this
.
label2
.
TabIndex
=
11
;
this
.
label2
.
Text
=
"Unesi svoje ime:"
;
//
// lbl_unesiIme
//
this
.
lbl_unesiIme
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
632
);
this
.
lbl_unesiIme
.
Name
=
"lbl_unesiIme"
;
this
.
lbl_unesiIme
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
22
);
this
.
lbl_unesiIme
.
TabIndex
=
12
;
//
// btn_prikaziRezultate
//
this
.
btn_prikaziRezultate
.
Location
=
new
System
.
Drawing
.
Point
(
941
,
720
);
this
.
btn_prikaziRezultate
.
Name
=
"btn_prikaziRezultate"
;
this
.
btn_prikaziRezultate
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
47
);
this
.
btn_prikaziRezultate
.
TabIndex
=
13
;
this
.
btn_prikaziRezultate
.
Text
=
"Prikazi rezultate"
;
this
.
btn_prikaziRezultate
.
UseVisualStyleBackColor
=
true
;
this
.
btn_prikaziRezultate
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_prikaziRezultate_Click
);
//
// btn_upisiIme
//
this
.
btn_upisiIme
.
Location
=
new
System
.
Drawing
.
Point
(
939
,
664
);
this
.
btn_upisiIme
.
Name
=
"btn_upisiIme"
;
this
.
btn_upisiIme
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
40
);
this
.
btn_upisiIme
.
TabIndex
=
14
;
this
.
btn_upisiIme
.
Text
=
"Upisi ime"
;
this
.
btn_upisiIme
.
UseVisualStyleBackColor
=
true
;
this
.
btn_upisiIme
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_upisiIme_Click
);
//
// Form1
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
8F
,
16F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1087
,
860
);
this
.
Controls
.
Add
(
this
.
btn_upisiIme
);
this
.
Controls
.
Add
(
this
.
btn_prikaziRezultate
);
this
.
Controls
.
Add
(
this
.
lbl_unesiIme
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
btn_otvori
);
this
.
Controls
.
Add
(
this
.
btn_sacuvaj
);
this
.
Controls
.
Add
(
this
.
lbl_nazivSlike
);
this
.
Controls
.
Add
(
this
.
btn_Kraj
);
this
.
Controls
.
Add
(
this
.
btn_bojaLinija
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
lbl_odigraniPotezi
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
btn_novaIgra
);
this
.
Controls
.
Add
(
this
.
btn_ucitajSliku
);
this
.
Name
=
"Form1"
;
this
.
Text
=
"Form1"
;
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
#
endregion
private
System
.
Windows
.
Forms
.
Button
btn_ucitajSliku
;
private
System
.
Windows
.
Forms
.
Button
btn_novaIgra
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
lbl_odigraniPotezi
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
RadioButton
vrsta5
;
private
System
.
Windows
.
Forms
.
RadioButton
vrsta4
;
private
System
.
Windows
.
Forms
.
RadioButton
vrsta3
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
RadioButton
kolona5
;
private
System
.
Windows
.
Forms
.
RadioButton
kolona4
;
private
System
.
Windows
.
Forms
.
RadioButton
kolona3
;
private
System
.
Windows
.
Forms
.
Button
btn_bojaLinija
;
private
System
.
Windows
.
Forms
.
Button
btn_Kraj
;
private
System
.
Windows
.
Forms
.
Label
lbl_nazivSlike
;
private
System
.
Windows
.
Forms
.
Button
btn_sacuvaj
;
private
System
.
Windows
.
Forms
.
Button
btn_otvori
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
TextBox
lbl_unesiIme
;
private
System
.
Windows
.
Forms
.
Button
btn_prikaziRezultate
;
private
System
.
Windows
.
Forms
.
Button
btn_upisiIme
;
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Form1.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Drawing.Drawing2D
;
using
System.Drawing.Imaging
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.Serialization
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
SloziSliku_56_2018
{
public
partial
class
Form1
:
Form
{
public
bool
kraj
=
false
;
public
Image
slika
=
null
;
public
static
int
kolone
=
3
;
public
static
int
vrste
=
3
;
public
List
<
List
<
int
>>
polja
;
//polja
public
int
debljinaLinija
;
Color
bojaLinija
;
public
int
brPoteza
=
0
;
public
int
x
=
0
,
y
=
0
,
ind
=
1
;
public
int
levo
,
desno
,
gore
,
dole
;
public
int
pomLevo
,
pomDesno
,
pomGore
,
pomDole
,
desnoispis
;
List
<
PictureBox
>
slikaPolja
=
new
List
<
PictureBox
>();
public
Form1
()
{
InitializeComponent
();
ResizeRedraw
=
true
;
polja
=
new
List
<
List
<
int
>>();
int
v
=
0
;
for
(
int
i
=
0
;
i
<
vrste
;
i
++)
{
List
<
int
>
vrsta
=
new
List
<
int
>();
for
(
int
j
=
0
;
j
<
kolone
;
j
++)
{
v
=
0
;
vrsta
.
Add
(
v
);
}
polja
.
Add
(
vrsta
);
}
debljinaLinija
=
1
;
pomLevo
=
pomDole
=
pomGore
=
desnoispis
=
40
;
pomDesno
=
110
;
bojaLinija
=
Color
.
FromArgb
(
255
,
128
,
0
,
0
);
vrsta3
.
Checked
=
true
;
kolona3
.
Checked
=
true
;
}
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
Graphics
ggraphics
=
this
.
CreateGraphics
();
Rectangle
polje
=
this
.
ClientRectangle
;
levo
=
polje
.
X
+
pomLevo
;
gore
=
polje
.
Y
+
pomGore
;
desno
=
polje
.
Width
-
(
pomDesno
+
desnoispis
);
dole
=
polje
.
Height
-
pomDole
;
y
=
(
dole
-
gore
)
/
vrste
;
dole
=
gore
+
vrste
*
y
;
x
=
(
desno
-
levo
)
/
kolone
;
desno
=
levo
+
kolone
*
x
;
//crtaj
Pen
pen
=
new
Pen
(
bojaLinija
,
debljinaLinija
);
int
n
;
if
(
kolone
>
vrste
)
n
=
kolone
;
else
n
=
vrste
;
for
(
int
i
=
0
;
i
<=
n
;
i
++)
{
e
.
Graphics
.
DrawLine
(
pen
,
levo
,
gore
+
i
*
y
,
desno
+
debljinaLinija
-
1
,
gore
+
i
*
y
);
e
.
Graphics
.
DrawLine
(
pen
,
levo
+
i
*
x
,
gore
,
levo
+
(
i
*
x
),
dole
+
debljinaLinija
-
1
);
}
}
private
void
load_images
()
{
int
a
=
pomLevo
+
1
;
int
b
=
pomGore
+
1
;
int
x1
=
0
;
int
y1
=
-(
slika
.
Height
)
/
vrste
;
for
(
int
i
=
0
;
i
<
vrste
;
i
++)
{
y1
+=
(
slika
.
Height
)
/
vrste
;
x1
=
-(
slika
.
Width
)
/
kolone
;
for
(
int
j
=
0
;
j
<
kolone
;
j
++)
{
x1
+=
(
slika
.
Width
)
/
kolone
;
Image
slika1
=
iseciSliku
(
slika
,
new
Rectangle
(
x1
,
y1
,
slika
.
Width
-
x1
-
debljinaLinija
*
kolone
,
slika
.
Height
-
y1
-
debljinaLinija
*
vrste
));
var
slikaBox
=
new
PictureBox
{
Name
=
"picBox"
+
i
+
""
+
j
,
Size
=
new
Size
(
x
-
2
,
y
-
2
),
Location
=
new
Point
(
a
,
b
),
Image
=
slika1
};
slikaBox
.
MouseDoubleClick
+=
new
MouseEventHandler
(
picture_MouseDoubleClick
);
a
+=
x
;
slikaPolja
.
Add
(
slikaBox
);
this
.
Controls
.
Add
(
slikaBox
);
}
a
=
pomLevo
+
1
;
b
+=
y
;
}
this
.
Refresh
();
}
private
static
Image
iseciSliku
(
Image
img
,
Rectangle
cropArea
)
{
Bitmap
bmslika
=
new
Bitmap
(
img
);
Bitmap
iseci
=
bmslika
.
Clone
(
cropArea
,
bmslika
.
PixelFormat
);
return
(
Image
)(
iseci
);
}
private
void
picture_MouseDoubleClick
(
object
sender
,
MouseEventArgs
e
)
{
PictureBox
slika
=
(
PictureBox
)
sender
;
Point
pozicija
=
new
Point
(
x
,
y
);
if
(
slikaPolja
.
LastOrDefault
().
Location
.
X
==
slika
.
Location
.
X
)
{
if
(
slikaPolja
.
LastOrDefault
().
Location
.
Y
==
(
slika
.
Location
.
Y
+
pozicija
.
Y
)
||
slikaPolja
.
LastOrDefault
().
Location
.
Y
==
(
slika
.
Location
.
Y
-
pozicija
.
Y
))
{
dodajPotez
();
Point
p
=
slika
.
Location
;
slika
.
Location
=
slikaPolja
.
LastOrDefault
().
Location
;
slikaPolja
.
LastOrDefault
().
Location
=
p
;
this
.
Refresh
();
}
}
else
if
(
slikaPolja
.
LastOrDefault
().
Location
.
Y
==
slika
.
Location
.
Y
)
{
if
(
slikaPolja
.
LastOrDefault
().
Location
.
X
==
(
slika
.
Location
.
X
+
pozicija
.
X
)
||
slikaPolja
.
LastOrDefault
().
Location
.
X
==
(
slika
.
Location
.
X
-
pozicija
.
X
))
{
dodajPotez
();
Point
p
=
slika
.
Location
;
slika
.
Location
=
slikaPolja
.
LastOrDefault
().
Location
;
slikaPolja
.
LastOrDefault
().
Location
=
p
;
this
.
Refresh
();
}
}
}
private
void
dodajPotez
()
{
lbl_odigraniPotezi
.
Text
=
(++
brPoteza
).
ToString
();
}
private
void
btn_ucitajSliku_Click
(
object
sender
,
EventArgs
e
)
{
OpenFileDialog
dijalog
=
new
OpenFileDialog
();
dijalog
.
Filter
=
"Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp"
;
if
(
dijalog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
string
imeSlike
;
imeSlike
=
dijalog
.
FileName
;
imeSlike
=
Path
.
GetFileName
(
imeSlike
);
if
(
slika
!=
null
)
{
obrisiSlike
();
}
slika
=
Image
.
FromFile
(
dijalog
.
FileName
);
slika
=
dajSliku
(
slika
,
x
,
y
);
lbl_nazivSlike
.
Text
=
imeSlike
.
ToString
();
load_images
();
this
.
Refresh
();
}
}
public
static
Bitmap
dajSliku
(
Image
image
,
int
x
,
int
y
)
{
var
pravoug
=
new
Rectangle
(
0
,
0
,
x
*
kolone
,
y
*
vrste
);
var
slika
=
new
Bitmap
(
x
*
kolone
,
y
*
vrste
);
slika
.
SetResolution
(
image
.
HorizontalResolution
,
image
.
VerticalResolution
);
var
graphics
=
Graphics
.
FromImage
(
slika
);
graphics
.
CompositingMode
=
CompositingMode
.
SourceCopy
;
graphics
.
CompositingQuality
=
CompositingQuality
.
HighQuality
;
graphics
.
InterpolationMode
=
InterpolationMode
.
HighQualityBicubic
;
graphics
.
SmoothingMode
=
SmoothingMode
.
HighQuality
;
graphics
.
PixelOffsetMode
=
PixelOffsetMode
.
HighQuality
;
using
(
var
wrapMode
=
new
ImageAttributes
())
{
wrapMode
.
SetWrapMode
(
WrapMode
.
TileFlipXY
);
graphics
.
DrawImage
(
image
,
pravoug
,
0
,
0
,
image
.
Width
,
image
.
Height
,
GraphicsUnit
.
Pixel
,
wrapMode
);
}
return
slika
;
}
private
void
obrisiSlike
()
{
List
<
Control
>
brisanje
=
new
List
<
Control
>();
foreach
(
Control
control
in
this
.
Controls
)
{
if
(
control
is
PictureBox
)
{
brisanje
.
Add
(
control
);
}
}
for
(
int
i
=
0
;
i
<
brisanje
.
Count
;
i
++)
{
this
.
Controls
.
Remove
(
brisanje
[
i
]);
}
this
.
Refresh
();
}
private
void
btn_bojaLinija_Click
(
object
sender
,
EventArgs
e
)
{
ColorDialog
izaberiBoju
=
new
ColorDialog
();
if
(
izaberiBoju
.
ShowDialog
()
==
DialogResult
.
OK
)
{
bojaLinija
=
izaberiBoju
.
Color
;
}
this
.
Refresh
();
}
private
void
vrsta4_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
vrste
=
4
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
vrsta5_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
vrste
=
5
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
btn_sacuvaj_Click
(
object
sender
,
EventArgs
e
)
{
Stanje
stanje
=
new
Stanje
(
vrste
,
kolone
,
bojaLinija
,
brPoteza
,
slika
);
// slikaPolja);
//Stanje stanje = new Stanje(vrste, kolone, bojaLinija, brPoteza); //, slikaPolja);
SaveFileDialog
dialog
=
new
SaveFileDialog
();
if
(
dialog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
string
naziv
=
dialog
.
FileName
;
IFormatter
formatter
=
new
System
.
Runtime
.
Serialization
.
Formatters
.
Binary
.
BinaryFormatter
();
Stream
stream
=
new
FileStream
(
naziv
,
FileMode
.
Create
,
FileAccess
.
Write
);
formatter
.
Serialize
(
stream
,
stanje
);
stream
.
Close
();
}
}
private
void
btn_otvori_Click
(
object
sender
,
EventArgs
e
)
{
OpenFileDialog
dialog
=
new
OpenFileDialog
();
if
(
dialog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
string
name
=
dialog
.
FileName
;
IFormatter
formatter
=
new
System
.
Runtime
.
Serialization
.
Formatters
.
Binary
.
BinaryFormatter
();
Stream
stream
=
new
FileStream
(
name
,
FileMode
.
Open
,
FileAccess
.
Read
);
Stanje
s
=
(
Stanje
)
formatter
.
Deserialize
(
stream
);
this
.
Refresh
();
kolone
=
s
.
Kolona
;
vrste
=
s
.
Vrsta
;
bojaLinija
=
(
s
.
BojaLinija
);
lbl_odigraniPotezi
.
Text
=
s
.
Br_poteza
.
ToString
();
slika
=
s
.
Slika
;
obrisiSlike
();
dajSliku
(
slika
,
kolone
,
vrste
);
load_images
();
// izrotiraj();
stream
.
Close
();
Invalidate
();
}
}
private
void
btn_upisiIme_Click
(
object
sender
,
EventArgs
e
)
{
if
(
lbl_unesiIme
.
Text
!=
""
)
{
string
ime
=
lbl_unesiIme
.
Text
;
int
k
=
kolone
;
int
v
=
vrste
;
int
pot
=
brPoteza
;
IgDb
db
=
new
IgDb
();
db
.
upisi
(
ime
,
v
,
k
,
pot
);
}
else
{
MessageBox
.
Show
(
"Unesite svoje ime!"
);
}
}
private
void
btn_prikaziRezultate_Click
(
object
sender
,
EventArgs
e
)
{
Form2
f2
=
new
Form2
();
f2
.
Show
();
}
private
void
kolona3_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
kolone
=
3
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
kolona4_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
kolone
=
4
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
kolona5_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
kolone
=
5
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
vrsta3_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
vrste
=
3
;
if
(
slika
!=
null
)
{
ind
=
0
;
obrisiSlike
();
load_images
();
}
this
.
Refresh
();
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
if
(
slika
==
null
)
{
MessageBox
.
Show
(
"Morate ucitati sliku da biste poceli igru!"
);
}
else
{
brPoteza
=
0
;
lbl_odigraniPotezi
.
Text
=
(
brPoteza
).
ToString
();
izrotiraj
();
}
}
private
List
<
Point
>
dajLokacije
()
{
List
<
Point
>
lokacije
=
new
List
<
Point
>();
for
(
int
i
=
0
;
i
<
slikaPolja
.
Count
;
i
++)
{
lokacije
.
Add
(
slikaPolja
[
i
].
Location
);
}
return
lokacije
;
}
private
void
izrotiraj
()
{
Random
random
=
new
Random
();
List
<
Point
>
lokacija
=
new
List
<
Point
>();
if
(
ind
==
0
)
{
obrisiSlike
();
load_images
();
lokacija
=
dajLokacije
();
for
(
int
i
=
0
;
i
<
slikaPolja
.
Count
;
i
++)
{
var
k
=
random
.
Next
(
0
,
lokacija
.
Count
-
1
);
lokacija
.
RemoveAt
(
k
);
}
slikaPolja
.
LastOrDefault
().
Image
=
null
;
this
.
Refresh
();
}
else
{
lokacija
=
dajLokacije
();
for
(
int
i
=
0
;
i
<
slikaPolja
.
Count
;
i
++)
{
var
k
=
random
.
Next
(
0
,
lokacija
.
Count
);
slikaPolja
[
i
].
Location
=
lokacija
[
k
];
lokacija
.
RemoveAt
(
k
);
}
slikaPolja
.
LastOrDefault
().
Image
=
null
;
this
.
Refresh
();
}
}
private
void
groupBox1_Enter
(
object
sender
,
EventArgs
e
)
{
}
private
void
btn_Kraj_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Form1.resx
0 → 100644
View file @
f1513a02
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/Form2.Designer.cs
0 → 100644
View file @
f1513a02
namespace
SloziSliku_56_2018
{
partial
class
Form2
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Ime
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Igra
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
brPoteza
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
this
.
SuspendLayout
();
//
// dataGridView1
//
this
.
dataGridView1
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
dataGridView1
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
Ime
,
this
.
Igra
,
this
.
brPoteza
});
this
.
dataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
171
,
73
);
this
.
dataGridView1
.
Name
=
"dataGridView1"
;
this
.
dataGridView1
.
RowHeadersWidth
=
51
;
this
.
dataGridView1
.
RowTemplate
.
Height
=
24
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
533
,
150
);
this
.
dataGridView1
.
TabIndex
=
0
;
//
// Ime
//
this
.
Ime
.
HeaderText
=
"Ime"
;
this
.
Ime
.
MinimumWidth
=
6
;
this
.
Ime
.
Name
=
"Ime"
;
this
.
Ime
.
Width
=
125
;
//
// Igra
//
this
.
Igra
.
HeaderText
=
"Igra"
;
this
.
Igra
.
MinimumWidth
=
6
;
this
.
Igra
.
Name
=
"Igra"
;
this
.
Igra
.
Width
=
125
;
//
// brPoteza
//
this
.
brPoteza
.
HeaderText
=
"Broj poteza"
;
this
.
brPoteza
.
MinimumWidth
=
6
;
this
.
brPoteza
.
Name
=
"brPoteza"
;
this
.
brPoteza
.
Width
=
125
;
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
331
,
280
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
1
;
this
.
button1
.
Text
=
"Izadji"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// Form2
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
8F
,
16F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
450
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
dataGridView1
);
this
.
Name
=
"Form2"
;
this
.
Text
=
"Form2"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Form2_Load
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
EndInit
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
DataGridView
dataGridView1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Ime
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Igra
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
brPoteza
;
private
System
.
Windows
.
Forms
.
Button
button1
;
}
}
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/Form2.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
SloziSliku_56_2018
{
public
partial
class
Form2
:
Form
{
public
Form2
()
{
InitializeComponent
();
}
private
void
Form2_Load
(
object
sender
,
EventArgs
e
)
{
popunigrid
();
}
private
void
popunigrid
()
{
dataGridView1
.
Rows
.
Clear
();
IgDb
db
=
new
IgDb
();
List
<
Igrac
>
igraci
=
db
.
dajrezultate
();
foreach
(
var
igrac
in
igraci
)
{
DataGridViewRow
row
=
(
DataGridViewRow
)
dataGridView1
.
Rows
[
0
].
Clone
();
row
.
Cells
[
0
].
Value
=
igrac
.
ime
;
row
.
Cells
[
1
].
Value
=
igrac
.
vrste
+
" x "
+
igrac
.
kolone
;
row
.
Cells
[
2
].
Value
=
igrac
.
rezultat
;
row
.
Tag
=
igrac
.
id
;
dataGridView1
.
Rows
.
Add
(
row
);
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Form2.resx
0 → 100644
View file @
f1513a02
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Ime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Igra.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="brPoteza.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/IgDb.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Data.SqlClient
;
using
System.Windows.Forms
;
namespace
SloziSliku_56_2018
{
public
class
IgDb
{
SqlConnection
conn
=
ConnectionDb
.
Instance
;
public
void
upisi
(
string
ime
,
int
vrste
,
int
kolone
,
int
brPoteza
)
{
string
query
=
"insert into igraci values(@ime,@vrste,@kolone,@brPoteza)"
;
SqlCommand
command
=
new
SqlCommand
(
query
,
conn
);
conn
.
Open
();
command
.
Parameters
.
AddWithValue
(
"@ime"
,
ime
);
command
.
Parameters
.
AddWithValue
(
"@vrste"
,
vrste
);
command
.
Parameters
.
AddWithValue
(
"@kolone"
,
kolone
);
command
.
Parameters
.
AddWithValue
(
"@brPoteza"
,
brPoteza
);
int
rezultat
=
command
.
ExecuteNonQuery
();
conn
.
Close
();
if
(
rezultat
>
0
)
{
MessageBox
.
Show
(
"Uspesno upisano!"
);
}
else
{
MessageBox
.
Show
(
"Nije moguce upisati!"
);
}
}
public
List
<
Igrac
>
dajrezultate
()
{
List
<
Igrac
>
igraci
=
new
List
<
Igrac
>();
conn
.
Open
();
String
query
=
@"select top 10 *
from igraci
order by brPoteza desc"
;
SqlCommand
command
=
new
SqlCommand
(
query
,
conn
);
SqlDataReader
reader
=
command
.
ExecuteReader
();
while
(
reader
.
Read
())
{
Igrac
i
=
new
Igrac
{
id
=
int
.
Parse
(
reader
[
"id"
].
ToString
()),
ime
=
reader
[
"ime"
].
ToString
(),
vrste
=
int
.
Parse
(
reader
[
"vrste"
].
ToString
()),
kolone
=
int
.
Parse
(
reader
[
"kolone"
].
ToString
()),
rezultat
=
int
.
Parse
(
reader
[
"brPoteza"
].
ToString
())
};
igraci
.
Add
(
i
);
}
conn
.
Close
();
return
igraci
;
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Igrac.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
SloziSliku_56_2018
{
public
class
Igrac
{
public
int
id
;
public
string
ime
;
public
int
rezultat
;
public
int
vrste
;
public
int
kolone
;
public
override
string
ToString
()
{
return
"Ime: "
+
ime
+
" Igra je na tabli dimenzija: "
+
vrste
+
" x "
+
kolone
+
" Broj poteza:"
+
rezultat
;
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Program.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
SloziSliku_56_2018
{
static
class
Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[
STAThread
]
static
void
Main
()
{
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
Run
(
new
Form1
());
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Properties/AssemblyInfo.cs
0 → 100644
View file @
f1513a02
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SloziSliku_56_2018")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SloziSliku_56_2018")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b592434c-605d-4086-83ee-266ab18a716b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Resources.Designer.cs
0 → 100644
View file @
f1513a02
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
SloziSliku_56_2018.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"4.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
{
private
static
global
::
System
.
Resources
.
ResourceManager
resourceMan
;
private
static
global
::
System
.
Globalization
.
CultureInfo
resourceCulture
;
[
global
::
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessageAttribute
(
"Microsoft.Performance"
,
"CA1811:AvoidUncalledPrivateCode"
)]
internal
Resources
()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
{
get
{
if
((
resourceMan
==
null
))
{
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"SloziSliku_56_2018.Properties.Resources"
,
typeof
(
Resources
).
Assembly
);
resourceMan
=
temp
;
}
return
resourceMan
;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Globalization
.
CultureInfo
Culture
{
get
{
return
resourceCulture
;
}
set
{
resourceCulture
=
value
;
}
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Resources.resx
0 → 100644
View file @
f1513a02
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Settings.Designer.cs
0 → 100644
View file @
f1513a02
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
SloziSliku_56_2018.Properties
{
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"11.0.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
[
global
::
System
.
Configuration
.
DefaultSettingValueAttribute
(
"Data Source=(localdb)\\baza;Initial Catalog=SloziSliku;Integrated Security=True"
)]
public
static
Settings
Default
{
get
{
return
defaultInstance
;
}
}
[
global
::
System
.
Configuration
.
UserScopedSettingAttribute
()]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
//[global::System.Configuration.DefaultSettingValueAttribute("Data Source=(localdb)\\baza;AttachDbFilename=|DataDirectory|\\SloziSliku.mdf" +
// ";Integrated Security=True;Connect Timeout=30")]
//[global::System.Configuration.DefaultSettingValueAttribute(@"Data Source = (LocalDB)\MSSQLLocalDB;AttachDbFilename="+
// D:\\Diyajniranje softvera\\New folder\\SloziSliku_56_2018\\SloziSliku_56_2018\\SloziSliku.mdf +";Integrated Security = True; Connect Timeout = 30")]
[
global
::
System
.
Configuration
.
DefaultSettingValueAttribute
(
"Data Source = (LocalDB)\\MSSQLLocalDB;AttachDbFilename= D:\\Diyajniranje softvera\\New folder\\SloziSliku_56_2018\\SloziSliku_56_2018\\SloziSliku.mdf ;Integrated Security = True; Connect Timeout = 30"
)]
public
string
connection
{
get
{
return
((
string
)(
this
[
"connection"
]));
}
set
{
this
[
"connection"
]
=
value
;
}
}
}
}
SloziSliku_56_2018/SloziSliku_56_2018/Properties/Settings.settings
0 → 100644
View file @
f1513a02
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku.mdf
0 → 100644
View file @
f1513a02
File added
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_56_2018.csproj
0 → 100644
View file @
f1513a02
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B592434C-605D-4086-83EE-266AB18A716B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>SloziSliku_56_2018</RootNamespace>
<AssemblyName>SloziSliku_56_2018</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConnectionDb.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="IgDb.cs" />
<Compile Include="Igrac.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Stanje.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form2.resx">
<DependentUpon>Form2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="SloziSliku.mdf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="SloziSliku_log.ldf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<DependentUpon>SloziSliku.mdf</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_56_2018.csproj.user
0 → 100644
View file @
f1513a02
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
SloziSliku_56_2018/SloziSliku_56_2018/SloziSliku_log.ldf
0 → 100644
View file @
f1513a02
File added
SloziSliku_56_2018/SloziSliku_56_2018/Stanje.cs
0 → 100644
View file @
f1513a02
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
SloziSliku_56_2018
{
[
Serializable
]
public
class
Stanje
{
private
int
br_poteza
;
private
Color
bojaLinija
;
private
int
kolona
;
private
int
vrsta
;
private
Image
slika
;
public
int
Kolona
{
get
=>
kolona
;
set
=>
kolona
=
value
;
}
public
int
Vrsta
{
get
=>
vrsta
;
set
=>
vrsta
=
value
;
}
public
int
Br_poteza
{
get
=>
br_poteza
;
set
=>
br_poteza
=
value
;
}
public
Color
BojaLinija
{
get
=>
bojaLinija
;
set
=>
bojaLinija
=
value
;
}
public
Image
Slika
{
get
=>
slika
;
set
=>
slika
=
value
;
}
//public List<PictureBox> SlikaPolja { get => slikaPolja; set => slikaPolja = value; }
//List<PictureBox> slikaPolja = new List<PictureBox>();
public
Stanje
(
int
kolona
,
int
vrsta
,
Color
boja
,
int
br_poteza
,
Image
slika
)
//, List<PictureBox> polja)
{
this
.
kolona
=
kolona
;
this
.
vrsta
=
vrsta
;
this
.
bojaLinija
=
boja
;
this
.
br_poteza
=
br_poteza
;
this
.
slika
=
slika
;
// this.slikaPolja = polja;
}
public
Stanje
()
{
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment