private void Authorization_Click(object sender, RoutedEventArgs e) { try { UserModel OldUser = new UserModel() { Login = Login.Text, Password = Password.Password }; switch (UserLogic.Authorization(OldUser)) { case 1: ClientMainWindow client = new ClientMainWindow(); client.Show(); this.Close(); break; case 2: MasterMainWindow master = new MasterMainWindow(); master.Show(); this.Close(); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ProgramMainIcon_MouseClick(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: ClientMainWindow window = ClientMainWindow.GetWindow(true); window.Show(); break; } }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { ClientMainWindow window = ClientMainWindow.GetWindow(true); window.Show(); }