public void OpenLoginDialog(string login = null, string pwrd = null)
        {
            if (loginDialogIsShown) return;
            try
            {
                loginDialogIsShown = true;
                var dlg = new LoginForm(this);
                if (!string.IsNullOrEmpty(login))
                    dlg.Login = login;
                if (!string.IsNullOrEmpty(pwrd))
                    dlg.Password = pwrd;
                var dlgResult = dlg.ShowDialog();
                UserSettings.Instance.HidePasswordChars = dlg.HidePassword;

                if (dlgResult != DialogResult.Yes) return;
                if (!AccountStatus.Instance.isAuthorized) return;
                // показать диалог выбора счета
                var dlgAc = new SelectAccountForm();
                dlgAc.ShowDialog();
                HistoryOrderStorage.Instance.HurryUpUpdate();
            }
            finally
            {
                loginDialogIsShown = false;
            }
        }
Beispiel #2
0
 // ReSharper restore MemberCanBeMadeStatic.Local
 // ReSharper disable MemberCanBeMadeStatic.Local
 private void MenuitemSelectAccountClick(object sender, EventArgs e)
 {
     if (!AccountStatus.Instance.isAuthorized) return;
     var dlg = new SelectAccountForm();
     dlg.ShowDialog();
     HistoryOrderStorage.Instance.HurryUpUpdate();
 }