Exemplo n.º 1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (tryPassword == 0)
     {
         this.Close();
     }
     if (UserName.Text == "admin" && Password.Password == "admin")
     {
         MessageBox.Show("Login succesfull");
         var programWindow = new ProgramWindow();
         programWindow.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Login failed. Remaining trials:" + tryPassword);
         tryPassword--;
     };
 }
Exemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ProgramWindowWindow = ((PoS.ProgramWindow)(target));
                return;

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

            #line 14 "..\..\ProgramWindow.xaml"
                this.EmployeesAccountButton.Click += new System.Windows.RoutedEventHandler(this.EmployeesAccountButton_Click);

            #line default
            #line hidden
                return;

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

            #line 15 "..\..\ProgramWindow.xaml"
                this.CustomerAccountButton.Click += new System.Windows.RoutedEventHandler(this.CustomerAccountButton_Click);

            #line default
            #line hidden
                return;

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

            #line 16 "..\..\ProgramWindow.xaml"
                this.ManageProductButton.Click += new System.Windows.RoutedEventHandler(this.ManageProductButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.InventoryItemsButton = ((System.Windows.Controls.Button)(target));

            #line 17 "..\..\ProgramWindow.xaml"
                this.InventoryItemsButton.Click += new System.Windows.RoutedEventHandler(this.InventoryItemsButton_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.LedgersButton = ((System.Windows.Controls.Button)(target));

            #line 18 "..\..\ProgramWindow.xaml"
                this.LedgersButton.Click += new System.Windows.RoutedEventHandler(this.LedgersButton_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.DailyDetailsButton = ((System.Windows.Controls.Button)(target));

            #line 19 "..\..\ProgramWindow.xaml"
                this.DailyDetailsButton.Click += new System.Windows.RoutedEventHandler(this.DailyDetailsButton_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.PrintInvoiceButton = ((System.Windows.Controls.Button)(target));

            #line 20 "..\..\ProgramWindow.xaml"
                this.PrintInvoiceButton.Click += new System.Windows.RoutedEventHandler(this.PrintInvoiceButton_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.ProgramFrame = ((System.Windows.Controls.Frame)(target));

            #line 21 "..\..\ProgramWindow.xaml"
                this.ProgramFrame.SizeChanged += new System.Windows.SizeChangedEventHandler(this.ProgramFrame_SizeChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }