コード例 #1
0
ファイル: FormAccounts.cs プロジェクト: fivaz/food-vb
 public static FormAccounts getInstance()
 {
     if (instance == null)
     {
         instance = new FormAccounts();
     }
     return(instance);
 }
コード例 #2
0
        private void gérerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool IsOpen = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Text == "FormDishes")
                {
                    IsOpen = true;
                    f.Focus();
                    break;
                }
            }

            if (IsOpen == false)
            {
                FormAccounts f2 = new FormAccounts();
                f2.MdiParent = this;
                f2.Show();
            }
        }
コード例 #3
0
        private void FormAddAccount_FormClosing(object sender, FormClosingEventArgs e)
        {
            FormAccounts form = FormAccounts.getInstance();

            form.refreshData();
        }
コード例 #4
0
ファイル: FormAccounts.cs プロジェクト: fivaz/food-vb
 public FormAccounts()
 {
     InitializeComponent();
     instance = this;
 }