Beispiel #1
0
 /// <summary>
 /// Авторизоваться.
 /// </summary>
 /// <returns>Результат авторизации.</returns>
 public static AuthorizationResult Authorize()
 {
     using (var form = new AuthorizationForm())
     {
         form.ShowDialog();
         return(form._currentState);
     }
 }
Beispiel #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var auth = AuthorizationForm.Authorize();

            if (auth == AuthorizationResult.NotAuthorized)
            {
                return;
            }

            Application.Run(new BmiCalcForm(auth));
        }