Exemplo n.º 1
0
 static void Main()
 {
     UsersSystem.Init();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     FormsSystem.Init();
     Application.Run();
 }
Exemplo n.º 2
0
 private void TryLogin(string login, string password)
 {
     try
     {
         UsersSystem.Login(login, password);
         FormsSystem.ChangeForm(new Menu());
     }
     catch (WrongUserDataException)
     {
         MessageBox.Show("Неверно введены логин или пароль!");
     }
 }
Exemplo n.º 3
0
 private bool TryCreate(string login, string password)
 {
     try
     {
         UsersSystem.CreateUser(login, password);
         return(true);
     }
     catch (UserExistsException)
     {
         return(false);
     }
 }