Exemplo n.º 1
0
 public static frmMonitor MonitorInstance()
 {
     if ((monitorinstance == null) || monitorinstance.IsDisposed)
     {
         monitorinstance = new frmMonitor();
     }
     return(monitorinstance);
 }
Exemplo n.º 2
0
 public static frmMonitor MonitorInstance()
 {
     if ((monitorinstance == null) || monitorinstance.IsDisposed)
     {
         monitorinstance = new frmMonitor();
     }
     return monitorinstance;
 }
Exemplo n.º 3
0
        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();

                }

            }
        }