Beispiel #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWin = ((tic_tac_toe.EnterName)(target));

            #line 8 "..\..\EnterName.xaml"
                this.MainWin.Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.tbMessage = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.tbName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.btOK = ((System.Windows.Controls.Button)(target));

            #line 14 "..\..\EnterName.xaml"
                this.btOK.Click += new System.Windows.RoutedEventHandler(this.BtOK_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();
            TimerForEnd.Tick    += new EventHandler(Update);
            TimerForEnd.Interval = 1000;
            for (int i = 0; i < CountCells; i++)
            {
                PlayingField[i] = new cell[CountCells];
                BorderField[i]  = new Border[CountCells];
            }
            EnterName enterName = new EnterName();

            NameSecondPlayer = enterName.ShowDialog(true);
            enterName        = new EnterName();
            NameFirstPlayer  = enterName.ShowDialog(false);
            Start();
        }