예제 #1
0
        private void processClientOrderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ProcessOrder ARF = null;

                if (IsFormAlreadyOpen(typeof(ProcessOrder)) == null)
                {
                    ARF           = new ProcessOrder();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(ProcessOrder));
                    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
        private void processClientOrderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ProcessOrder ARF = null;

                if (IsFormAlreadyOpen(typeof(ProcessOrder)) == null)
                {
                    ARF = new ProcessOrder();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(ProcessOrder));
                    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());
            }
        }