Exemple #1
0
 public static FrmCalendar GetSingleton()
 {
     if (frm == null || frm.IsDisposed)
     {
         frm = new FrmCalendar();
     }
     return(frm);
 }
Exemple #2
0
        private void tsmiWorkCalendar_Click(object sender, EventArgs e)
        {
            //{
            //    if (Application.OpenForms["FrmCalendar"] != null)
            //    {
            //        Application.OpenForms["FrmCalendar"].Show();
            //    }
            //    else
            //    {
            //        FrmCalendar frm = new FrmCalendar();
            //        frm.MdiParent = this;
            //        frm.Show();
            //    }
            //}
            FrmCalendar frm = FrmCalendar.GetSingleton();

            frm.MdiParent = this;
            frm.Show();
            frm.Activate();
        }
Exemple #3
0
 private void FrmCalendar_FormClosing(object sender, FormClosingEventArgs e)
 {
     frm = null;
 }