示例#1
0
 /// <summary>
 /// load the login form 
 /// and display it in the mdi
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FrmParent_Load(object sender, EventArgs e)
 {
     FrmLogin loginFrm = new FrmLogin(this);
     loginFrm.MdiParent = this;
     OrganizeMenuStrip(false); // disable the menu strip
     loginFrm.Show();
 }
示例#2
0
        /// <summary>
        /// load the login form again
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mnuLogout_Click(object sender, EventArgs e)
        {
            closeAllActiveForms();

            FrmLogin loginFrm = new FrmLogin(this);
            loginFrm.MdiParent = this;
            mnuUser.Visible = false; // dont show the user anymore
            OrganizeMenuStrip(false); // and disable the menu strip
            loginFrm.Show();
        }
示例#3
0
 /// <summary>
 /// Constructor for frmLogin to open it from the parent form
 /// </summary>
 /// <param name="frm"></param>
 public FrmLogin(FrmParent frm)
 {
     InitializeComponent();
     _frm = frm;
     FrmLogin loginFrm = new FrmLogin();
 }