using
System;
using
System.Drawing;
using
System.Collections;
using
System.ComponentModel;
using
System.Windows.Forms;
using
System.Data;
namespace
Face_Game_VC_Net
{
///
<summary>
///
Summary description for Form1.
///
</summary>
public
class FaceGameNet :
System.Windows.Forms.Form
{
internal
System.Windows.Forms.Panel Panel4;
public
System.Windows.Forms.Label lb41;
public
System.Windows.Forms.Label lb42;
public
System.Windows.Forms.Label lb44;
public
System.Windows.Forms.Label lb43;
internal
System.Windows.Forms.MenuItem MenuItem1;
internal
System.Windows.Forms.MenuItem MenuItem2;
internal
System.Windows.Forms.MenuItem MenuItem3;
internal
System.Windows.Forms.MenuItem MenuItem4;
internal
System.Windows.Forms.MenuItem MenuItem5;
internal
System.Windows.Forms.MenuItem MenuItem6;
internal
System.Windows.Forms.MenuItem MenuItem7;
internal
System.Windows.Forms.MenuItem MenuItem8;
internal
System.Windows.Forms.Panel Panel6;
public
System.Windows.Forms.Label lb63;
public
System.Windows.Forms.Label lb64;
public
System.Windows.Forms.Label lb62;
public
System.Windows.Forms.Label lb61;
internal
System.Windows.Forms.Panel Panel5;
public
System.Windows.Forms.Label lb53;
public
System.Windows.Forms.Label lb54;
public
System.Windows.Forms.Label lb52;
public
System.Windows.Forms.Label lb51;
internal
System.Windows.Forms.Panel Panel3;
public
System.Windows.Forms.Label lb31;
public
System.Windows.Forms.Label lb32;
public
System.Windows.Forms.Label lb34;
public
System.Windows.Forms.Label lb33;
public
System.Windows.Forms.Label LOne;
public
System.Windows.Forms.Label Line11;
public
System.Windows.Forms.Label Line10;
public
System.Windows.Forms.Label Line8;
public
System.Windows.Forms.Label Line7;
public
System.Windows.Forms.Label Line5;
public
System.Windows.Forms.Label Line4;
public
System.Windows.Forms.Label Line6;
public
System.Windows.Forms.Label Line1;
internal
System.Windows.Forms.ToolBarButton ToolBarButton2;
internal
System.Windows.Forms.ToolBarButton ToolBarButton3;
internal
System.Windows.Forms.ToolBarButton ToolBarButton1;
internal
System.Windows.Forms.ToolBar ToolBar1;
internal
System.Windows.Forms.ToolBarButton ToolBarButton4;
internal
System.Windows.Forms.ToolBarButton ToolBarButton5;
internal
System.Windows.Forms.ToolBarButton ToolBarButton6;
internal
System.Windows.Forms.ToolBarButton ToolBarButton7;
internal
System.Windows.Forms.ToolBarButton ToolBarButton8;
internal
System.Windows.Forms.ImageList ImageList1;
internal
System.Windows.Forms.Timer Timer_Welcome;
internal
System.Windows.Forms.Timer TimerCircle;
internal
System.Windows.Forms.Timer Timer4;
internal
System.Windows.Forms.Panel Panel2;
public
System.Windows.Forms.Label lb21;
public
System.Windows.Forms.Label lb22;
public
System.Windows.Forms.Label lb24;
public
System.Windows.Forms.Label lb23;
public
System.Windows.Forms.Label LTImer;
internal
System.Windows.Forms.Timer Timer3;
public
System.Windows.Forms.Label LInterval;
public
System.Windows.Forms.Label ltime1;
internal
System.Windows.Forms.Panel Panel1;
public
System.Windows.Forms.Label lb13;
public
System.Windows.Forms.Label lb14;
public
System.Windows.Forms.Label lb12;
public
System.Windows.Forms.Label lb11;
internal
System.Windows.Forms.Timer Timer_clock;
internal
System.Windows.Forms.Timer Timer1;
internal
System.Windows.Forms.Timer Timer2;
internal
System.Windows.Forms.Panel Panel9;
public
System.Windows.Forms.Label lb93;
public
System.Windows.Forms.Label lb94;
public
System.Windows.Forms.Label lb92;
public
System.Windows.Forms.Label lb91;
internal
System.Windows.Forms.Panel Panel7;
public
System.Windows.Forms.Label lb71;
public
System.Windows.Forms.Label lb72;
public
System.Windows.Forms.Label lb74;
public
System.Windows.Forms.Label lb73;
internal
System.Windows.Forms.Panel Panel8;
public
System.Windows.Forms.Label lb83;
public
System.Windows.Forms.Label lb84;
public
System.Windows.Forms.Label lb82;
public
System.Windows.Forms.Label lb81;
internal
System.Windows.Forms.MainMenu MainMenu1;
private
System.ComponentModel.IContainer components;
internal
System.Windows.Forms.Panel PWelcome;
internal
System.Windows.Forms.Panel PPicture;
internal
System.Windows.Forms.Panel PPicture1;
internal
System.Windows.Forms.PictureBox PictureBox2;
internal
System.Windows.Forms.PictureBox PictureBox3;
internal
System.Windows.Forms.Label Lwelcome;
internal
System.Windows.Forms.PictureBox PictureBox1;
public
System.Windows.Forms.Label LSelect;
// Variables
System.Windows.Forms.Panel vobject;
// Graphic
Graphics ex;
DateTime vtime;
DateTime
New_Game_BTime;
DateTime
New_Game_interval;
bool FaceGametest;
bool Flg_Time;
bool TimerFlag;
bool Welcome_Flag;
bool TheGood_Flag;
short vstate;
int Vcount;
int Initial;
int VlocationX;
int VlocationY;
// Arrays
string[,] A =
new
string[10,5];
string[] G_Box =
new
string[10];
bool[] G_Flag =
new
bool[10];
int[,] LP =
new
int[10,3];
int[] G1 =
new
int[5];
int[] G2 =
new
int[5];
int[] G3 =
new
int[5];
int[] G4 =
new
int[5];
int[] G5 =
new
int[5];
int[] G6 =
new
int[5];
int[] G7 =
new
int[5];
int[] G8 =
new
int[5];
int[] G9 =
new
int[5];
// Random values
double vrnd0;
double vrnd1;
double vrnd2;
double vrnd3;
double vrnd4;
public FaceGameNet()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after
InitializeComponent call
//
}
///
<summary>
///
Clean up any resources being used.
///
</summary>
protected
override
void Dispose(
bool disposing )
{
if( disposing )
{
if (components !=
null)
{
components.Dispose();
}
}
base.Dispose(
disposing );
}
Windows Form
Designer generated code |
///
<summary>
///
The main entry point for the application.
///
</summary>
[STAThread]
static
void Main()
{
Application.Run(new
FaceGameNet());
}
private
void
FaceGameNet_Load(object
sender, System.EventArgs e)
{
Vcount = 0;
// Resize
// LWelcome
this.PWelcome.Height
= 290;
this.PWelcome.Width
= 290;
this.Lwelcome.Top
= (this.PWelcome.Height
- this.Lwelcome.Height)
/ 2;
this.Lwelcome.Left
= (this.PWelcome.Width
- this.Lwelcome.Width)
/ 2;
// PictureBox1
this.PPicture.Height
= 290;
this.PPicture.Width
= 290;
this.PictureBox1.Location
= new
System.Drawing.Point(0, 0);
this.PictureBox1.Height
= this.PPicture.Height;
this.PictureBox1.Width
= this.PPicture.Width;
this.PPicture1.Height
= 290;
this.PPicture1.Width
= 290;
this.PictureBox2.Top
= (this.PPicture1.Height
- this.PictureBox2.Height)
/ 2;
this.PictureBox2.Left
= (this.PPicture1.Width
- this.PictureBox2.Width)
/ 2;
this.PictureBox3.Top
= (this.PPicture1.Height
- this.PictureBox3.Height)
/ 2;
this.PictureBox3.Left
= (this.PPicture1.Width
- this.PictureBox3.Width)
/ 2;
// Initial Position
Initial = 1;
// New Game Load Procedure
New_Game_Sub();
}
// New Game Load Procedure
**********************************
private
void New_Game_Sub()
{
object Initial_Flag
;
// Random values
vrnd0 = 0.1;
vrnd1 = 0.1;
vrnd2 = 0.1;
vrnd3 = 0.1;
vrnd4 = 0.1;
FaceGametest =
true;
WelcomeSub(true);
// Initialisation
Initial_Array();
LOne.Visible =
true;
// Initial Position Sub
Initial_Flag =
true;
Initial_Position();
// Start Timer Load, New Game
vtime=
System.DateTime.Now;
New_Game_BTime =
vtime;
Flg_Time =
false;
TimerFlag =
true;
Timer1.Enabled =
true;
Timer2.Enabled =
true;
Timer3.Enabled =
true;
Timer4.Enabled =
true;
}
//Show the word - Welcome
*************************************
private
void WelcomeSub(bool
weloperation)
{
if (weloperation ==
true)
{
// Graphics
ex =
this.PictureBox1.CreateGraphics();
ex.Clear(SystemColors.Control);
ToolBar1.Buttons[1].Enabled =
false;
this.LTImer.Visible
= false;
this.LInterval.Visible
= false;
// Welcome
this.Lwelcome.Text
= " ";
Vcount = 1;
this.PWelcome.Location
= new
System.Drawing.Point(8, 80);
Timer_Welcome.Enabled =
true;
Welcome_Flag =
true;
// Circle
this.PPicture.Location
= new
System.Drawing.Point(320, 80);
TimerCircle.Enabled =
true;
}
else
{
if (weloperation ==
false)
{
ToolBar1.Buttons[1].Enabled =
true;
this.LTImer.Visible
= true;
this.LInterval.Text
= " ";
this.LInterval.BackColor
= SystemColors.Desktop;
this.LInterval.Visible
= true;
// Welcome
this.PWelcome.Location
= new
System.Drawing.Point(8, 464);
Timer_Welcome.Enabled =
false;
Welcome_Flag =
false;
// Circle
this.PPicture.Location
= new
System.Drawing.Point(264, 464);
TimerCircle.Enabled =
false;
}
}
}
private
void Initial_Array()
//********************************
{
for (int
i1 = 0; i1 <= 9; i1++)
{
for (int
i2 = 0; i2 <= 4; i2++)
{
A[i1, i2] = "";
}
}
for (int
i1 = 0; i1 <= 9; i1++)
{
G_Flag[i1] =
false;
}
for (int
i1 = 0; i1 <= 9; i1++)
{
G_Box[i1] = "";
}
}
//Different positions show
**************************************
private
void
Initial_Position()
{
// Initial Position
switch(Initial)
{
case 1:
LP[1, 1] = 512;
LP[1, 2] = 80;
LP[2, 1] = 320;
LP[2, 2] = 176;
LP[3, 1] = 416;
LP[3, 2] = 176;
LP[4, 1] = 512;
LP[4, 2] = 272;
LP[5, 1] = 512;
LP[5, 2] = 176;
LP[6, 1] = 320;
LP[6, 2] = 272;
LP[7, 1] = 416;
LP[7, 2] = 80;
LP[8, 1] = 416;
LP[8, 2] = 272;
LP[9, 1] = 320;
LP[9, 2] = 80;
break;
case 2:
LP[1, 1] = 416;
LP[1, 2] = 80;
LP[2, 1] = 512;
LP[2, 2] = 272;
LP[3, 1] = 320;
LP[3, 2] = 272;
LP[4, 1] = 512;
LP[4, 2] = 176;
LP[5, 1] = 512;
LP[5, 2] = 80;
LP[6, 1] = 416;
LP[6, 2] = 176;
LP[7, 1] = 320;
LP[7, 2] = 80;
LP[8, 1] = 320;
LP[8, 2] = 176;
LP[9, 1] = 416;
LP[9, 2] = 272;
break;
case 3:
LP[1, 1] = 512;
LP[1, 2] = 272;
LP[2, 1] = 416;
LP[2, 2] = 80;
LP[3, 1] = 416;
LP[3, 2] = 176;
LP[4, 1] = 416;
LP[4, 2] = 272;
LP[5, 1] = 320;
LP[5, 2] = 176;
LP[6, 1] = 320;
LP[6, 2] = 272;
LP[7, 1] = 512;
LP[7, 2] = 80;
LP[8, 1] = 320;
LP[8, 2] = 80;
LP[9, 1] = 512;
LP[9, 2] = 176;
break;
case 4:
LP[1, 1] = 512;
LP[1, 2] = 272;
LP[2, 1] = 320;
LP[2, 2] = 272;
LP[3, 1] = 512;
LP[3, 2] = 80;
LP[4, 1] = 416;
LP[4, 2] = 80;
LP[5, 1] = 320;
LP[5, 2] = 80;
LP[6, 1] = 416;
LP[6, 2] = 272;
LP[7, 1] = 416;
LP[7, 2] = 176;
LP[8, 1] = 320;
LP[8, 2] = 176;
LP[9, 1] = 512;
LP[9, 2] = 176;
break;
case 5:
LP[1, 1] = 512;
LP[1, 2] = 176;
LP[2, 1] = 416;
LP[2, 2] = 176;
LP[3, 1] = 512;
LP[3, 2] = 272;
LP[4, 1] = 320;
LP[4, 2] = 176;
LP[5, 1] = 320;
LP[5, 2] = 272;
LP[6, 1] = 320;
LP[6, 2] = 80;
LP[7, 1] = 416;
LP[7, 2] = 80;
LP[8, 1] = 512;
LP[8, 2] = 80;
LP[9, 1] = 416;
LP[9, 2] = 272;
break;
case 6:
LP[1, 1] = 320;
LP[1, 2] = 176;
LP[2, 1] = 320;
LP[2, 2] = 80;
LP[3, 1] = 416;
LP[3, 2] = 176;
LP[4, 1] = 512;
LP[4, 2] = 80;
LP[5, 1] = 512;
LP[5, 2] = 272;
LP[6, 1] = 416;
LP[6, 2] = 272;
LP[7, 1] = 512;
LP[7, 2] = 176;
LP[8, 1] = 320;
LP[8, 2] = 272;
LP[9, 1] = 416;
LP[9, 2] = 80;
break;
case 7:
LP[1, 1] = 320;
LP[1, 2] = 272;
LP[2, 1] = 416;
LP[2, 2] = 272;
LP[3, 1] = 320;
LP[3, 2] = 176;
LP[4, 1] = 416;
LP[4, 2] = 176;
LP[5, 1] = 416;
LP[5, 2] = 80;
LP[6, 1] = 320;
LP[6, 2] = 80;
LP[7, 1] = 512;
LP[7, 2] = 272;
LP[8, 1] = 512;
LP[8, 2] = 176;
LP[9, 1] = 512;
LP[9, 2] = 80;
break;
}
Panel1.SetBounds((LP[1, 1]), (LP[1, 2]), 96, 96);
Panel2.SetBounds((LP[2, 1]), (LP[2, 2]), 96, 96);
Panel3.SetBounds((LP[3, 1]), (LP[3, 2]), 96, 96);
Panel4.SetBounds((LP[4, 1]), (LP[4, 2]), 96, 96);
Panel5.SetBounds((LP[5, 1]), (LP[5, 2]), 96, 96);
Panel6.SetBounds((LP[6, 1]), (LP[6, 2]), 96, 96);
Panel7.SetBounds((LP[7, 1]), (LP[7, 2]), 96, 96);
Panel8.SetBounds((LP[8, 1]), (LP[8, 2]), 96, 96);
Panel9.SetBounds((LP[9, 1]), (LP[9, 2]), 96, 96);
}
private
void Panel1_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel1,
e) ;
subcursor1(lb11,
lb12, lb13, lb14);
}
private
void Panel2_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel2,
e);
subcursor1(lb21,
lb22, lb23, lb24);
}
private
void Panel3_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel3,
e);
subcursor1(lb31,
lb32, lb33, lb34);
}
private
void Panel4_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel4,
e);
subcursor1(lb41,
lb42, lb43, lb44);
}
private
void Panel5_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel5,
e);
subcursor1(lb51,
lb52, lb53, lb54);
}
private
void Panel6_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel6,
e);
subcursor1(lb61,
lb62, lb63, lb64);
}
private
void Panel7_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel7,
e);
subcursor1(lb71,
lb72, lb73, lb74);
}
private
void Panel8_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel8,
e);
subcursor1(lb71,
lb72, lb73, lb74);
}
private
void Panel9_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
subcursor(Panel9,
e);
subcursor1(lb91,
lb92, lb93, lb94);
}
private
void
subcursor(System.Windows.Forms.Panel vsender,
System.Windows.Forms.MouseEventArgs ve)
{
vobject = vsender;
if (ve.Button ==
MouseButtons.Left)
{
vobject.Cursor =
Cursors.No;
vstate = 1;
VlocationX =
vobject.Location.X;
VlocationY =
vobject.Location.Y;
}
else
{
if (ve.Button ==
MouseButtons.Right)
{
vstate = 0;
vobject.Cursor =
Cursors.Default;
}
}
}
private
void
subcursor1(System.Windows.Forms.Label vlb1,
System.Windows.Forms.Label vlb2,
System.Windows.Forms.Label vlb3,
System.Windows.Forms.Label vlb4)
{
vlb1.Cursor =
vobject.Cursor;
vlb2.Cursor =
vobject.Cursor;
vlb3.Cursor =
vobject.Cursor;
vlb4.Cursor =
vobject.Cursor;
}
//******************************
private
void
FaceGameNet_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
string indexx;
int EX;
int EY;
EX = 0;
EY = 0;
// First Group, X
if (e.X >= 0 && e.X
< 104)
EX = 8;
if (e.X >= 104 &&
e.X < 200)
EX = 104;
if (e.X >= 200 &&
e.X < 296)
EX = 200;
// Second Group, X
if (e.X >= 296 &&
e.X < 416)
EX = 320;
if (e.X >= 416 &&
e.X < 512)
EX = 416;
if (e.X >= 512 &&
e.X <= (this.Width))
EX = 512;
// Y
if (e.Y >= 0 && e.Y
< 176)
EY = 80;
if (e.Y >= 176 &&
e.Y < 272)
EY = 176;
if (e.Y >= 272 &&
e.Y < (this.Height))
EY = 272;
indexx =
vobject.Name.Substring((vobject.Name.Length-1), 1);
LSelect.Text = "
";
if (vstate == 1)
{
LSelect.Text = "
";
if (EX > 296)
{
if (VlocationX >
296)
{
// Move to
vobject.SetBounds((LP[System.Convert.ToInt16(indexx),
1]), (LP[System.Convert.ToInt16(indexx), 2]), 96, 96);
SubCondition(indexx);
LSelect.Text =
"Operation not available";
}
else
{
if (VlocationX <
296)
{
// Clear
Verification_Value();
// Move to
vobject.SetBounds((LP[System.Convert.ToInt16(indexx),
1]), (LP[System.Convert.ToInt16(indexx), 2]), 96, 96);
SubCondition(indexx);
}
}
}
else
{
if (EX < 296)
{
// Move to
vobject.SetBounds((EX), (EY), 96, 96);
// Clear
Verification_Value();
// Store Information
G_Flag[System.Convert.ToInt16(indexx)] =
true;
// Calcul
Calcul_Value(indexx, EX, EY);
// Test
Equal_Value(indexx, EX, EY);
SubCondition(indexx);
}
}
}
}
//****************************************************
private
void
Verification_Value()
{
if (VlocationX == 8
&& VlocationY == 80)
{
A[1, 1] = "";
A[1, 2] = "";
}
else
{
if (VlocationX == 8
&& VlocationY == 176)
{
A[2, 1] = "";
A[2, 2] = "";
A[2, 3] = "";
}
else
{
if (VlocationX == 8
&& VlocationY == 272)
{
A[3, 1] = "";
A[3, 2] = "";
}
else
{
if (VlocationX ==
104 && VlocationY == 80)
{
A[4, 1] = "";
A[4, 2] = "";
A[4, 3] = "";
}
else
{
if (VlocationX ==
104 && VlocationY == 176)
{
A[5, 1] = "";
A[5, 2] = "";
A[5, 3] = "";
A[5, 4] = "";
}
else
{
if (VlocationX ==
104 && VlocationY == 272)
{
A[6, 1] = "";
A[6, 2] = "";
A[6, 3] = "";
}
else
{
if (VlocationX ==
200 && VlocationY == 80)
{
A[7, 1] = "";
A[7, 2] = "";
}
else
{
if (VlocationX ==
200 && VlocationY == 176)
{
A[8, 1] = "";
A[8, 2] = "";
A[8, 3] = "";
}
else
{
if (VlocationX ==
200 && VlocationY == 272)
{
A[9, 1] = "";
A[9, 2] = "";
}
}
}
}
}
}
}
}
}
}
//****************************************
private
void SubCondition(string
idx )
{
vobject.Cursor =
Cursors.Default;
vstate = 0;
if (idx == "1")
subcursor1(lb11,
lb12, lb13, lb14);
else
{
if (idx == "2")
subcursor1(lb21,
lb22, lb23, lb24);
else
{
if (idx == "3")
subcursor1(lb31,
lb32, lb33, lb34);
else
{
if (idx == "4")
subcursor1(lb41,
lb42, lb43, lb44);
else
{
if (idx == "5")
subcursor1(lb51,
lb52, lb53, lb54);
else
{
if (idx == "6")
subcursor1(lb61,
lb62, lb63, lb64);
else
{
if (idx == "7")
subcursor1(lb71,
lb72, lb73, lb74);
else
{
if (idx == "8")
subcursor1(lb81,
lb82, lb83, lb84);
else
{
if (idx == "9")
subcursor1(lb91,
lb92, lb93, lb94);
}
}
}
}
}
}
}
}
}
private
void Calcul_Value(string
indx, int VarX,
int VarY)
{
if
(G_Flag[System.Convert.ToInt16(indx)] ==
false)
{
G_Flag[System.Convert.ToInt16(indx)] =
true;
}
if (VarX == 8 &&
VarY == 80)
{
G_Box[System.Convert.ToInt16(indx)] = "1";
switch(indx)
{
case "1":
A[1, 1] =
lb13.Text;
A[1, 2] =
lb14.Text;
break;
case "2":
A[1, 1] =
lb23.Text;
A[1, 2] =
lb24.Text;
break;
case "3":
A[1, 1] =
lb33.Text;
A[1, 2] =
lb34.Text;
break;
case "4":
A[1, 1] =
lb43.Text;
A[1, 2] =
lb44.Text;
break;
case "5":
A[1, 1] =
lb53.Text;
A[1, 2] =
lb54.Text;
break;
case "6":
A[1, 1] =
lb63.Text;
A[1, 2] =
lb64.Text;
break;
case "7":
A[1, 1] =
lb73.Text;
A[1, 2] =
lb74.Text;
break;
case "8":
A[1, 1] =
lb83.Text;
A[1, 2] =
lb84.Text;
break;
case "9":
A[1, 1] =
lb93.Text;
A[1, 2] =
lb94.Text;
break;
}
}
else
{
if (VarX == 8 &&
VarY == 176)
{
G_Box[System.Convert.ToInt16(indx)] = "2";
switch(indx)
{
case "1":
A[2, 1] =
lb11.Text;
A[2, 2] =
lb13.Text;
A[2, 3] =
lb14.Text;
break;
case "2":
A[2, 1] =
lb21.Text;
A[2, 2] =
lb23.Text;
A[2, 3] =
lb24.Text;
break;
case "3":
A[2, 1] =
lb31.Text;
A[2, 2] =
lb33.Text;
A[2, 3] =
lb34.Text;
break;
case "4":
A[2, 1] =
lb41.Text;
A[2, 2] =
lb43.Text;
A[2, 3] =
lb44.Text;
break;
case "5":
A[2, 1] =
lb51.Text;
A[2, 2] =
lb53.Text;
A[2, 3] =
lb54.Text;
break;
case "6":
A[2, 1] =
lb61.Text;
A[2, 2] =
lb63.Text;
A[2, 3] =
lb64.Text;
break;
case "7":
A[2, 1] =
lb71.Text;
A[2, 2] =
lb73.Text;
A[2, 3] =
lb74.Text;
break;
case "8":
A[2, 1] =
lb81.Text;
A[2, 2] =
lb83.Text;
A[2, 3] =
lb84.Text;
break;
case "9":
A[2, 1] =
lb91.Text;
A[2, 2] =
lb93.Text;
A[2, 3] =
lb94.Text;
break;
}
}
else
{
if (VarX == 8 &&
VarY == 272)
{
G_Box[System.Convert.ToInt16(indx)] = "3";
switch(indx)
{
case "1":
A[3, 1] =
lb11.Text;
A[3, 2] =
lb14.Text;
break;
case "2":
A[3, 1] =
lb21.Text;
A[3, 2] =
lb24.Text;
break;
case "3":
A[3, 1] =
lb31.Text;
A[3, 2] =
lb34.Text;
break;
case "4":
A[3, 1] =
lb41.Text;
A[3, 2] =
lb44.Text;
break;
case "5":
A[3, 1] =
lb51.Text;
A[3, 2] =
lb54.Text;
break;
case "6":
A[3, 1] =
lb61.Text;
A[3, 2] =
lb64.Text;
break;
case "7":
A[3, 1] =
lb71.Text;
A[3, 2] =
lb74.Text;
break;
case "8":
A[3, 1] =
lb81.Text;
A[3, 2] =
lb84.Text;
break;
case "9":
A[3, 1] =
lb91.Text;
A[3, 2] =
lb94.Text;
break;
}
}
else
{
if (VarX == 104 &&
VarY == 80)
{
G_Box[System.Convert.ToInt16(indx)] = "4";
switch(indx)
{
case "1":
A[4, 1] =
lb12.Text;
A[4, 2] =
lb13.Text;
A[4, 3] =
lb14.Text;
break;
case "2":
A[4, 1] =
lb22.Text;
A[4, 2] =
lb23.Text;
A[4, 3] =
lb24.Text;
break;
case "3":
A[4, 1] =
lb32.Text;
A[4, 2] =
lb33.Text;
A[4, 3] =
lb34.Text;
break;
case "4":
A[4, 1] =
lb42.Text;
A[4, 2] =
lb43.Text;
A[4, 3] =
lb44.Text;
break;
case "5":
A[4, 1] =
lb52.Text;
A[4, 2] =
lb53.Text;
A[4, 3] =
lb54.Text;
break;
case "6":
A[4, 1] =
lb62.Text;
A[4, 2] =
lb63.Text;
A[4, 3] =
lb64.Text;
break;
case "7":
A[4, 1] =
lb72.Text;
A[4, 2] =
lb73.Text;
A[4, 3] =
lb74.Text;
break;
case "8":
A[4, 1] =
lb82.Text;
A[4, 2] =
lb83.Text;
A[4, 3] =
lb84.Text;
break;
case "9":
A[4, 1] =
lb92.Text;
A[4, 2] =
lb93.Text;
A[4, 3] =
lb94.Text;
break;
}
}
else
{
if (VarX == 104 &&
VarY == 176)
{
G_Box[System.Convert.ToInt16(indx)] = "5";
switch(indx)
{
case "1":
A[5, 1] =
lb11.Text;
A[5, 2] =
lb12.Text;
A[5, 3] =
lb13.Text;
A[5, 4] =
lb14.Text;
break;
case "2":
A[5, 1] =
lb21.Text;
A[5, 2] =
lb22.Text;
A[5, 3] =
lb23.Text;
A[5, 4] =
lb24.Text;
break;
case "3":
A[5, 1] =
lb31.Text;
A[5, 2] =
lb32.Text;
A[5, 3] =
lb33.Text;
A[5, 4] =
lb34.Text;
break;
case "4":
A[5, 1] =
lb41.Text;
A[5, 2] =
lb42.Text;
A[5, 3] =
lb43.Text;
A[5, 4] =
lb44.Text;
break;
case "5":
A[5, 1] =
lb51.Text;
A[5, 2] =
lb52.Text;
A[5, 3] =
lb53.Text;
A[5, 4] =
lb54.Text;
break;
case "6":
A[5, 1] =
lb61.Text;
A[5, 2] =
lb62.Text;
A[5, 3] =
lb63.Text;
A[5, 4] =
lb64.Text;
break;
case "7":
A[5, 1] =
lb71.Text;
A[5, 2] =
lb72.Text;
A[5, 3] =
lb73.Text;
A[5, 4] =
lb74.Text;
break;
case "8":
A[5, 1] =
lb81.Text;
A[5, 2] =
lb82.Text;
A[5, 3] =
lb83.Text;
A[5, 4] =
lb84.Text;
break;
case "9":
A[5, 1] =
lb91.Text;
A[5, 2] =
lb92.Text;
A[5, 3] =
lb93.Text;
A[5, 4] =
lb94.Text;
break;
}
}
else
{
if (VarX == 104 &&
VarY == 272)
{
G_Box[System.Convert.ToInt16(indx)] = "6";
switch(indx)
{
case "1":
A[6, 1] =
lb11.Text;
A[6, 2] =
lb12.Text;
A[6, 3] =
lb14.Text;
break;
case "2":
A[6, 1] =
lb21.Text;
A[6, 2] =
lb22.Text;
A[6, 3] =
lb24.Text;
break;
case "3":
A[6, 1] =
lb31.Text;
A[6, 2] =
lb32.Text;
A[6, 3] =
lb34.Text;
break;
case "4":
A[6, 1] =
lb41.Text;
A[6, 2] =
lb42.Text;
A[6, 3] =
lb44.Text;
break;
case "5":
A[6, 1] =
lb51.Text;
A[6, 2] =
lb52.Text;
A[6, 3] =
lb54.Text;
break;
case "6":
A[6, 1] =
lb61.Text;
A[6, 2] =
lb62.Text;
A[6, 3] =
lb64.Text;
break;
case "7":
A[6, 1] =
lb71.Text;
A[6, 2] =
lb72.Text;
A[6, 3] =
lb74.Text;
break;
case "8":
A[6, 1] =
lb81.Text;
A[6, 2] =
lb82.Text;
A[6, 3] =
lb84.Text;
break;
case "9":
A[6, 1] =
lb91.Text;
A[6, 2] =
lb92.Text;
A[6, 3] =
lb94.Text;
break;
}
}
else
{
if (VarX == 200 &&
VarY == 80)
{
G_Box[System.Convert.ToInt16(indx)] = "7";
switch(indx)
{
case "1":
A[7, 1] =
lb12.Text;
A[7, 2] =
lb13.Text;
break;
case "2":
A[7, 1] =
lb22.Text;
A[7, 2] =
lb23.Text;
break;
case "3":
A[7, 1] =
lb32.Text;
A[7, 2] =
lb33.Text;
break;
case "4":
A[7, 1] =
lb42.Text;
A[7, 2] =
lb43.Text;
break;
case "5":
A[7, 1] =
lb52.Text;
A[7, 2] =
lb53.Text;
break;
case "6":
A[7, 1] =
lb62.Text;
A[7, 2] =
lb63.Text;
break;
case "7":
A[7, 1] =
lb72.Text;
A[7, 2] =
lb73.Text;
break;
case "8":
A[7, 1] =
lb82.Text;
A[7, 2] =
lb83.Text;
break;
case "9":
A[7, 1] =
lb92.Text;
A[7, 2] =
lb93.Text;
break;
}
}
else
{
if (VarX == 200 &&
VarY == 176)
{
G_Box[System.Convert.ToInt16(indx)] = "8";
switch(indx)
{
case "1":
A[8, 1] =
lb11.Text;
A[8, 2] =
lb12.Text;
A[8, 3] =
lb13.Text;
break;
case "2":
A[8, 1] =
lb21.Text;
A[8, 2] =
lb22.Text;
A[8, 3] =
lb23.Text;
break;
case "3":
A[8, 1] =
lb31.Text;
A[8, 2] =
lb32.Text;
A[8, 3] =
lb33.Text;
break;
case "4":
A[8, 1] =
lb41.Text;
A[8, 2] =
lb42.Text;
A[8, 3] =
lb43.Text;
break;
case "5":
A[8, 1] =
lb51.Text;
A[8, 2] =
lb52.Text;
A[8, 3] =
lb53.Text;
break;
case "6":
A[8, 1] =
lb61.Text;
A[8, 2] =
lb62.Text;
A[8, 3] =
lb63.Text;
break;
case "7":
A[8, 1] =
lb71.Text;
A[8, 2] =
lb72.Text;
A[8, 3] =
lb73.Text;
break;
case "8":
A[8, 1] =
lb81.Text;
A[8, 2] =
lb82.Text;
A[8, 3] =
lb83.Text;
break;
case "9":
A[8, 1] =
lb91.Text;
A[8, 2] =
lb92.Text;
A[8, 3] =
lb93.Text;
break;
}
}
else
{
if (VarX == 200 &&
VarY == 272)
{
G_Box[System.Convert.ToInt16(indx)] = "9";
switch(indx)
{
case "1":
A[9, 1] =
lb11.Text;
A[9, 2] =
lb12.Text;
break;
case "2":
A[9, 1] =
lb21.Text;
A[9, 2] =
lb22.Text;
break;
case "3":
A[9, 1] =
lb31.Text;
A[9, 2] =
lb32.Text;
break;
case "4":
A[9, 1] =
lb41.Text;
A[9, 2] =
lb42.Text;
break;
case "5":
A[9, 1] =
lb51.Text;
A[9, 2] =
lb52.Text;
break;
case "6":
A[9, 1] =
lb61.Text;
A[9, 2] =
lb62.Text;
break;
case "7":
A[9, 1] =
lb71.Text;
A[9, 2] =
lb72.Text;
break;
case "8":
A[9, 1] =
lb81.Text;
A[9, 2] =
lb82.Text;
break;
case "9":
A[9, 1] =
lb91.Text;
A[9, 2] =
lb92.Text;
break;
}
}
}
}
}
}
}
}
}
}
}
//Test, Equal Values
private
void Equal_Value(string
indx, int VarX,
int VarY)
{
if (VarX == 8 &&
VarY == 80)
{
if (A[2, 1] != "")
{
if (A[1, 1] != A[2,
1])
{
A[1, 1] = "";
A[1, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[4, 1] != "")
{
if (A[1, 2] != A[4,
1])
{
A[1, 1] = "";
A[1, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 8 &&
VarY == 176)
{
if (A[1, 1] != "")
{
if (A[2, 1] != A[1,
1])
{
A[2, 1] = "";
A[2, 2] = "";
A[2, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[3, 1] != "")
{
if (A[2, 2] != A[3,
1])
{
A[2, 1] = "";
A[2, 2] = "";
A[2, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[5, 2] != "")
{
if (A[2, 3] != A[5,
2])
{
A[2, 1] = "";
A[2, 2] = "";
A[2, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 8 &&
VarY == 272)
{
if (A[2, 2] != "")
{
if (A[3, 1] != A[2,
2])
{
A[3, 1] = "";
A[3, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[6, 2] != "")
{
if (A[3, 2] != A[6,
2])
{
A[3, 1] = "";
A[3, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 104 &&
VarY == 80)
{
if (A[1, 2] != "")
{
if (A[4, 1] != A[1,
2])
{
A[4, 1] = "";
A[4, 2] = "";
A[4, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[5, 1] != "")
{
if (A[4, 2] != A[5,
1])
{
A[4, 1] = "";
A[4, 2] = "";
A[4, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[7, 1] != "")
{
if (A[4, 3] != A[7,
1])
{
A[4, 1] = "";
A[4, 2] = "";
A[4, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 104 &&
VarY == 176)
{
if (A[4, 2] != "")
{
if (A[5, 1] != A[4,
2])
{
A[5, 1] = "";
A[5, 2] = "";
A[5, 3] = "";
A[5, 4] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[2, 3] != "")
{
if (A[5, 2] != A[2,
3])
{
A[5, 1] = "";
A[5, 2] = "";
A[5, 3] = "";
A[5, 4] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[6, 1] != "")
{
if (A[5, 3] != A[6,
1])
{
A[5, 1] = "";
A[5, 2] = "";
A[5, 3] = "";
A[5, 4] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[8, 2] != "")
{
if (A[5, 4] != A[8,
2])
{
A[5, 1] = "";
A[5, 2] = "";
A[5, 3] = "";
A[5, 4] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 104 &&
VarY == 272)
{
if (A[5, 3] != "")
{
if (A[6, 1] != A[5,
3])
{
A[6, 1] = "";
A[6, 2] = "";
A[6, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[3, 2] != "")
{
if (A[6, 2] != A[3,
2])
{
A[6, 1] = "";
A[6, 2] = "";
A[6, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[9, 2] != "")
{
if (A[6, 3] != A[9,
2])
{
A[6, 1] = "";
A[6, 2] = "";
A[6, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 200 &&
VarY == 80)
{
if (A[4, 3] != "")
{
if (A[7, 1] != A[4,
3])
{
A[7, 1] = "";
A[7, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[8, 1] != "")
{
if (A[7, 2] != A[8,
1])
{
A[7, 1] = "";
A[7, 2] = "";
//Resultat, Equal Values //Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 200 &&
VarY == 176)
{
if (A[7, 2] != "")
{
if (A[8, 1] != A[7,
2])
{
A[8, 1] = "";
A[8, 2] = "";
A[8, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[5, 4] != "")
{
if (A[8, 2] != A[5,
4])
{
A[8, 1] = "";
A[8, 2] = "";
A[8, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[9, 1] != "")
{
if (A[8, 3] != A[9,
1])
{
A[8, 1] = "";
A[8, 2] = "";
A[8, 3] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
else
{
if (VarX == 200 &&
VarY == 272)
{
if (A[8, 3] != "")
{
if (A[9, 1] != A[8,
3])
{
A[9, 1] = "";
A[9, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
if (A[6, 3] != "")
{
if (A[9, 2] != A[6,
3])
{
A[9, 1] = "";
A[9, 2] = "";
//Resultat, Equal Values
Pt_Equal(indx);
}
}
}
}
}
}
}
}
}
}
}
}
//Resultat, Equal Values
private
void Pt_Equal(string
Vindx)
{
SubCondition(Vindx);
// Move to
vobject.SetBounds((LP[System.Convert.ToInt16(Vindx),
1]), (LP[System.Convert.ToInt16(Vindx), 2]), 96, 96);
LSelect.Text =
"Equal, operation is aborted";
}
//Labels ...
private
void lb11_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel1_MouseUp(sender,
e);
}
private
void lb12_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel1_MouseUp(sender,
e);
}
private
void lb13_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel1_MouseUp(sender,
e);
}
private
void lb14_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel1_MouseUp(sender,
e);
}
private
void lb21_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel2_MouseUp(sender,
e);
}
private
void lb22_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel2_MouseUp(sender,
e);
}
private
void lb23_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel2_MouseUp(sender,
e);
}
private
void lb24_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel2_MouseUp(sender,
e);
}
private
void lb31_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel3_MouseUp(sender,
e);
}
private
void lb32_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel3_MouseUp(sender,
e);
}
private
void lb33_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel3_MouseUp(sender,
e);
}
private
void lb34_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel3_MouseUp(sender,
e);
}
private
void lb41_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel4_MouseUp(sender,
e);
}
private
void lb42_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel4_MouseUp(sender,
e);
}
private
void lb43_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel4_MouseUp(sender,
e);
}
private
void lb44_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel4_MouseUp(sender,
e);
}
private
void lb51_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel5_MouseUp(sender,
e);
}
private
void lb52_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel5_MouseUp(sender,
e);
}
private
void lb53_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel5_MouseUp(sender,
e);
}
private
void lb54_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel5_MouseUp(sender,
e);
}
private
void lb61_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel6_MouseUp(sender,
e);
}
private
void lb62_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel6_MouseUp(sender,
e);
}
private
void lb63_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel6_MouseUp(sender,
e);
}
private
void lb64_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel6_MouseUp(sender,
e);
}
private
void lb71_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel7_MouseUp(sender,
e);
}
private
void lb72_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel7_MouseUp(sender,
e);
}
private
void lb73_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel7_MouseUp(sender,
e);
}
private
void lb74_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel7_MouseUp(sender,
e);
}
private
void lb81_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel8_MouseUp(sender,
e);
}
private
void lb82_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel8_MouseUp(sender,
e);
}
private
void lb83_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel8_MouseUp(sender,
e);
}
private
void lb84_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel8_MouseUp(sender,
e);
}
private
void lb91_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel9_MouseUp(sender,
e);
}
private
void lb92_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel9_MouseUp(sender,
e);
}
private
void lb93_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel9_MouseUp(sender,
e);
}
private
void lb94_MouseUp(object
sender, System.Windows.Forms.MouseEventArgs e)
{
this.Panel9_MouseUp(sender,
e);
}
private
void Timer2_Tick(object
sender, System.EventArgs e)
{
// Random values
Random randomc71 =
new Random();
Random randomc72 =
new Random();
Random randomc73 =
new Random();
Random randomc74 =
new Random();
Random randomc91 =
new Random();
Random randomc92 =
new Random();
Random randomc93 =
new Random();
Random randomc94 =
new Random();
int crnd71, crnd72,
crnd73, crnd74;
int crnd91, crnd92,
crnd93, crnd94;
if (TimerFlag)
{
// Panel7, G7[] array
crnd71 =
randomc71.Next(100);
if
(System.Convert.ToInt16(crnd71/9) > 0 &&
System.Convert.ToInt16(crnd71/9) < 10)
G7[1] =
System.Convert.ToInt16(crnd71/9);
crnd72 =
randomc72.Next(200);
if
(System.Convert.ToInt16(crnd72/9) > 0 &&
System.Convert.ToInt16(crnd72/9) < 10)
G7[2] =
System.Convert.ToInt16(crnd72/9);
crnd73 =
randomc73.Next(400);
if
(System.Convert.ToInt16(crnd73/9) > 0 &&
System.Convert.ToInt16(crnd73/9) < 10)
G7[3] =
System.Convert.ToInt16(crnd73/9);
crnd74 =
randomc74.Next(300);
if
(System.Convert.ToInt16(crnd74/9) > 0 &&
System.Convert.ToInt16(crnd74/9) < 10)
G7[4] =
System.Convert.ToInt16(crnd74/9);
lb71.Text =
G7[1].ToString();
lb72.Text =
G7[2].ToString();
lb73.Text =
G7[3].ToString();
lb74.Text =
G7[4].ToString();
// Panel9, G9[] array
crnd91 =
randomc91.Next(500);
if
(System.Convert.ToInt16(crnd91/9) > 0 &&
System.Convert.ToInt16(crnd91/9) < 10)
G9[1] =
System.Convert.ToInt16(crnd91/9);
crnd92 =
randomc92.Next(200);
if
(System.Convert.ToInt16(crnd92/9) > 0 &&
System.Convert.ToInt16(crnd92/9) < 10)
G9[2] =
System.Convert.ToInt16(crnd92/9);
crnd93 =
randomc93.Next(400);
if
(System.Convert.ToInt16(crnd93/9) > 0 &&
System.Convert.ToInt16(crnd93/9) < 10)
G9[3] =
System.Convert.ToInt16(crnd93/9);
crnd94 =
randomc94.Next(300);
if
(System.Convert.ToInt16(crnd94/9) > 0 &&
System.Convert.ToInt16(crnd94/9) < 10)
G9[4] =
System.Convert.ToInt16(crnd94/9);
lb91.Text =
G9[1].ToString();
lb92.Text =
G9[2].ToString();
lb93.Text =
G9[3].ToString();
lb94.Text =
G9[4].ToString();
}
}
private
void Timer3_Tick(object
sender, System.EventArgs e)
{
// Random values
Random randomc21 =
new Random();
Random randomc22 =
new Random();
Random randomc23 =
new Random();
Random randomc24 =
new Random();
Random randomc41 =
new Random();
Random randomc42 =
new Random();
Random randomc43 =
new Random();
Random randomc44 =
new Random();
int crnd21, crnd22,
crnd23, crnd24;
int crnd41, crnd42,
crnd43, crnd44;
if (TimerFlag)
{
// Panel2, G2[] array
crnd21 =
randomc21.Next(200);
if
(System.Convert.ToInt16(crnd21/9) > 0 &&
System.Convert.ToInt16(crnd21/9) < 10)
G2[1] =
System.Convert.ToInt16(crnd21/9);
crnd22 =
randomc22.Next(300);
if
(System.Convert.ToInt16(crnd22/9) > 0 &&
System.Convert.ToInt16(crnd22/9) < 10)
G2[2] =
System.Convert.ToInt16(crnd22/9);
crnd23 =
randomc23.Next(400);
if
(System.Convert.ToInt16(crnd23/9) > 0 &&
System.Convert.ToInt16(crnd23/9) < 10)
G2[3] =
System.Convert.ToInt16(crnd23/9);
crnd24 =
randomc24.Next(500);
if
(System.Convert.ToInt16(crnd24/9) > 0 &&
System.Convert.ToInt16(crnd24/9) < 10)
G2[4] =
System.Convert.ToInt16(crnd24/9);
lb21.Text =
G2[1].ToString();
lb22.Text =
G2[2].ToString();
lb23.Text =
G2[3].ToString();
lb24.Text =
G2[4].ToString();
// Panel4, G4[] array
crnd41 =
randomc41.Next(300);
if
(System.Convert.ToInt16(crnd41/9) > 0 &&
System.Convert.ToInt16(crnd41/9) < 10)
G4[1] =
System.Convert.ToInt16(crnd41/9);
crnd42 =
randomc42.Next(400);
if
(System.Convert.ToInt16(crnd42/9) > 0 &&
System.Convert.ToInt16(crnd42/9) < 10)
G4[2] =
System.Convert.ToInt16(crnd42/9);
crnd43 =
randomc43.Next(500);
if
(System.Convert.ToInt16(crnd43/9) > 0 &&
System.Convert.ToInt16(crnd43/9) < 10)
G4[3] =
System.Convert.ToInt16(crnd43/9);
crnd44 =
randomc44.Next(100);
if
(System.Convert.ToInt16(crnd44/9) > 0 &&
System.Convert.ToInt16(crnd44/9) < 10)
G4[4] =
System.Convert.ToInt16(crnd44/9);
lb41.Text =
G4[1].ToString();
lb42.Text =
G4[2].ToString();
lb43.Text =
G4[3].ToString();
lb44.Text =
G4[4].ToString();
}
}
private
void Timer4_Tick(object
sender, System.EventArgs e)
{
// Random values
Random randomc61 =
new Random();
Random randomc62 =
new Random();
Random randomc63 =
new Random();
Random randomc64 =
new Random();
Random randomc81 =
new Random();
Random randomc82 =
new Random();
Random randomc83 =
new Random();
Random randomc84 =
new Random();
int crnd61, crnd62,
crnd63, crnd64;
int crnd81, crnd82,
crnd83, crnd84;
if (TimerFlag)
{
// Panel6, G6[] array
crnd61 =
randomc61.Next(200);
if
(System.Convert.ToInt16(crnd61/9) > 0 &&
System.Convert.ToInt16(crnd61/9) < 10)
G6[1] =
System.Convert.ToInt16(crnd61/9);
crnd62 =
randomc62.Next(400);
if
(System.Convert.ToInt16(crnd62/9) > 0 &&
System.Convert.ToInt16(crnd62/9) < 10)
G6[2] =
System.Convert.ToInt16(crnd62/9);
crnd63 =
randomc63.Next(100);
if
(System.Convert.ToInt16(crnd63/9) > 0 &&
System.Convert.ToInt16(crnd63/9) < 10)
G6[3] =
System.Convert.ToInt16(crnd63/9);
crnd64 =
randomc64.Next(300);
if
(System.Convert.ToInt16(crnd64/9) > 0 &&
System.Convert.ToInt16(crnd64/9) < 10)
G6[4] =
System.Convert.ToInt16(crnd64/9);
lb61.Text =
G6[1].ToString();
lb62.Text =
G6[2].ToString();
lb63.Text =
G6[3].ToString();
lb64.Text =
G6[4].ToString();
// Panel8, G8[] array
crnd81 =
randomc81.Next(400);
if
(System.Convert.ToInt16(crnd81/9) > 0 &&
System.Convert.ToInt16(crnd81/9) < 10)
G8[1] =
System.Convert.ToInt16(crnd81/9);
crnd82 =
randomc82.Next(500);
if
(System.Convert.ToInt16(crnd82/9) > 0 &&
System.Convert.ToInt16(crnd82/9) < 10)
G8[2] =
System.Convert.ToInt16(crnd82/9);
crnd83 =
randomc83.Next(300);
if
(System.Convert.ToInt16(crnd83/9) > 0 &&
System.Convert.ToInt16(crnd83/9) < 10)
G8[3] =
System.Convert.ToInt16(crnd83/9);
crnd84 =
randomc84.Next(200);
if
(System.Convert.ToInt16(crnd84/9) > 0 &&
System.Convert.ToInt16(crnd84/9) < 10)
G8[4] =
System.Convert.ToInt16(crnd84/9);
lb81.Text =
G8[1].ToString();
lb82.Text =
G8[2].ToString();
lb83.Text =
G8[3].ToString();
lb84.Text =
G8[4].ToString();
}
}
private
void Timer1_Tick(object
sender, System.EventArgs e)
{
// Random values
Random randomc11 =
new Random();
Random randomc12 =
new Random();
Random randomc13 =
new Random();
Random randomc14 =
new Random();
Random randomc31 =
new Random();
Random randomc32 =
new Random();
Random randomc33 =
new Random();
Random randomc34 =
new Random();
Random randomc51 =
new Random();
Random randomc52 =
new Random();
Random randomc53 =
new Random();
Random randomc54 =
new Random();
int crnd11, crnd12,
crnd13, crnd14;
int crnd31, crnd32,
crnd33, crnd34;
int crnd51, crnd52,
crnd53, crnd54;
if (TimerFlag)
{
// Panel1, G1[] array
crnd11 =
randomc11.Next(100);
if
(System.Convert.ToInt16(crnd11/9) > 0 &&
System.Convert.ToInt16(crnd11/9) < 10)
G1[1] =
System.Convert.ToInt16(crnd11/9);
crnd12 =
randomc12.Next(200);
if
(System.Convert.ToInt16(crnd12/9) > 0 &&
System.Convert.ToInt16(crnd12/9) < 10)
G1[2] =
System.Convert.ToInt16(crnd12/9);
crnd13 =
randomc13.Next(300);
if
(System.Convert.ToInt16(crnd13/9) > 0 &&
System.Convert.ToInt16(crnd13/9) < 10)
G1[3] =
System.Convert.ToInt16(crnd13/9);
crnd14 =
randomc14.Next(400);
if
(System.Convert.ToInt16(crnd14/9) > 0 &&
System.Convert.ToInt16(crnd14/9) < 10)
G1[4] =
System.Convert.ToInt16(crnd14/9);
lb11.Text =
G1[1].ToString();
lb12.Text =
G1[2].ToString();
lb13.Text =
G1[3].ToString();
lb14.Text =
G1[4].ToString();
// Panel3, G3[] array
crnd31 =
randomc31.Next(500);
if
(System.Convert.ToInt16(crnd31/9) > 0 &&
System.Convert.ToInt16(crnd31/9) < 10)
G3[1] =
System.Convert.ToInt16(crnd31/9);
crnd32 =
randomc32.Next(200);
if
(System.Convert.ToInt16(crnd32/9) > 0 &&
System.Convert.ToInt16(crnd32/9) < 10)
G3[2] =
System.Convert.ToInt16(crnd32/9);
crnd33 =
randomc33.Next(300);
if
(System.Convert.ToInt16(crnd33/9) > 0 &&
System.Convert.ToInt16(crnd33/9) < 10)
G3[3] =
System.Convert.ToInt16(crnd33/9);
crnd34 =
randomc34.Next(400);
if
(System.Convert.ToInt16(crnd34/9) > 0 &&
System.Convert.ToInt16(crnd34/9) < 10)
G3[4] =
System.Convert.ToInt16(crnd34/9);
lb31.Text =
G3[1].ToString();
lb32.Text =
G3[2].ToString();
lb33.Text =
G3[3].ToString();
lb34.Text =
G3[4].ToString();
// Panel5, G5[] array
crnd51 =
randomc51.Next(400);
if
(System.Convert.ToInt16(crnd51/9) > 0 &&
System.Convert.ToInt16(crnd51/9) < 10)
G5[1] =
System.Convert.ToInt16(crnd51/9);
crnd52 =
randomc52.Next(300);
if
(System.Convert.ToInt16(crnd52/9) > 0 &&
System.Convert.ToInt16(crnd52/9) < 10)
G5[2] =
System.Convert.ToInt16(crnd52/9);
crnd53 =
randomc53.Next(200);
if
(System.Convert.ToInt16(crnd53/9) > 0 &&
System.Convert.ToInt16(crnd53/9) < 10)
G5[3] =
System.Convert.ToInt16(crnd53/9);
crnd54 =
randomc54.Next(100);
if
(System.Convert.ToInt16(crnd54/9) > 0 &&
System.Convert.ToInt16(crnd54/9) < 10)
G5[4] =
System.Convert.ToInt16(crnd54/9);
lb51.Text =
G5[1].ToString();
lb52.Text =
G5[2].ToString();
lb53.Text =
G5[3].ToString();
lb54.Text =
G5[4].ToString();
}
}
private
void
Timer_clock_Tick(object
sender, System.EventArgs e)
{
// Clock
vtime =
System.DateTime.Now;
this.ltime1.Text =
System.DateTime.Now.ToLongTimeString();
// Timer Interval
int vinterval_game;
vinterval_game =
((vtime.Hour* 60* 60) + (vtime.Minute * 60) + vtime.Second)
- ((New_Game_interval.Hour* 60* 60) + (New_Game_interval.Minute
* 60) + New_Game_interval.Second);
if (Flg_Time)
LInterval.Text =
vinterval_game.ToString() + " Sec";
// Stop The Load
if (TimerFlag)
{
int vinterval_load;
vinterval_load =
((vtime.Hour* 60* 60) + (vtime.Minute * 60) + vtime.Second)
- ((New_Game_BTime.Hour* 60* 60) + (New_Game_BTime.Minute
* 60) + New_Game_BTime.Second);
if (vinterval_load >
4)
Stop_Load();
}
if (FaceGametest)
FaceGame_test();
}
// **********************************************
private
void GoodSub(bool
good_Operation)
{
if (good_Operation
== true)
{
FaceGametest =
false;
this.Lwelcome.Text
= " ";
Vcount = 1;
Timer_Welcome.Enabled =
true;
this.PWelcome.Location
= new
System.Drawing.Point(8, 80);
this.PPicture1.Location
= new
System.Drawing.Point(320, 80);
this.PictureBox2.Visible
= false;
this.PictureBox3.Visible
= false;
Welcome_Flag =
false;
TheGood_Flag =
true;
}
else
{
this.LTImer.Visible
= false;
this.LInterval.Visible
= false;
Timer_Welcome.Enabled =
false;
this.PWelcome.Location
= new
System.Drawing.Point(8, 464);
this.PPicture1.Location
= new
System.Drawing.Point(504, 464);
Welcome_Flag =
false;
TheGood_Flag =
false;
}
}
private
void
ToolBar1_ButtonClick(object
sender, System.Windows.Forms.ToolBarButtonClickEventArgs
e)
{
switch(e.Button.ImageIndex)
{
case 0:
New_Game();
break;
case 1:
DemoForm ff =
new DemoForm();
ff.Show();
break;
case 2:
AboutForm f1 =
new AboutForm();
f1.Show();
break;
case 3:
Application.Exit();
break;
}
}
// Load New Game
*************************************************
public
void New_Game()
{
this.GoodSub(false);
// Initial Position
Initial = Initial
+ 1;
if (Initial == 0 ||
Initial == 8)
Initial = 1;
// New Game Load
New_Game_Sub();
}
// Stop Load
***************************************************
private
void Stop_Load()
{
// Load Timers
TimerFlag =
false;
Timer1.Enabled =
false;
Timer2.Enabled =
false;
Timer3.Enabled =
false;
Timer4.Enabled =
false;
// New Game, First Time after Load
vtime=
System.DateTime.Now;
New_Game_interval
= vtime;
// Panel2
lb22.Text =
G1[4].ToString();
lb23.Text =
G5[1].ToString();
lb24.Text =
G3[2].ToString();
// Panel4
lb41.Text =
G1[3].ToString();
lb43.Text =
G7[1].ToString();
lb44.Text =
G5[2].ToString();
// Panel6
lb61.Text =
G3[3].ToString();
lb62.Text =
G5[4].ToString();
lb63.Text =
G9[1].ToString();
// Panel8
lb81.Text =
G5[3].ToString();
lb82.Text =
G7[4].ToString();
lb84.Text =
G9[2].ToString();
// Initial Position
Initial_Position();
// New Game, Interval Timer Flag
Flg_Time =
true;
ToolBar1.Buttons[2].Enabled =
true;
LTImer.Visible =
true;
LInterval.Visible =
true;
LOne.Visible =
false;
// Timer Counter Format, Begin
LInterval.Text =
" --- 00:00:00 --- ";
Timer_Welcome.Enabled =
false;
Welcome_Flag =
false;
WelcomeSub(false);
}
private
void
TimerCircle_Tick(object
sender, System.EventArgs e)
{
// Show circle designs
CircleDemo();
}
// Show circle designs *********************************
private
void CircleDemo()
{
//Pens
Pen vPen1 =
new Pen(Color.Black,
3);
Pen vPen2 =
new Pen(Color.Azure,
3);
Pen vPen3 =
new Pen(Color.Blue,
3);
Pen vPen4 =
new Pen(Color.Red,
3);
int col1;
int col2;
// Colors
int col3;
int col4;
// Colors
int x1;
int y1;
int rd;
// Rectangle
// Random values
if (vrnd0 < 0 ||
vrnd0 > 2)
vrnd0 = 0.1;
else
vrnd0 = vrnd0 +
0.1;
// rgb Color
if
(System.Convert.ToInt16(125 * vrnd0) <= 255)
col1 =
System.Convert.ToInt16(125 * vrnd0);
else
col1 = 125;
if
(System.Convert.ToInt16(150 * vrnd0) <= 255)
col2 =
System.Convert.ToInt16(150 * vrnd0);
else
col2 = 150;
if
(System.Convert.ToInt16(155 * vrnd0) <= 255)
col3 =
System.Convert.ToInt16(155 * vrnd0);
else
col3 = 155;
if
(System.Convert.ToInt16(125 * vrnd0) <= 255)
col4 =
System.Convert.ToInt16(125 * vrnd0);
else
col4 = 125;
vPen1 =
new
Pen(Color.FromArgb(col1, col2, col3, col4), 3);
vPen2 =
new
Pen(Color.FromArgb(col2, col3, col4, col1), 3);
vPen3 =
new
Pen(Color.FromArgb(col3, col4, col1, col2), 3);
vPen4 =
new
Pen(Color.FromArgb(col4, col1, col2, col3), 3);
// Rectangle coord.
x1 =
this.PictureBox1.Width
/ 3;
y1 =
this.PictureBox1.Height
/ 3;
rd =
System.Convert.ToInt16(((x1 * 0.9) + 5) * vrnd0);
// Draw ellipses
// Graphics
ex =
this.PictureBox1.CreateGraphics();
// Draw ellipse to screen.
ex.DrawEllipse(vPen1, 0, 0, 2 * rd, 2 * rd);
ex.DrawEllipse(vPen2, 3 * x1, 0, -2 * rd, 2 * rd);
ex.DrawEllipse(vPen3, 0, 3 * y1, 2 * rd, -2 * rd);
ex.DrawEllipse(vPen4, 3 * x1, 3 * y1, -2 * rd, -2 * rd);
}
private
void
Timer_Welcome_Tick(object
sender, System.EventArgs e)
{
// Activate, Show the word - Welcome
if (Welcome_Flag ==
true)
Welcome_demo();
// Activate, Show the word - The Good
else
{
if (TheGood_Flag ==
true)
TheGood_demo();
}
}
// Show the word - Welcome
**********************************
private
void Welcome_demo()
{
if (Vcount < 0)
{
Vcount = Vcount +
1;
}
else
{
switch(Vcount)
{
case 1:
Lwelcome.Text =
"Welcome";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Olive;
Vcount = Vcount +
1;
break;
case 2:
Lwelcome.Text =
"W";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Navy;
Vcount = Vcount +
1;
break;
case 3:
Lwelcome.Text =
"We";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Red;
Vcount = Vcount +
1;
break;
case 4:
Lwelcome.Text = "Wel";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Teal;
Vcount = Vcount +
1;
break;
case 5:
Lwelcome.Text = "Welc";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Black;
Vcount = Vcount +
1;
break;
case 6:
Lwelcome.Text = "Welco";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Maroon;
Vcount = Vcount +
1;
break;
case 7:
Lwelcome.Text = "Welcom";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Blue;
Vcount = Vcount +
1;
break;
case 8:
Lwelcome.Text =
"Welcome";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Orchid;
Vcount = Vcount +
1;
break;
case 9:
Lwelcome.Text =
"Welcome ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Green;
Vcount = 1;
break;
}
}
}
// Show the Word - The Good
**********************************
private
void TheGood_demo()
{
switch(Vcount)
{
case 1:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Olive;
LInterval.BackColor = System.Drawing.Color.Olive;
this.PictureBox3.Visible
= false;
this.PictureBox2.Visible
= true;
Vcount = Vcount +
1;
break;
case 2:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Green;
LInterval.BackColor = System.Drawing.Color.Green;
this.PictureBox2.Visible
= false;
this.PictureBox3.Visible
= true;
Vcount = Vcount +
1;
break;
case 3:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Orchid;
LInterval.BackColor = System.Drawing.Color.Orchid;
this.PictureBox3.Visible
= false;
this.PictureBox2.Visible
= true;
Vcount = Vcount +
1;
break;
case 4:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Blue;
LInterval.BackColor = System.Drawing.Color.Blue;
this.PictureBox2.Visible
= false;
this.PictureBox3.Visible
= true;
Vcount = Vcount +
1;
break;
case 5:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Maroon;
LInterval.BackColor = System.Drawing.Color.Maroon;
this.PictureBox3.Visible
= false;
this.PictureBox2.Visible
= true;
Vcount = Vcount +
1;
break;
case 6:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Black;
LInterval.BackColor = System.Drawing.Color.Black;
this.PictureBox2.Visible
= false;
this.PictureBox3.Visible
= true;
Vcount = Vcount +
1;
break;
case 7:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Teal;
LInterval.BackColor = System.Drawing.Color.Teal;
this.PictureBox3.Visible
= false;
this.PictureBox2.Visible
= true;
Vcount = Vcount +
1;
break;
case 8:
Lwelcome.Text =
"The Good ...";
this.Lwelcome.Font
= new
System.Drawing.Font("Times New Roman", 26.25F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
this.Lwelcome.ForeColor
= System.Drawing.Color.Red;
LInterval.BackColor = System.Drawing.Color.Red;
this.PictureBox2.Visible
= false;
this.PictureBox3.Visible
= true;
Vcount = 1;
break;
}
}
// Test procedure *************************************
private
void FaceGame_test()
{
int Fcount;
Fcount = 0;
if
((Panel1.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel2.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel3.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel4.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel5.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel6.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel7.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel8.Location.X) <= 200)
Fcount = Fcount +
1;
if
((Panel9.Location.X) <= 200)
Fcount = Fcount +
1;
// Test if All Game Operations is Available
if (Fcount == 9)
{
// Stopped all Function under Timer_Interval
Flg_Time =
false;
this.GoodSub(true);
}
}
private
void
MenuItem2_Click_1(object
sender, System.EventArgs e)
{
New_Game();
}
private
void
MenuItem4_Click_1(object
sender, System.EventArgs e)
{
DemoForm ff =
new DemoForm();
ff.Show();
}
private
void
MenuItem6_Click_1(object
sender, System.EventArgs e)
{
AboutForm f1 =
new AboutForm();
f1.Show();
}
private
void
MenuItem8_Click_1(object
sender, System.EventArgs e)
{
Application.Exit();
}
}
} |