Beispiel #1
0
 public static FormAccounts getInstance()
 {
     if (instance == null)
     {
         instance = new FormAccounts();
     }
     return(instance);
 }
Beispiel #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();
            }
        }
Beispiel #3
0
        private void FormAddAccount_FormClosing(object sender, FormClosingEventArgs e)
        {
            FormAccounts form = FormAccounts.getInstance();

            form.refreshData();
        }
Beispiel #4
0
 public FormAccounts()
 {
     InitializeComponent();
     instance = this;
 }