/// <summary> /// 執行登入功能 /// </summary> private void ShowSignIn() { SignIn signIn = new SignIn(); this.Hide(); this.DialogResult = signIn.ShowDialog(); if (this.DialogResult == DialogResult.OK) { Account = signIn.Msg; this.Text = signIn.Msg; this.Show(); signIn.Close(); if (HaveOpened(this, "AuthorityManagement")) { AuthorityManagement authorityManagement = new AuthorityManagement(signIn.Msg) { MdiParent = this }; authorityManagement.Show(); } } else if (this.DialogResult == DialogResult.Cancel) { this.Close(); } }
/// <summary> /// 開權限管理功能視窗 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AuthorityBtn_Click(object sender, EventArgs e) { if (HaveOpened(this, "AuthorityManagement")) { AuthorityManagement authorityManagement = new AuthorityManagement(Account) { MdiParent = this }; CloseFrom("AuthorityManagement"); authorityManagement.Show(); } }