Ejemplo n.º 1
0
 public static Depreciation GetInstance()
 {
     if (dlform == null || dlform.IsDisposed)
     {
         dlform = new Depreciation();
     }
     return(dlform);
 }
Ejemplo n.º 2
0
        private void barButtonItem折旧费用_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool isopen = true;

            foreach (Form f in this.MdiChildren)
            {
                if (f.Name == "Depreciation")
                {
                    f.Visible = true;
                    f.Activate();
                    f.WindowState = FormWindowState.Maximized;
                    isopen        = false;
                    break;
                }
            }
            if (isopen)
            {
                Depreciation Frm = Depreciation.GetInstance();
                Frm.MdiParent   = this;
                Frm.WindowState = FormWindowState.Maximized;
                Frm.Show();
            }
        }