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

            form.refreshData();
        }
Exemplo n.º 4
0
 public FormAccounts()
 {
     InitializeComponent();
     instance = this;
 }