コード例 #1
0
ファイル: RentExpense.cs プロジェクト: Heuvelmann/work-back
 public static RentExpense GetInstance()
 {
     if (reform == null || reform.IsDisposed)
     {
         reform = new RentExpense();
     }
     return(reform);
 }
コード例 #2
0
        private void barButtonItem租赁费用_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool isopen = true;

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