コード例 #1
0
 private void mnuAddressBook_Click(object sender, EventArgs e)
 {
     if (objAddressForm == null)
     {
         objAddressForm           = new AddressbookForm();
         objAddressForm.MdiParent = this;
         objAddressForm.Show();
         objAddressForm.FormClosing += objAddressForm_FormClosing;
     }
     else
     {
         objAddressForm.Activate();
     }
 }
コード例 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LoginForm obj = new LoginForm();
            Form      frm;

            if (obj.ShowDialog() == DialogResult.OK)
            {
                if (Helper.Role == "Admin")
                {
                    frm = new MDIParentForm();
                }
                else
                {
                    frm = new AddressbookForm();
                }
                Application.Run(frm);
            }
        }
コード例 #3
0
 void objAddressForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     objAddressForm = null;
 }