void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((WpfApplication4.MainWindow)(target));
                return;

            case 2:
                this.Button_Login = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.Button_Login.Click += new System.Windows.RoutedEventHandler(this.Button_Login_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.Button_Close = ((System.Windows.Controls.Button)(target));

            #line 39 "..\..\MainWindow.xaml"
                this.Button_Close.Click += new System.Windows.RoutedEventHandler(this.Button_Close_Click);

            #line default
            #line hidden
                return;

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

            #line 40 "..\..\MainWindow.xaml"
                this.Button_Minimize.Click += new System.Windows.RoutedEventHandler(this.Button_Minimize_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.comboBox_UserName = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.TextBox_Password = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.TextBlock_Password = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.TextBlock_UserName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.Logo_png = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            bool check = Requests.MethodsAdmininstrator.Check(new Context(), Login.Text, Password.Text);
            if (check == true)
            {
                Entities.Waiter w = Requests.MethodsWaiter.GetWaiterByLogin(context, Login.Text);
                MakingOrder mo = new MakingOrder(w.WaiterID);
                mo.Show();

                MainWindow mw = new MainWindow();
                mw.Show();
                this.Close();
            }
            else { MessageBox.Show("Логин или пароль введены неверно."); }
        }
Exemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Kill_the_Chickens = ((WpfApplication4.MainWindow)(target));
                return;

            case 2:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 3:
                this.scoreLabel = ((System.Windows.Controls.Label)(target));
                return;

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

            #line 17 "..\..\MainWindow.xaml"
                this.resetButton.Click += new System.Windows.RoutedEventHandler(this.resetButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.timeLeft = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.username = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.highscoreLabel = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemplo n.º 4
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     MainWindow MainWindow = new MainWindow();
     MainWindow.ShowDialog();
 }