Exemplo n.º 1
0
 private void ShowAccountControl()
 {
     try
     {
         lblLogin.Hide();
         _ctrlAccount = new ctrlAccount();
         pnlHost.Controls.Add(_ctrlAccount);
         _ctrlAccount.Dock = DockStyle.Fill;
         _ctrlAccount.Show();
         this.Text = SelectedAccount.Instance.Title;
         miDeleteAccount.Visible = true;
         miEditAccount.Visible = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\n\n" + ex.StackTrace, "Ooops!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
        private void ShowDefaultForm()
        {
            try
            {
                lblLogin.Show();
                _ctrlAccount = null;

                SelectedAccount.Instance.AccountId = 0;
                SelectedAccount.Instance.Title = string.Empty;
                SelectedAccount.Instance.Password = string.Empty;

                this.Text = string.Empty;
                miDeleteAccount.Visible = false;
                miEditAccount.Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\n\n" + ex.StackTrace, "Ooops!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }