예제 #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;
 }