Exemple #1
0
 private void btnHome_Click(object sender, EventArgs e)
 {
     int nI = 0;
     foreach (Form form in Application.OpenForms)
     {
         if (form.Name == "frmMonitorView")
         {
             form.Activate();
             form.BringToFront();
             nI++;
         }
     }
     if (nI == 0)
     {
         frmMonitorView MonitorView = new frmMonitorView();
         MonitorView.MdiParent = this;
         this.splitContainer2.Panel2.Controls.Add(MonitorView);
         MonitorView.Dock = DockStyle.Fill;
         MonitorView.Show();
     }
 }
Exemple #2
0
        private void btnHome_Click(object sender, EventArgs e)
        {
            int nI = 0;

            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "frmMonitorView")
                {
                    form.Activate();
                    form.BringToFront();
                    nI++;
                }
            }
            if (nI == 0)
            {
                frmMonitorView MonitorView = new frmMonitorView();
                MonitorView.MdiParent = this;
                this.splitContainer2.Panel2.Controls.Add(MonitorView);
                MonitorView.Dock = DockStyle.Fill;
                MonitorView.Show();
            }
        }
Exemple #3
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel2.Text = userName.ToString();

            int nI = 0;

            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "frmMonitorView")
                {
                    form.Activate();
                    form.BringToFront();
                    nI++;
                }
            }
            if (nI == 0)
            {
                frmMonitorView MonitorView = new frmMonitorView();
                MonitorView.MdiParent = this;
                this.splitContainer2.Panel2.Controls.Add(MonitorView);
                MonitorView.Dock = DockStyle.Fill;
                MonitorView.Show();
            }
        }
Exemple #4
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel2.Text = userName.ToString();

            int nI = 0;
            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "frmMonitorView")
                {
                    form.Activate();
                    form.BringToFront();
                    nI++;
                }
            }
            if (nI == 0)
            {
                frmMonitorView MonitorView = new frmMonitorView();
                MonitorView.MdiParent = this;
                this.splitContainer2.Panel2.Controls.Add(MonitorView);
                MonitorView.Dock = DockStyle.Fill;
                MonitorView.Show();
            }
        }