コード例 #1
0
ファイル: Form1.cs プロジェクト: marcagas/Migatsu-Inventory
        private void supplierToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF           = new AddNewSupplier();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
コード例 #2
0
        public void showAddNewSupplierForm()
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF           = new AddNewSupplier();
                    ARF.MdiParent = this.MdiParent;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
コード例 #3
0
        public void showAddNewSupplierForm()
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF = new AddNewSupplier();
                    ARF.MdiParent = this.MdiParent;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: marcagas/Migatsu-Inventory
        private void supplierToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF = new AddNewSupplier();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }