Visual J#.Net Forms - FaceGameNet.jsl and DemoForm.jsl, Text Codes
 
 
 

       
      Return

     
     FaceGameNet.jsl
     DemoForm.jsl


 

 The codes ...
   
1. FaceGameNet.jsl
 
package Face_Game_VJ_Net;

import System.Drawing.*;

import System.Collections.*;

import System.ComponentModel.*;

import System.Windows.Forms.*;

import System.Data.*;

/**

* Summary description for Form1.

*/

public class FaceGameNet extends System.Windows.Forms.Form

{

System.Windows.Forms.ToolBarButton ToolBarButton4;

System.Windows.Forms.ToolBarButton ToolBarButton5;

System.Windows.Forms.ToolBar ToolBar1;

System.Windows.Forms.ToolBarButton ToolBarButton1;

System.Windows.Forms.ToolBarButton ToolBarButton2;

System.Windows.Forms.ToolBarButton ToolBarButton3;

System.Windows.Forms.ToolBarButton ToolBarButton6;

System.Windows.Forms.ToolBarButton ToolBarButton7;

System.Windows.Forms.ToolBarButton ToolBarButton8;

System.Windows.Forms.ImageList ImageList1;

System.Windows.Forms.MenuItem MenuItem2;

System.Windows.Forms.MenuItem MenuItem3;

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;

public System.Windows.Forms.Label Line11;

public System.Windows.Forms.Label Line10;

public System.Windows.Forms.Label Line8;

System.Windows.Forms.MenuItem MenuItem4;

System.Windows.Forms.Timer TimerCircle;

System.Windows.Forms.Timer Timer_Welcome;

System.Windows.Forms.Timer Timer4;

public System.Windows.Forms.Label LTImer;

System.Windows.Forms.Timer Timer3;

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;

System.Windows.Forms.MenuItem MenuItem8;

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;

System.Windows.Forms.MenuItem MenuItem7;

System.Windows.Forms.MenuItem MenuItem5;

System.Windows.Forms.MenuItem MenuItem6;

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;

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;

System.Windows.Forms.Timer Timer2;

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;

public 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;

public System.Windows.Forms.Label LInterval;

public System.Windows.Forms.Label ltime1;

public 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;

public System.Windows.Forms.Timer Timer1;

public System.Windows.Forms.Timer Timer_clock;

public 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;

public 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.MenuItem MenuItem1;

public System.Windows.Forms.MainMenu MainMenu1;

public System.Windows.Forms.Label LSelect;

public System.Windows.Forms.Panel PPicture1;

public System.Windows.Forms.PictureBox PictureBox2;

public System.Windows.Forms.PictureBox PictureBox3;

public System.Windows.Forms.Panel PWelcome;

public System.Windows.Forms.Label Lwelcome;

public System.Windows.Forms.Panel PPicture;

public System.Windows.Forms.PictureBox PictureBox1;

private System.ComponentModel.IContainer components;

// Variables

System.Windows.Forms.Panel vobject;

// Graphic

Graphics ex;

System.DateTime vtime;

System.DateTime New_Game_BTime;

System.DateTime New_Game_interval;

boolean FaceGametest;

boolean Flg_Time;

boolean TimerFlag;

boolean Welcome_Flag;

boolean 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];

boolean[] G_Flag = new boolean[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

//

}

/**

* Clean up any resources being used.

*/

protected void Dispose(boolean disposing)

{

if (disposing)

{

if (components != null)

{

components.Dispose();

}

}

super.Dispose(disposing);

}


 

Windows Form Designer generated code

/**

* The main entry point for the application.

*/

/** @attribute System.STAThread() */

public static void main(String[] args)

{

Application.Run(new FaceGameNet());

}

private void FaceGameNet_Load (Object sender, System.EventArgs e)

{

Vcount = 0;

// Resize

// LWelcome

this.PWelcome.set_Height(290);

this.PWelcome.set_Width( 290);

this.Lwelcome.set_Top( (this.PWelcome.get_Height() - this.Lwelcome.get_Height()) / 2);

this.Lwelcome.set_Left( (this.PWelcome.get_Width() - this.Lwelcome.get_Width()) / 2);

// PictureBox1

this.PPicture.set_Height(290);

this.PPicture.set_Width( 290);

this.PictureBox1.set_Location( new System.Drawing.Point(0, 0));

this.PictureBox1.set_Height(this.PPicture.get_Height());

this.PictureBox1.set_Width(this.PPicture.get_Width());

this.PPicture1.set_Height(290);

this.PPicture1.set_Width( 290);

this.PictureBox2.set_Top( (this.PPicture1.get_Height() - this.PictureBox2.get_Height()) / 2);

this.PictureBox2.set_Left( (this.PPicture1.get_Width() - this.PictureBox2.get_Width()) / 2);

this.PictureBox3.set_Top( (this.PPicture1.get_Height() - this.PictureBox3.get_Height()) / 2);

this.PictureBox3.set_Left( (this.PPicture1.get_Width() - this.PictureBox3.get_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.set_Visible( true);

// Initial Position Sub

//***********************Initial_Flag = true;

Initial_Position();

// Start Timer Load, New Game

vtime= System.DateTime.get_Now();

New_Game_BTime = vtime;

Flg_Time = false;

TimerFlag = true;

Timer1.set_Enabled( true);

Timer2.set_Enabled( true);

Timer3.set_Enabled( true);

Timer4.set_Enabled( true);

}

//Show the word - Welcome *************************************

private void WelcomeSub(boolean weloperation)

{

if (weloperation == true)

{

// Graphics

ex = this.PictureBox1.CreateGraphics();

ex.Clear(SystemColors.get_Control());

ToolBar1.get_Buttons().get_Item(1).set_Enabled( false);

this.LTImer.set_Visible( false);

this.LInterval.set_Visible( false);

// Welcome

this.Lwelcome.set_Text( " ");

Vcount = 1;

this.PWelcome.set_Location( new System.Drawing.Point(8, 80));

Timer_Welcome.set_Enabled( true);

Welcome_Flag = true;

// Circle

this.PPicture.set_Location( new System.Drawing.Point(320, 80));

TimerCircle.set_Enabled( true);

}

else

{

if (weloperation == false)

{

ToolBar1.get_Buttons().get_Item(1).set_Enabled( true);

this.LTImer.set_Visible( true);

this.LInterval.set_Text( " ");

this.LInterval.set_BackColor( SystemColors.get_Desktop());

this.LInterval.set_Visible( true);

// Welcome

this.PWelcome.set_Location( new System.Drawing.Point(8, 464));

Timer_Welcome.set_Enabled( false);

Welcome_Flag = false;

// Circle

this.PPicture.set_Location( new System.Drawing.Point(264, 464));

TimerCircle.set_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.get_Button().Equals(MouseButtons.Left))

{

vobject.set_Cursor( Cursors.get_No());

vstate = 1;

VlocationX = vobject.get_Location().get_X();

VlocationY = vobject.get_Location().get_Y();

}

else

{

if (ve.get_Button().Equals(MouseButtons.Right))

{

vstate = 0;

vobject.set_Cursor( Cursors.get_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.set_Cursor( vobject.get_Cursor());

vlb2.set_Cursor( vobject.get_Cursor());

vlb3.set_Cursor( vobject.get_Cursor());

vlb4.set_Cursor( vobject.get_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.get_X() >= 0 && e.get_X() < 104)

EX = 8;

if (e.get_X() >= 104 && e.get_X() < 200)

EX = 104;

if (e.get_X() >= 200 && e.get_X() < 296)

EX = 200;

// Second Group, X

if (e.get_X() >= 296 && e.get_X() < 416)

EX = 320;

if (e.get_X() >= 416 && e.get_X() < 512)

EX = 416;

if (e.get_X() >= 512 && e.get_X() <= (this.get_Width()))

EX = 512;

// Y

if (e.get_Y() >= 0 && e.get_Y() < 176)

EY = 80;

if (e.get_Y() >= 176 && e.get_Y() < 272)

EY = 176;

if (e.get_Y() >= 272 && e.get_Y() < (this.get_Height()))

EY = 272;

indexx = vobject.get_Name().Substring((vobject.get_Name().get_Length() - 1), 1);

LSelect.set_Text( " ");

if (vstate == 1)

{

LSelect.set_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.set_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.set_Cursor( Cursors.get_Default());

vstate = 0;

if (idx.Equals("1"))

subcursor1(lb11, lb12, lb13, lb14);

else

{

if (idx.Equals("2"))

subcursor1(lb21, lb22, lb23, lb24);

else

{

if (idx.Equals("3"))

subcursor1(lb31, lb32, lb33, lb34);

else

{

if (idx.Equals("4"))

subcursor1(lb41, lb42, lb43, lb44);

else

{

if (idx.Equals("5"))

subcursor1(lb51, lb52, lb53, lb54);

else

{

if (idx.Equals("6"))

subcursor1(lb61, lb62, lb63, lb64);

else

{

if (idx.Equals("7"))

subcursor1(lb71, lb72, lb73, lb74);

else

{

if (idx.Equals("8"))

subcursor1(lb81, lb82, lb83, lb84);

else

{

if (idx.Equals("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(System.Convert.ToInt16(indx))

{

case 1:

A[1, 1] = lb13.get_Text();

A[1, 2] = lb14.get_Text();

break;

case 2:

A[1, 1] = lb23.get_Text();

A[1, 2] = lb24.get_Text();

break;

case 3:

A[1, 1] = lb33.get_Text();

A[1, 2] = lb34.get_Text();

break;

case 4:

A[1, 1] = lb43.get_Text();

A[1, 2] = lb44.get_Text();

break;

case 5:

A[1, 1] = lb53.get_Text();

A[1, 2] = lb54.get_Text();

break;

case 6:

A[1, 1] = lb63.get_Text();

A[1, 2] = lb64.get_Text();

break;

case 7:

A[1, 1] = lb73.get_Text();

A[1, 2] = lb74.get_Text();

break;

case 8:

A[1, 1] = lb83.get_Text();

A[1, 2] = lb84.get_Text();

break;

case 9:

A[1, 1] = lb93.get_Text();

A[1, 2] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 8 && VarY == 176)

{

G_Box[System.Convert.ToInt16(indx)] = "2";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[2, 1] = lb11.get_Text();

A[2, 2] = lb13.get_Text();

A[2, 3] = lb14.get_Text();

break;

case 2:

A[2, 1] = lb21.get_Text();

A[2, 2] = lb23.get_Text();

A[2, 3] = lb24.get_Text();

break;

case 3:

A[2, 1] = lb31.get_Text();

A[2, 2] = lb33.get_Text();

A[2, 3] = lb34.get_Text();

break;

case 4:

A[2, 1] = lb41.get_Text();

A[2, 2] = lb43.get_Text();

A[2, 3] = lb44.get_Text();

break;

case 5:

A[2, 1] = lb51.get_Text();

A[2, 2] = lb53.get_Text();

A[2, 3] = lb54.get_Text();

break;

case 6:

A[2, 1] = lb61.get_Text();

A[2, 2] = lb63.get_Text();

A[2, 3] = lb64.get_Text();

break;

case 7:

A[2, 1] = lb71.get_Text();

A[2, 2] = lb73.get_Text();

A[2, 3] = lb74.get_Text();

break;

case 8:

A[2, 1] = lb81.get_Text();

A[2, 2] = lb83.get_Text();

A[2, 3] = lb84.get_Text();

break;

case 9:

A[2, 1] = lb91.get_Text();

A[2, 2] = lb93.get_Text();

A[2, 3] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 8 && VarY == 272)

{

G_Box[System.Convert.ToInt16(indx)] = "3";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[3, 1] = lb11.get_Text();

A[3, 2] = lb14.get_Text();

break;

case 2:

A[3, 1] = lb21.get_Text();

A[3, 2] = lb24.get_Text();

break;

case 3:

A[3, 1] = lb31.get_Text();

A[3, 2] = lb34.get_Text();

break;

case 4:

A[3, 1] = lb41.get_Text();

A[3, 2] = lb44.get_Text();

break;

case 5:

A[3, 1] = lb51.get_Text();

A[3, 2] = lb54.get_Text();

break;

case 6:

A[3, 1] = lb61.get_Text();

A[3, 2] = lb64.get_Text();

break;

case 7:

A[3, 1] = lb71.get_Text();

A[3, 2] = lb74.get_Text();

break;

case 8:

A[3, 1] = lb81.get_Text();

A[3, 2] = lb84.get_Text();

break;

case 9:

A[3, 1] = lb91.get_Text();

A[3, 2] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 104 && VarY == 80)

{

G_Box[System.Convert.ToInt16(indx)] = "4";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[4, 1] = lb12.get_Text();

A[4, 2] = lb13.get_Text();

A[4, 3] = lb14.get_Text();

break;

case 2:

A[4, 1] = lb22.get_Text();

A[4, 2] = lb23.get_Text();

A[4, 3] = lb24.get_Text();

break;

case 3:

A[4, 1] = lb32.get_Text();

A[4, 2] = lb33.get_Text();

A[4, 3] = lb34.get_Text();

break;

case 4:

A[4, 1] = lb42.get_Text();

A[4, 2] = lb43.get_Text();

A[4, 3] = lb44.get_Text();

break;

case 5:

A[4, 1] = lb52.get_Text();

A[4, 2] = lb53.get_Text();

A[4, 3] = lb54.get_Text();

break;

case 6:

A[4, 1] = lb62.get_Text();

A[4, 2] = lb63.get_Text();

A[4, 3] = lb64.get_Text();

break;

case 7:

A[4, 1] = lb72.get_Text();

A[4, 2] = lb73.get_Text();

A[4, 3] = lb74.get_Text();

break;

case 8:

A[4, 1] = lb82.get_Text();

A[4, 2] = lb83.get_Text();

A[4, 3] = lb84.get_Text();

break;

case 9:

A[4, 1] = lb92.get_Text();

A[4, 2] = lb93.get_Text();

A[4, 3] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 104 && VarY == 176)

{

G_Box[System.Convert.ToInt16(indx)] = "5";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[5, 1] = lb11.get_Text();

A[5, 2] = lb12.get_Text();

A[5, 3] = lb13.get_Text();

A[5, 4] = lb14.get_Text();

break;

case 2:

A[5, 1] = lb21.get_Text();

A[5, 2] = lb22.get_Text();

A[5, 3] = lb23.get_Text();

A[5, 4] = lb24.get_Text();

break;

case 3:

A[5, 1] = lb31.get_Text();

A[5, 2] = lb32.get_Text();

A[5, 3] = lb33.get_Text();

A[5, 4] = lb34.get_Text();

break;

case 4:

A[5, 1] = lb41.get_Text();

A[5, 2] = lb42.get_Text();

A[5, 3] = lb43.get_Text();

A[5, 4] = lb44.get_Text();

break;

case 5:

A[5, 1] = lb51.get_Text();

A[5, 2] = lb52.get_Text();

A[5, 3] = lb53.get_Text();

A[5, 4] = lb54.get_Text();

break;

case 6:

A[5, 1] = lb61.get_Text();

A[5, 2] = lb62.get_Text();

A[5, 3] = lb63.get_Text();

A[5, 4] = lb64.get_Text();

break;

case 7:

A[5, 1] = lb71.get_Text();

A[5, 2] = lb72.get_Text();

A[5, 3] = lb73.get_Text();

A[5, 4] = lb74.get_Text();

break;

case 8:

A[5, 1] = lb81.get_Text();

A[5, 2] = lb82.get_Text();

A[5, 3] = lb83.get_Text();

A[5, 4] = lb84.get_Text();

break;

case 9:

A[5, 1] = lb91.get_Text();

A[5, 2] = lb92.get_Text();

A[5, 3] = lb93.get_Text();

A[5, 4] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 104 && VarY == 272)

{

G_Box[System.Convert.ToInt16(indx)] = "6";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[6, 1] = lb11.get_Text();

A[6, 2] = lb12.get_Text();

A[6, 3] = lb14.get_Text();

break;

case 2:

A[6, 1] = lb21.get_Text();

A[6, 2] = lb22.get_Text();

A[6, 3] = lb24.get_Text();

break;

case 3:

A[6, 1] = lb31.get_Text();

A[6, 2] = lb32.get_Text();

A[6, 3] = lb34.get_Text();

break;

case 4:

A[6, 1] = lb41.get_Text();

A[6, 2] = lb42.get_Text();

A[6, 3] = lb44.get_Text();

break;

case 5:

A[6, 1] = lb51.get_Text();

A[6, 2] = lb52.get_Text();

A[6, 3] = lb54.get_Text();

break;

case 6:

A[6, 1] = lb61.get_Text();

A[6, 2] = lb62.get_Text();

A[6, 3] = lb64.get_Text();

break;

case 7:

A[6, 1] = lb71.get_Text();

A[6, 2] = lb72.get_Text();

A[6, 3] = lb74.get_Text();

break;

case 8:

A[6, 1] = lb81.get_Text();

A[6, 2] = lb82.get_Text();

A[6, 3] = lb84.get_Text();

break;

case 9:

A[6, 1] = lb91.get_Text();

A[6, 2] = lb92.get_Text();

A[6, 3] = lb94.get_Text();

break;

}

}

else

{

if (VarX == 200 && VarY == 80)

{

G_Box[System.Convert.ToInt16(indx)] = "7";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[7, 1] = lb12.get_Text();

A[7, 2] = lb13.get_Text();

break;

case 2:

A[7, 1] = lb22.get_Text();

A[7, 2] = lb23.get_Text();

break;

case 3:

A[7, 1] = lb32.get_Text();

A[7, 2] = lb33.get_Text();

break;

case 4:

A[7, 1] = lb42.get_Text();

A[7, 2] = lb43.get_Text();

break;

case 5:

A[7, 1] = lb52.get_Text();

A[7, 2] = lb53.get_Text();

break;

case 6:

A[7, 1] = lb62.get_Text();

A[7, 2] = lb63.get_Text();

break;

case 7:

A[7, 1] = lb72.get_Text();

A[7, 2] = lb73.get_Text();

break;

case 8:

A[7, 1] = lb82.get_Text();

A[7, 2] = lb83.get_Text();

break;

case 9:

A[7, 1] = lb92.get_Text();

A[7, 2] = lb93.get_Text();

break;

}

}

else

{

if (VarX == 200 && VarY == 176)

{

G_Box[System.Convert.ToInt16(indx)] = "8";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[8, 1] = lb11.get_Text();

A[8, 2] = lb12.get_Text();

A[8, 3] = lb13.get_Text();

break;

case 2:

A[8, 1] = lb21.get_Text();

A[8, 2] = lb22.get_Text();

A[8, 3] = lb23.get_Text();

break;

case 3:

A[8, 1] = lb31.get_Text();

A[8, 2] = lb32.get_Text();

A[8, 3] = lb33.get_Text();

break;

case 4:

A[8, 1] = lb41.get_Text();

A[8, 2] = lb42.get_Text();

A[8, 3] = lb43.get_Text();

break;

case 5:

A[8, 1] = lb51.get_Text();

A[8, 2] = lb52.get_Text();

A[8, 3] = lb53.get_Text();

break;

case 6:

A[8, 1] = lb61.get_Text();

A[8, 2] = lb62.get_Text();

A[8, 3] = lb63.get_Text();

break;

case 7:

A[8, 1] = lb71.get_Text();

A[8, 2] = lb72.get_Text();

A[8, 3] = lb73.get_Text();

break;

case 8:

A[8, 1] = lb81.get_Text();

A[8, 2] = lb82.get_Text();

A[8, 3] = lb83.get_Text();

break;

case 9:

A[8, 1] = lb91.get_Text();

A[8, 2] = lb92.get_Text();

A[8, 3] = lb93.get_Text();

break;

}

}

else

{

if (VarX == 200 && VarY == 272)

{

G_Box[System.Convert.ToInt16(indx)] = "9";

switch(System.Convert.ToInt16(indx))

{

case 1:

A[9, 1] = lb11.get_Text();

A[9, 2] = lb12.get_Text();

break;

case 2:

A[9, 1] = lb21.get_Text();

A[9, 2] = lb22.get_Text();

break;

case 3:

A[9, 1] = lb31.get_Text();

A[9, 2] = lb32.get_Text();

break;

case 4:

A[9, 1] = lb41.get_Text();

A[9, 2] = lb42.get_Text();

break;

case 5:

A[9, 1] = lb51.get_Text();

A[9, 2] = lb52.get_Text();

break;

case 6:

A[9, 1] = lb61.get_Text();

A[9, 2] = lb62.get_Text();

break;

case 7:

A[9, 1] = lb71.get_Text();

A[9, 2] = lb72.get_Text();

break;

case 8:

A[9, 1] = lb81.get_Text();

A[9, 2] = lb82.get_Text();

break;

case 9:

A[9, 1] = lb91.get_Text();

A[9, 2] = lb92.get_Text();

break;

}

}

}

}

}

}

}

}

}

}

}

//Test, Equal Values

private void Equal_Value(String indx, int VarX, int VarY)

{

if (VarX == 8 && VarY == 80)

{

if (A[2, 1].Equals("") == false)

{

if (A[1, 1].Equals(A[2, 1]) == false)

{

A[1, 1] = "";

A[1, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[4, 1].Equals("") == false)

{

if (A[1, 2].Equals(A[4, 1]) == false)

{

A[1, 1] = "";

A[1, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

}

else

{

if (VarX == 8 && VarY == 176)

{

if (A[1, 1].Equals("") == false)

{

if (A[2, 1].Equals(A[1, 1]) == false)

{

A[2, 1] = "";

A[2, 2] = "";

A[2, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[3, 1].Equals("") == false)

{

if (A[2, 2].Equals(A[3, 1]) == false)

{

A[2, 1] = "";

A[2, 2] = "";

A[2, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[5, 2].Equals("") == false)

{

if (A[2, 3].Equals(A[5, 2]) == false)

{

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].Equals("") == false)

{

if (A[3, 1].Equals(A[2, 2]) == false)

{

A[3, 1] = "";

A[3, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[6, 2].Equals("") == false)

{

if (A[3, 2].Equals(A[6, 2]) == false)

{

A[3, 1] = "";

A[3, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

}

else

{

if (VarX == 104 && VarY == 80)

{

if (A[1, 2].Equals("") == false)

{

if (A[4, 1].Equals(A[1, 2]) == false)

{

A[4, 1] = "";

A[4, 2] = "";

A[4, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[5, 1].Equals("") == false)

{

if (A[4, 2].Equals(A[5, 1]) == false)

{

A[4, 1] = "";

A[4, 2] = "";

A[4, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[7, 1].Equals("") == false)

{

if (A[4, 3].Equals(A[7, 1]) == false)

{

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].Equals("") == false)

{

if (A[5, 1].Equals(A[4, 2]) == false)

{

A[5, 1] = "";

A[5, 2] = "";

A[5, 3] = "";

A[5, 4] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[2, 3].Equals("") == false)

{

if (A[5, 2].Equals(A[2, 3]) == false)

{

A[5, 1] = "";

A[5, 2] = "";

A[5, 3] = "";

A[5, 4] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[6, 1].Equals("") == false)

{

if (A[5, 3].Equals(A[6, 1]) == false)

{

A[5, 1] = "";

A[5, 2] = "";

A[5, 3] = "";

A[5, 4] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[8, 2].Equals("") == false)

{

if (A[5, 4].Equals(A[8, 2]) == false)

{

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].Equals("") == false)

{

if (A[6, 1].Equals(A[5, 3]) == false)

{

A[6, 1] = "";

A[6, 2] = "";

A[6, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[3, 2].Equals("") == false)

{

if (A[6, 2].Equals(A[3, 2]) == false)

{

A[6, 1] = "";

A[6, 2] = "";

A[6, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[9, 2].Equals("") == false)

{

if (A[6, 3].Equals(A[9, 2]) == false)

{

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].Equals("") == false)

{

if (A[7, 1].Equals(A[4, 3]) == false)

{

A[7, 1] = "";

A[7, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[8, 1].Equals("") == false)

{

if (A[7, 2].Equals(A[8, 1]) == false)

{

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].Equals("") == false)

{

if (A[8, 1].Equals(A[7, 2]) == false)

{

A[8, 1] = "";

A[8, 2] = "";

A[8, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[5, 4].Equals( "") == false)

{

if (A[8, 2].Equals(A[5, 4]) == false)

{

A[8, 1] = "";

A[8, 2] = "";

A[8, 3] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[9, 1].Equals( "") == false)

{

if (A[8, 3].Equals(A[9, 1]) == false)

{

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].Equals("") == false)

{

if (A[9, 1].Equals(A[8, 3]) == false)

{

A[9, 1] = "";

A[9, 2] = "";

//Resultat, Equal Values

Pt_Equal(indx);

}

}

if (A[6, 3].Equals("") == false)

{

if (A[9, 2].Equals(A[6, 3]) == false)

{

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.set_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

System.Random randomc71 = new System.Random();

System.Random randomc72 = new System.Random();

System.Random randomc73 = new System.Random();

System.Random randomc74 = new System.Random();

System.Random randomc91 = new System.Random();

System.Random randomc92 = new System.Random();

System.Random randomc93 = new System.Random();

System.Random randomc94 = new System.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.set_Text( System.Convert.ToString(G7[1]));

lb72.set_Text( System.Convert.ToString(G7[2]));

lb73.set_Text( System.Convert.ToString(G7[3]));

lb74.set_Text( System.Convert.ToString(G7[4]));

// 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.set_Text( System.Convert.ToString(G9[1]));

lb92.set_Text( System.Convert.ToString(G9[2]));

lb93.set_Text( System.Convert.ToString(G9[3]));

lb94.set_Text( System.Convert.ToString(G9[4]));

}

}

private void Timer3_Tick (Object sender, System.EventArgs e)

{

// Random values

System.Random randomc21 = new System.Random();

System.Random randomc22 = new System.Random();

System.Random randomc23 = new System.Random();

System.Random randomc24 = new System.Random();

System.Random randomc41 = new System.Random();

System.Random randomc42 = new System.Random();

System.Random randomc43 = new System.Random();

System.Random randomc44 = new System.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.set_Text( System.Convert.ToString(G2[1]));

lb22.set_Text( System.Convert.ToString(G2[2]));

lb23.set_Text( System.Convert.ToString(G2[3]));

lb24.set_Text( System.Convert.ToString(G2[4]));

// 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.set_Text( System.Convert.ToString(G4[1]));

lb42.set_Text( System.Convert.ToString(G4[2]));

lb43.set_Text( System.Convert.ToString(G4[3]));

lb44.set_Text( System.Convert.ToString(G4[4]));

}

}

private void Timer4_Tick (Object sender, System.EventArgs e)

{

// Random values

System.Random randomc61 = new System.Random();

System.Random randomc62 = new System.Random();

System.Random randomc63 = new System.Random();

System.Random randomc64 = new System.Random();

System.Random randomc81 = new System.Random();

System.Random randomc82 = new System.Random();

System.Random randomc83 = new System.Random();

System.Random randomc84 = new System.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.set_Text( System.Convert.ToString(G6[1]));

lb62.set_Text( System.Convert.ToString(G6[2]));

lb63.set_Text( System.Convert.ToString(G6[3]));

lb64.set_Text( System.Convert.ToString(G6[4]));

// 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.set_Text( System.Convert.ToString(G8[1]));

lb82.set_Text( System.Convert.ToString(G8[2]));

lb83.set_Text( System.Convert.ToString(G8[3]));

lb84.set_Text( System.Convert.ToString(G8[4]));

}

}

private void Timer1_Tick (Object sender, System.EventArgs e)

{

// Random values

System.Random randomc11 = new System.Random();

System.Random randomc12 = new System.Random();

System.Random randomc13 = new System.Random();

System.Random randomc14 = new System.Random();

System.Random randomc31 = new System.Random();

System.Random randomc32 = new System.Random();

System.Random randomc33 = new System.Random();

System.Random randomc34 = new System.Random();

System.Random randomc51 = new System.Random();

System.Random randomc52 = new System.Random();

System.Random randomc53 = new System.Random();

System.Random randomc54 = new System.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.set_Text( System.Convert.ToString(G1[1]));

lb12.set_Text( System.Convert.ToString(G1[2]));

lb13.set_Text( System.Convert.ToString(G1[3]));

lb14.set_Text( System.Convert.ToString(G1[4]));

// 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.set_Text( System.Convert.ToString(G3[1]));

lb32.set_Text( System.Convert.ToString(G3[2]));

lb33.set_Text( System.Convert.ToString(G3[3]));

lb34.set_Text( System.Convert.ToString(G3[4]));

// 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.set_Text( System.Convert.ToString(G5[1]));

lb52.set_Text( System.Convert.ToString(G5[2]));

lb53.set_Text( System.Convert.ToString(G5[3]));

lb54.set_Text( System.Convert.ToString(G5[4]));

}

}

private void Timer_clock_Tick (Object sender, System.EventArgs e)

{

// Clock

vtime = System.DateTime.get_Now();

this.ltime1.set_Text( System.DateTime.get_Now().ToLongTimeString());

// Timer Interval

int vinterval_game;

vinterval_game = ((vtime.get_Hour() * 60* 60) + (vtime.get_Minute() * 60) + vtime.get_Second()) - ((New_Game_interval.get_Hour()* 60* 60) + (New_Game_interval.get_Minute() * 60) + New_Game_interval.get_Second());

if (Flg_Time)

LInterval.set_Text( System.Convert.ToString(vinterval_game) + " Sec");

// Stop The Load

if (TimerFlag)

{

int vinterval_load;

vinterval_load = ((vtime.get_Hour()* 60* 60) + (vtime.get_Minute() * 60) + vtime.get_Second()) - ((New_Game_BTime.get_Hour()* 60* 60) + (New_Game_BTime.get_Minute() * 60) + New_Game_BTime.get_Second());

if (vinterval_load > 4)

Stop_Load();

}

if (FaceGametest)

FaceGame_test();

}

// **********************************************

private void GoodSub(boolean good_Operation)

{

if (good_Operation == true)

{

FaceGametest = false;

this.Lwelcome.set_Text( " ");

Vcount = 1;

Timer_Welcome.set_Enabled( true);

this.PWelcome.set_Location( new System.Drawing.Point(8, 80));

this.PPicture1.set_Location( new System.Drawing.Point(320, 80));

this.PictureBox2.set_Visible( false);

this.PictureBox3.set_Visible( false);

Welcome_Flag = false;

TheGood_Flag = true;

}

else

{

this.LTImer.set_Visible( false);

this.LInterval.set_Visible( false);

Timer_Welcome.set_Enabled( false);

this.PWelcome.set_Location( new System.Drawing.Point(8, 464));

this.PPicture1.set_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.get_Button().get_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.set_Enabled( false);

Timer2.set_Enabled( false);

Timer3.set_Enabled( false);

Timer4.set_Enabled( false);

// New Game, First Time after Load

vtime= System.DateTime.get_Now();

New_Game_interval = vtime;

// Panel2

lb22.set_Text( System.Convert.ToString(G1[4]));

lb23.set_Text( System.Convert.ToString(G5[1]));

lb24.set_Text( System.Convert.ToString(G3[2]));

// Panel4

lb41.set_Text( System.Convert.ToString(G1[3]));

lb43.set_Text( System.Convert.ToString(G7[1]));

lb44.set_Text( System.Convert.ToString(G5[2]));

// Panel6

lb61.set_Text( System.Convert.ToString(G3[3]));

lb62.set_Text( System.Convert.ToString(G5[4]));

lb63.set_Text( System.Convert.ToString(G9[1]));

// Panel8

lb81.set_Text( System.Convert.ToString(G5[3]));

lb82.set_Text( System.Convert.ToString(G7[4]));

lb84.set_Text( System.Convert.ToString(G9[2]));

// Initial Position

Initial_Position();

// New Game, Interval Timer Flag

Flg_Time = true;

ToolBar1.get_Buttons().get_Item(2).set_Enabled( true);

LTImer.set_Visible( true);

LInterval.set_Visible( true);

LOne.set_Visible( false);

// Timer Counter Format, Begin

LInterval.set_Text( " --- 00:00:00 --- )");

Timer_Welcome.set_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.get_Black(), 3);

Pen vPen2 = new Pen(Color.get_Azure(), 3);

Pen vPen3 = new Pen(Color.get_Blue(), 3);

Pen vPen4 = new Pen(Color.get_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.get_Width() / 3;

y1 = this.PictureBox1.get_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.set_Text( "Welcome");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Olive());

Vcount = Vcount + 1;

break;

case 2:

Lwelcome.set_Text( "W");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Navy());

Vcount = Vcount + 1;

break;

case 3:

Lwelcome.set_Text( "We");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Red());

Vcount = Vcount + 1;

break;

case 4:

Lwelcome.set_Text( "Wel");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Teal());

Vcount = Vcount + 1;

break;

case 5:

Lwelcome.set_Text( "Welc");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Black());

Vcount = Vcount + 1;

break;

case 6:

Lwelcome.set_Text( "Welco");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Maroon());

Vcount = Vcount + 1;

break;

case 7:

Lwelcome.set_Text( "Welcom");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Blue());

Vcount = Vcount + 1;

break;

case 8:

Lwelcome.set_Text( "Welcome");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Orchid());

Vcount = Vcount + 1;

break;

case 9:

Lwelcome.set_Text( "Welcome ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Green());

Vcount = 1;

break;

}

}

}

 

// Show the Word - The Good **********************************

private void TheGood_demo()

{

switch(Vcount)

{

case 1:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Olive());

LInterval.set_BackColor( System.Drawing.Color.get_Olive());

this.PictureBox3.set_Visible( false);

this.PictureBox2.set_Visible( true);

Vcount = Vcount + 1;

break;

case 2:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Green());

LInterval.set_BackColor( System.Drawing.Color.get_Green());

this.PictureBox2.set_Visible( false);

this.PictureBox3.set_Visible( true);

Vcount = Vcount + 1;

break;

case 3:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Orchid());

LInterval.set_BackColor( System.Drawing.Color.get_Orchid());

this.PictureBox3.set_Visible( false);

this.PictureBox2.set_Visible( true);

Vcount = Vcount + 1;

break;

case 4:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Blue());

LInterval.set_BackColor( System.Drawing.Color.get_Blue());

this.PictureBox2.set_Visible( false);

this.PictureBox3.set_Visible( true);

Vcount = Vcount + 1;

break;

case 5:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Maroon());

LInterval.set_BackColor( System.Drawing.Color.get_Maroon());

this.PictureBox3.set_Visible( false);

this.PictureBox2.set_Visible( true);

Vcount = Vcount + 1;

break;

case 6:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Black());

LInterval.set_BackColor( System.Drawing.Color.get_Black());

this.PictureBox2.set_Visible( false);

this.PictureBox3.set_Visible( true);

Vcount = Vcount + 1;

break;

case 7:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Teal());

LInterval.set_BackColor( System.Drawing.Color.get_Teal());

this.PictureBox3.set_Visible( false);

this.PictureBox2.set_Visible( true);

Vcount = Vcount + 1;

break;

case 8:

Lwelcome.set_Text( "The Good ...");

this.Lwelcome.set_Font(new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)178)))));

this.Lwelcome.set_ForeColor( System.Drawing.Color.get_Red());

LInterval.set_BackColor( System.Drawing.Color.get_Red());

this.PictureBox2.set_Visible( false);

this.PictureBox3.set_Visible( true);

Vcount = 1;

break;

}

}

 

// Test procedure *************************************

private void FaceGame_test()

{

int Fcount;

Fcount = 0;

if ((Panel1.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel2.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel3.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel4.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel5.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel6.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel7.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel8.get_Location().get_X()) <= 200)

Fcount = Fcount + 1;

if ((Panel9.get_Location().get_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 (Object sender, System.EventArgs e)

{

New_Game();

}

private void MenuItem4_Click (Object sender, System.EventArgs e)

{

DemoForm ff = new DemoForm();

ff.Show();

}

private void MenuItem6_Click (Object sender, System.EventArgs e)

{

AboutForm f1 = new AboutForm();

f1.Show();

}

private void MenuItem8_Click (Object sender, System.EventArgs e)

{

Application.Exit();

}

 

}


Top
 

2. DemoForm.jsl
 
package Face_Game_VJ_Net;

import System.Drawing.*;

import System.Collections.*;

import System.ComponentModel.*;

import System.Windows.Forms.*;

/**

* Summary description for DemoForm.

*/

public class DemoForm extends System.Windows.Forms.Form

{

System.Windows.Forms.Timer Demo_Timer;

System.Windows.Forms.Timer Timerclock;

System.Windows.Forms.Label LDemo;

System.Windows.Forms.Label Ltime1;

System.Windows.Forms.Panel xPanel1;

public System.Windows.Forms.Label lb13;

public System.Windows.Forms.Label lb14;

public System.Windows.Forms.Label lb12;

public System.Windows.Forms.Label lb11;

System.Windows.Forms.Panel xPanel9;

public System.Windows.Forms.Label lb93;

public System.Windows.Forms.Label lb94;

public System.Windows.Forms.Label lb92;

public System.Windows.Forms.Label lb91;

public System.Windows.Forms.Label LTImer;

public System.Windows.Forms.Label LIntervalDemo;

System.Windows.Forms.Button btnclose;

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;

System.Windows.Forms.Panel xPanel2;

public System.Windows.Forms.Label lb21;

public System.Windows.Forms.Label lb22;

public System.Windows.Forms.Label lb24;

public System.Windows.Forms.Label lb23;

System.Windows.Forms.Panel xPanel8;

public System.Windows.Forms.Label lb83;

public System.Windows.Forms.Label lb84;

public System.Windows.Forms.Label lb82;

public System.Windows.Forms.Label lb81;

System.Windows.Forms.Panel xPanel7;

public System.Windows.Forms.Label lb71;

public System.Windows.Forms.Label lb72;

public System.Windows.Forms.Label lb74;

public System.Windows.Forms.Label lb73;

System.Windows.Forms.Panel xPanel6;

public System.Windows.Forms.Label lb63;

public System.Windows.Forms.Label lb64;

public System.Windows.Forms.Label lb62;

public System.Windows.Forms.Label lb61;

System.Windows.Forms.Panel xPanel5;

public System.Windows.Forms.Label lb53;

public System.Windows.Forms.Label lb54;

public System.Windows.Forms.Label lb52;

public System.Windows.Forms.Label lb51;

System.Windows.Forms.Panel xPanel3;

public System.Windows.Forms.Label lb31;

public System.Windows.Forms.Label lb32;

public System.Windows.Forms.Label lb34;

public System.Windows.Forms.Label lb33;

System.Windows.Forms.Panel xPanel4;

public System.Windows.Forms.Label lb41;

public System.Windows.Forms.Label lb42;

public System.Windows.Forms.Label lb44;

public System.Windows.Forms.Label lb43;

System.Windows.Forms.Panel PPicture;

System.Windows.Forms.PictureBox PictureBox1;

private System.ComponentModel.IContainer components;

//Variables

System.DateTime vtime;

System.DateTime StartDemo_Date;

boolean Demo_Move_Flag;

boolean Demo_Interval_Flag;

boolean begin_demo;

long vinterval_demo;

int Vcount;

int DemoCounter1;

 

public DemoForm()

{

//

// Required for Windows Form Designer support

//

InitializeComponent();

//

// TODO: Add any constructor code after InitializeComponent call

//

}

/**

* Clean up any resources being used.

*/

protected void Dispose(boolean disposing)

{

if (disposing)

{

if (components != null)

{

components.Dispose();

}

}

super.Dispose(disposing);

}


 

Windows Form Designer generated code


 

private void DemoForm_Load (Object sender, System.EventArgs e)

{

Vcount = 0;

xPanel1.SetBounds((512), (208), 96, 96);

xPanel2.SetBounds((320), (112), 96, 96);

xPanel3.SetBounds((320), (208), 96, 96);

xPanel4.SetBounds((416), (208), 96, 96);

xPanel5.SetBounds((512), (16), 96, 96);

xPanel6.SetBounds((416), (16), 96, 96);

xPanel7.SetBounds((416), (112), 96, 96);

xPanel8.SetBounds((512), (112), 96, 96);

xPanel9.SetBounds((320), (16), 96, 96);

PPicture.set_Height(290);

PPicture.set_Width(290);

this.PictureBox1.set_Top((this.PPicture.get_Height() - this.PictureBox1.get_Height()) / 2);

this.PictureBox1.set_Left( (this.PPicture.get_Width() - this.PictureBox1.get_Width()) / 2);

PPicture.SetBounds(16, 368, 290, 290);

this.Timerclock.set_Enabled( true);

begin_demo = true;

}

private void btnclose_Click (Object sender, System.EventArgs e)

{

// To close the current form

this.Close();

}

private void Demo_Timer_Tick (Object sender, System.EventArgs e)

{

TheDemo();

if (Demo_Move_Flag)

{

DemoCounter1 = DemoCounter1 + 1;

demoSub();

}

}

private void demoSub()

{

if (DemoCounter1 == 1)

xPanel8.SetBounds((8), (112), 96, 96);

else

{

if (DemoCounter1 == 2)

xPanel1.SetBounds((8), (16), 96, 96);

else

{

if (DemoCounter1 == 3)

xPanel2.SetBounds((104), (112), 96, 96);

else

{

if (DemoCounter1 == 4)

xPanel3.SetBounds((104), (16), 96, 96);

else

{

if (DemoCounter1 == 5)

xPanel4.SetBounds((8), (208), 96, 96);

else

{

if (DemoCounter1 == 6)

xPanel5.SetBounds((200), (16), 96, 96);

else

{

if (DemoCounter1 == 7)

xPanel9.SetBounds((104), (208), 96, 96);

else

{

if (DemoCounter1 == 8)

xPanel6.SetBounds((200), (208), 96, 96);

else

{

if (DemoCounter1 == 9)

xPanel7.SetBounds((200), (112), 96, 96);

else

{

if (DemoCounter1 == 10)

Demo_Char_MultiColor();

PPicture.SetBounds(320, 16, 288, 288);

Demo_Move_Flag = false;

Demo_Interval_Flag = false;

}

}

}

}

}

}

}

}

}

}

private void Demo_Char_MultiColor()

{

lb13.set_ForeColor(Color.get_LavenderBlush());

lb14.set_ForeColor(Color.get_LavenderBlush());

lb21.set_ForeColor(Color.get_Gold());

lb22.set_ForeColor(Color.get_Gold());

lb23.set_ForeColor(Color.get_Gold());

lb24.set_ForeColor(Color.get_Gold());

lb32.set_ForeColor(Color.get_LavenderBlush());

lb33.set_ForeColor(Color.get_Gold());

lb34.set_ForeColor(Color.get_LavenderBlush());

lb41.set_ForeColor(Color.get_LavenderBlush());

lb44.set_ForeColor(Color.get_LavenderBlush());

lb52.set_ForeColor(Color.get_LavenderBlush());

lb53.set_ForeColor(Color.get_LavenderBlush());

lb61.set_ForeColor(Color.get_LavenderBlush());

lb62.set_ForeColor(Color.get_LavenderBlush());

lb71.set_ForeColor(Color.get_LavenderBlush());

lb72.set_ForeColor(Color.get_Gold());

lb73.set_ForeColor(Color.get_LavenderBlush());

lb81.set_ForeColor(Color.get_LavenderBlush());

lb83.set_ForeColor(Color.get_LavenderBlush());

lb84.set_ForeColor(Color.get_Gold());

lb91.set_ForeColor(Color.get_Gold());

lb92.set_ForeColor(Color.get_LavenderBlush());

lb94.set_ForeColor(Color.get_LavenderBlush());

}

private void Timerclock_Tick (Object sender, System.EventArgs e)

{

// Clock

vtime=System.DateTime.get_Now();

this.Ltime1.set_Text(System.DateTime.get_Now().ToLongTimeString());

// Timer Interval

if (Demo_Interval_Flag)

{

vinterval_demo = ((vtime.get_Hour() * 60* 60) + (vtime.get_Minute() * 60) + vtime.get_Second()) - ((StartDemo_Date.get_Hour()* 60* 60) + (StartDemo_Date.get_Minute() * 60) + StartDemo_Date.get_Second());

LIntervalDemo.set_Text(System.Convert.ToString(vinterval_demo) + " Sec");

}

}

private void TheDemo()

{

Vcount = Vcount + 1;

if (Vcount == 1)

LDemo.set_ForeColor(Color.get_Red());

else

{

if (Vcount == 2)

LDemo.set_ForeColor(Color.get_Navy());

else

{

if (Vcount == 3)

LDemo.set_ForeColor(Color.get_Salmon());

if (begin_demo)

{

Demo_Move_Flag = true;

vtime=System.DateTime.get_Now();

StartDemo_Date = System.DateTime.get_Now();

LTImer.set_Visible(true);

LIntervalDemo.set_Visible(true);

Demo_Interval_Flag = true;

begin_demo = false;

}

else

{

if (Vcount == 4)

LDemo.set_ForeColor(Color.get_Green());

else

{

if (Vcount == 5)

{

LDemo.set_ForeColor(Color.get_Brown());

Vcount = 0;

}

}

}

}

}

}

 

 

}

           
            Top
 

      Return