Exemple #1
0
 private bool ShowDLPScreen()
 {
     try
     {
         Screen dlpscreen = null;
         foreach (Screen s in Screen.AllScreens)
         {
             if (s.DeviceName.Equals(UVDLPApp.Instance().m_printerinfo.m_monitorid))
             {
                 dlpscreen = s;
                 break;
             }
         }
         if (dlpscreen == null)
         {
             return(false);
         }
         if (m_frmdlp.IsDisposed)
         {
             m_frmdlp = new frmDLP();//recreate
         }
         m_frmdlp.Show();
         m_frmdlp.SetDesktopBounds(dlpscreen.Bounds.X, dlpscreen.Bounds.Y, dlpscreen.Bounds.Width, dlpscreen.Bounds.Height);
         m_frmdlp.WindowState     = FormWindowState.Maximized;
         m_frmdlp.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         return(true);
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogRecord(ex.Message);
         return(false);
     }
 }
 private void GenerateForms()
 {
     if (m_displays != null)
     {
         //close all previous forms and get rid of them
         foreach (frmDLP frm in m_displays)
         {
             frm.Hide();
             frm.Dispose();
             //frm = null;
         }
         m_displays.Clear();
     }
     foreach (MonitorConfig mc in UVDLPApp.Instance().m_printerinfo.m_lstMonitorconfigs)
     {
         frmDLP frm = new frmDLP();
         frm.Setup(mc.Monitorid, mc);
         m_displays.Add(frm);
     }
 }
 private bool ShowDLPScreen()
 {
     try
     {
         Screen dlpscreen = GetDLPScreen();
         if (m_frmdlp.IsDisposed)
         {
             m_frmdlp = new frmDLP();//recreate
         }
         m_frmdlp.Show();
         m_frmdlp.SetDesktopBounds(dlpscreen.Bounds.X, dlpscreen.Bounds.Y, dlpscreen.Bounds.Width, dlpscreen.Bounds.Height);
         m_frmdlp.WindowState = FormWindowState.Maximized;
         m_frmdlp.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         return true;
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogRecord(ex.Message);
         return false;
     }
 }
        private void GenerateForms() 
        {
            if (m_displays != null) 
            {
                //close all previous forms and get rid of them
                foreach (frmDLP frm in m_displays) 
                {
                    frm.Hide();
                    frm.Dispose();
                    //frm = null;
                }
                m_displays.Clear();
            }
            foreach (MonitorConfig mc in UVDLPApp.Instance().m_printerinfo.m_lstMonitorconfigs) 
            {
                frmDLP frm = new frmDLP();
                frm.Setup(mc.Monitorid, mc.m_monitorrect);
                m_displays.Add(frm);
            }

        }
 private bool ShowDLPScreen()
 {
     try
     {
         Screen dlpscreen = null;
         foreach (Screen s in Screen.AllScreens)
         {
             if (s.DeviceName.Equals(UVDLPApp.Instance().m_printerinfo.m_monitorid))
             {
                 dlpscreen = s;
                 break;
             }
         }
         if (dlpscreen == null)
             return false;
         if (m_frmdlp.IsDisposed)
         {
             m_frmdlp = new frmDLP();//recreate
         }
         m_frmdlp.Show();
         m_frmdlp.SetDesktopBounds(dlpscreen.Bounds.X, dlpscreen.Bounds.Y, dlpscreen.Bounds.Width, dlpscreen.Bounds.Height);
         m_frmdlp.WindowState = FormWindowState.Maximized;
         m_frmdlp.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         return true;
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogRecord(ex.Message);
         return false;
     }
 }