Ejemplo n.º 1
0
 Stack <Point> listPoint = new Stack <Point>(); // list các điểm đã đi
 void setImage_AutoGoOff(int x, int y, Cot c)
 {
     if (x != -1 && y != -1)
     {
         c.setImageAutoGoOff(y);
     }
 }
Ejemplo n.º 2
0
        void setImageofWinner(List <Point> list, int color)
        {
            String namefile = "";

            if (color == 0)
            {
                namefile = "black_winner.png";
            }
            else
            {
                namefile = "white_winner.png";
            }
            foreach (Point i in list)
            {
                Cot c = getColumn((int)i.X);
                c.setImageofWinner(namefile, (int)i.Y);
            }
            for (int j = 0; j < 12; j++)
            {
                getColumn(j).stop = true;
            }
            if (TypePlay != 2 && TypePlay != 3)
            {
                if (color == 0)
                {
                    para += "SERVER" + "                                                              "
                            + DateTime.Now.ToString("HH:mm:ss") + "\n" + "Player1 is winner!!!" + "\n";
                    para        += "-------------------------------------------------------------------------------------\n";
                    chatBox.Text = para;
                }
                if (color == 1)
                {
                    para += "SERVER" + "                                                              "
                            + DateTime.Now.ToString("HH:mm:ss") + "\n" + "Player2 is winner!!!" + "\n";
                    para        += "-------------------------------------------------------------------------------------\n";
                    chatBox.Text = para;
                }
            }
        }
Ejemplo n.º 3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 9 "..\..\Ban_Co.xaml"
     ((_1312001.Ban_Co)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Board_MouseMove);
     
     #line default
     #line hidden
     return;
     case 2:
     this.C0_C0 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 3:
     this.C0_C1 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 4:
     this.C0_C2 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 5:
     this.C0_C3 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 6:
     this.C0_C4 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 7:
     this.C0_C5 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 8:
     this.C0_C6 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 9:
     this.C0_C7 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 10:
     this.C0_C8 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 11:
     this.C0_C9 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 12:
     this.C0_C10 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 13:
     this.C0_C11 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 14:
     this.C0_C12 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 15:
     this.C0_C13 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 16:
     this.column_0 = ((_1312001.Cot)(target));
     return;
     case 17:
     this.column_1 = ((_1312001.Cot)(target));
     return;
     case 18:
     this.column_2 = ((_1312001.Cot)(target));
     return;
     case 19:
     this.column_3 = ((_1312001.Cot)(target));
     return;
     case 20:
     this.column_4 = ((_1312001.Cot)(target));
     return;
     case 21:
     this.column_5 = ((_1312001.Cot)(target));
     return;
     case 22:
     this.column_6 = ((_1312001.Cot)(target));
     return;
     case 23:
     this.column_7 = ((_1312001.Cot)(target));
     return;
     case 24:
     this.column_8 = ((_1312001.Cot)(target));
     return;
     case 25:
     this.column_9 = ((_1312001.Cot)(target));
     return;
     case 26:
     this.column_10 = ((_1312001.Cot)(target));
     return;
     case 27:
     this.column_11 = ((_1312001.Cot)(target));
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 4
0
 public int setImageOnl(Point p, Cot c)
 {
     setImage_AutoGoOnl((int)p.X, (int)p.Y, c);
     return addToaDo(p, 0);
 }
Ejemplo n.º 5
0
 public int setImageOff(Point p, Cot c)
 {
     setImage_AutoGoOff((int)p.X, (int)p.Y, c);
     return addToaDo(p, 1);
 }
Ejemplo n.º 6
0
 void setImage_AutoGoOnl(int x, int y, Cot c)
 {
     c.setImageAutoGoOnl(y);
 }
Ejemplo n.º 7
0
 Stack<Point> listPoint = new Stack<Point>(); // list các điểm đã đi
 void setImage_AutoGoOff(int x, int y, Cot c)
 {
     if (x != -1 && y != -1)
         c.setImageAutoGoOff(y);
 }
Ejemplo n.º 8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((_1312001.MainWindow)(target));

            #line 6 "..\..\MainWindow.xaml"
                this.window.MouseMove += new System.Windows.Input.MouseEventHandler(this.B_MouseMove);

            #line default
            #line hidden
                return;

            case 2:
                this.Grid_Background = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.C0 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 4:
                this.C1 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 5:
                this.C2 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 6:
                this.C3 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 7:
                this.C0_C0 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 8:
                this.C0_C1 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 9:
                this.C0_C2 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 10:
                this.C0_C3 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 11:
                this.C0_C4 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 12:
                this.C0_C5 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 13:
                this.C0_C6 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 14:
                this.C0_C7 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 15:
                this.C0_C8 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 16:
                this.C0_C9 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 17:
                this.C0_C10 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 18:
                this.C0_C11 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 19:
                this.C0_C12 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 20:
                this.C0_C13 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 21:
                this.column_0 = ((_1312001.Cot)(target));
                return;

            case 22:
                this.column_1 = ((_1312001.Cot)(target));
                return;

            case 23:
                this.column_2 = ((_1312001.Cot)(target));
                return;

            case 24:
                this.column_3 = ((_1312001.Cot)(target));
                return;

            case 25:
                this.column_4 = ((_1312001.Cot)(target));
                return;

            case 26:
                this.column_5 = ((_1312001.Cot)(target));
                return;

            case 27:
                this.column_6 = ((_1312001.Cot)(target));
                return;

            case 28:
                this.column_7 = ((_1312001.Cot)(target));
                return;

            case 29:
                this.column_8 = ((_1312001.Cot)(target));
                return;

            case 30:
                this.column_9 = ((_1312001.Cot)(target));
                return;

            case 31:
                this.column_10 = ((_1312001.Cot)(target));
                return;

            case 32:
                this.column_11 = ((_1312001.Cot)(target));
                return;

            case 33:
                this.C2_R0 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 34:
                this.C2_R1 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 35:
                this.C2_R2 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 36:
                this.C2_R3 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 37:
                this.C2_R4 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 38:
                this.C2_R5 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 39:
                this.C2_R7 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 40:
                this.YourName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 41:

            #line 69 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Change_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.chatBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 43:
                this.input_chat = ((System.Windows.Controls.TextBox)(target));
                return;

            case 44:

            #line 76 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Send_Click);

            #line default
            #line hidden
                return;

            case 45:
                this.rbt_2Player = ((System.Windows.Controls.RadioButton)(target));

            #line 77 "..\..\MainWindow.xaml"
                this.rbt_2Player.Checked += new System.Windows.RoutedEventHandler(this.rbt_2Player_Checked);

            #line default
            #line hidden
                return;

            case 46:
                this.rbt_Machine = ((System.Windows.Controls.RadioButton)(target));

            #line 78 "..\..\MainWindow.xaml"
                this.rbt_Machine.Checked += new System.Windows.RoutedEventHandler(this.rbt_Machine_Checked);

            #line default
            #line hidden
                return;

            case 47:
                this.online = ((System.Windows.Controls.RadioButton)(target));

            #line 79 "..\..\MainWindow.xaml"
                this.online.Checked += new System.Windows.RoutedEventHandler(this.online_Checked);

            #line default
            #line hidden
                return;

            case 48:
                this.onlineMachine = ((System.Windows.Controls.RadioButton)(target));

            #line 80 "..\..\MainWindow.xaml"
                this.onlineMachine.Checked += new System.Windows.RoutedEventHandler(this.onlineMachine_Checked);

            #line default
            #line hidden
                return;

            case 49:
                this.btn_Newgame = ((System.Windows.Controls.Button)(target));

            #line 81 "..\..\MainWindow.xaml"
                this.btn_Newgame.Click += new System.Windows.RoutedEventHandler(this.btn_Newgame_Click);

            #line default
            #line hidden
                return;

            case 50:
                this.container = ((System.Windows.Controls.TextBox)(target));

            #line 82 "..\..\MainWindow.xaml"
                this.container.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.container_TextChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 9
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.window = ((_1312001.MainWindow)(target));
     
     #line 6 "..\..\MainWindow.xaml"
     this.window.MouseMove += new System.Windows.Input.MouseEventHandler(this.B_MouseMove);
     
     #line default
     #line hidden
     return;
     case 2:
     this.Grid_Background = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.C0 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 4:
     this.C1 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 5:
     this.C2 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 6:
     this.C3 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 7:
     this.C0_C0 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 8:
     this.C0_C1 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 9:
     this.C0_C2 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 10:
     this.C0_C3 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 11:
     this.C0_C4 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 12:
     this.C0_C5 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 13:
     this.C0_C6 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 14:
     this.C0_C7 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 15:
     this.C0_C8 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 16:
     this.C0_C9 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 17:
     this.C0_C10 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 18:
     this.C0_C11 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 19:
     this.C0_C12 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 20:
     this.C0_C13 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 21:
     this.column_0 = ((_1312001.Cot)(target));
     return;
     case 22:
     this.column_1 = ((_1312001.Cot)(target));
     return;
     case 23:
     this.column_2 = ((_1312001.Cot)(target));
     return;
     case 24:
     this.column_3 = ((_1312001.Cot)(target));
     return;
     case 25:
     this.column_4 = ((_1312001.Cot)(target));
     return;
     case 26:
     this.column_5 = ((_1312001.Cot)(target));
     return;
     case 27:
     this.column_6 = ((_1312001.Cot)(target));
     return;
     case 28:
     this.column_7 = ((_1312001.Cot)(target));
     return;
     case 29:
     this.column_8 = ((_1312001.Cot)(target));
     return;
     case 30:
     this.column_9 = ((_1312001.Cot)(target));
     return;
     case 31:
     this.column_10 = ((_1312001.Cot)(target));
     return;
     case 32:
     this.column_11 = ((_1312001.Cot)(target));
     return;
     case 33:
     this.C2_R0 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 34:
     this.C2_R1 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 35:
     this.C2_R2 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 36:
     this.C2_R3 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 37:
     this.C2_R4 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 38:
     this.C2_R5 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 39:
     this.C2_R7 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 40:
     this.YourName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 41:
     
     #line 69 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Change_Click);
     
     #line default
     #line hidden
     return;
     case 42:
     this.chatBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 43:
     this.input_chat = ((System.Windows.Controls.TextBox)(target));
     return;
     case 44:
     
     #line 76 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Send_Click);
     
     #line default
     #line hidden
     return;
     case 45:
     this.rbt_2Player = ((System.Windows.Controls.RadioButton)(target));
     
     #line 77 "..\..\MainWindow.xaml"
     this.rbt_2Player.Checked += new System.Windows.RoutedEventHandler(this.rbt_2Player_Checked);
     
     #line default
     #line hidden
     return;
     case 46:
     this.rbt_Machine = ((System.Windows.Controls.RadioButton)(target));
     
     #line 78 "..\..\MainWindow.xaml"
     this.rbt_Machine.Checked += new System.Windows.RoutedEventHandler(this.rbt_Machine_Checked);
     
     #line default
     #line hidden
     return;
     case 47:
     this.online = ((System.Windows.Controls.RadioButton)(target));
     
     #line 79 "..\..\MainWindow.xaml"
     this.online.Checked += new System.Windows.RoutedEventHandler(this.online_Checked);
     
     #line default
     #line hidden
     return;
     case 48:
     this.onlineMachine = ((System.Windows.Controls.RadioButton)(target));
     
     #line 80 "..\..\MainWindow.xaml"
     this.onlineMachine.Checked += new System.Windows.RoutedEventHandler(this.onlineMachine_Checked);
     
     #line default
     #line hidden
     return;
     case 49:
     this.btn_Newgame = ((System.Windows.Controls.Button)(target));
     
     #line 81 "..\..\MainWindow.xaml"
     this.btn_Newgame.Click += new System.Windows.RoutedEventHandler(this.btn_Newgame_Click);
     
     #line default
     #line hidden
     return;
     case 50:
     this.container = ((System.Windows.Controls.TextBox)(target));
     
     #line 82 "..\..\MainWindow.xaml"
     this.container.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.container_TextChanged);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\Ban_Co.xaml"
                ((_1312001.Ban_Co)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Board_MouseMove);

            #line default
            #line hidden
                return;

            case 2:
                this.C0_C0 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 3:
                this.C0_C1 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 4:
                this.C0_C2 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 5:
                this.C0_C3 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 6:
                this.C0_C4 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 7:
                this.C0_C5 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 8:
                this.C0_C6 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 9:
                this.C0_C7 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 10:
                this.C0_C8 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 11:
                this.C0_C9 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 12:
                this.C0_C10 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 13:
                this.C0_C11 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 14:
                this.C0_C12 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 15:
                this.C0_C13 = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 16:
                this.column_0 = ((_1312001.Cot)(target));
                return;

            case 17:
                this.column_1 = ((_1312001.Cot)(target));
                return;

            case 18:
                this.column_2 = ((_1312001.Cot)(target));
                return;

            case 19:
                this.column_3 = ((_1312001.Cot)(target));
                return;

            case 20:
                this.column_4 = ((_1312001.Cot)(target));
                return;

            case 21:
                this.column_5 = ((_1312001.Cot)(target));
                return;

            case 22:
                this.column_6 = ((_1312001.Cot)(target));
                return;

            case 23:
                this.column_7 = ((_1312001.Cot)(target));
                return;

            case 24:
                this.column_8 = ((_1312001.Cot)(target));
                return;

            case 25:
                this.column_9 = ((_1312001.Cot)(target));
                return;

            case 26:
                this.column_10 = ((_1312001.Cot)(target));
                return;

            case 27:
                this.column_11 = ((_1312001.Cot)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 11
0
 public int setImageOnl(Point p, Cot c)
 {
     setImage_AutoGoOnl((int)p.X, (int)p.Y, c);
     return(addToaDo(p, 0));
 }
Ejemplo n.º 12
0
 public int setImageOff(Point p, Cot c)
 {
     setImage_AutoGoOff((int)p.X, (int)p.Y, c);
     return(addToaDo(p, 1));
 }
Ejemplo n.º 13
0
 void setImage_AutoGoOnl(int x, int y, Cot c)
 {
     c.setImageAutoGoOnl(y);
 }