コード例 #1
0
 private void LGWindow_Paint(object sender, PaintEventArgs e)
 {
     if (this.InvokeRequired)
     {
         BeginInvoke((MethodInvoker) delegate() { m_renderer.RenderOneFrame(false, m_frameAllowanceMs); });
     }
     else
     {
         m_renderer.RenderOneFrame(false, m_frameAllowanceMs);
     }
     if (!m_lgb.KeepRunning)
     {
         this.Close();
     }
     return;
 }
コード例 #2
0
 public void LGWindow_Paint(object sender, PaintEventArgs e)
 {
     try {
         if (this.InvokeRequired)
         {
             return; // just wait for the next tick
             // BeginInvoke((MethodInvoker)delegate() { m_renderer.RenderOneFrame(false, m_frameAllowanceMs); });
             // m_log.Log(LogLevel.DVIEW, "LGWindow_Paint: did BeginInvoke");
         }
         else
         {
             m_renderer.RenderOneFrame(false, m_frameAllowanceMs);
         }
     }
     catch (Exception err) {
         m_log.Log(LogLevel.DBADERROR, "LGWindow_Paint: EXCEPTION: {0}", err);
     }
     if (!m_lgb.KeepRunning)
     {
         if (this.InvokeRequired)
         {
             BeginInvoke((MethodInvoker) delegate() { this.Close(); });
         }
         else
         {
             this.Close();
         }
     }
     return;
 }