コード例 #1
0
 public static frmMonitor MonitorInstance()
 {
     if ((monitorinstance == null) || monitorinstance.IsDisposed)
     {
         monitorinstance = new frmMonitor();
     }
     return(monitorinstance);
 }
コード例 #2
0
ファイル: frmMonitor.cs プロジェクト: noseii/powerscada2011
 public static frmMonitor MonitorInstance()
 {
     if ((monitorinstance == null) || monitorinstance.IsDisposed)
     {
         monitorinstance = new frmMonitor();
     }
     return monitorinstance;
 }
コード例 #3
0
ファイル: frmHastaAra.cs プロジェクト: noseii/powerscada2011
        private void MonitoruGoster()
        {
            if ((frmMonitor.monitorinstance == null) || frmMonitor.monitorinstance.IsDisposed)
            {
                Screen[] ekranlar = System.Windows.Forms.Screen.AllScreens;
                if (Screen.AllScreens.Length > 1)
                {
                    //yeni from
                    this.monitor = frmMonitor.MonitorInstance();
                    // Önemli !
                    this.monitor.StartPosition = FormStartPosition.Manual;
                    // Ikinci Monitörü tanimla
                    Screen screen = GetScreen();
                    // Ikinci formun location tanimla
                    this.monitor.Location = screen.WorkingArea.Location;
                    // fullscreen yap
                    this.monitor.Size = new Size(screen.WorkingArea.Width, screen.WorkingArea.Height);
                    // formu aç
                    this.monitor.Show(this);
                    this.monitor.listBoxRandevu.Items.Clear();
                }
                else
                {
                    this.monitor = frmMonitor.MonitorInstance();
                    this.monitor.StartPosition = FormStartPosition.Manual;
                    Screen screen = GetScreen();
                    this.monitor.Location = screen.WorkingArea.Location;
                    this.monitor.Size = new Size(screen.WorkingArea.Width, screen.WorkingArea.Height);
                    this.monitor.Show(this);
                    this.monitor.listBoxRandevu.Items.Clear();

                }

            }
        }