Exemple #1
0
 public void Run()
 {
     if (enableDevWarning == true)
     {
         if (Properties.Settings.Default.NeverShowThisAgain == false)
         {
             using (var devWarnBox = new DevWarningBox())
             {
                 devWarnBox.ShowDialog();
             }
         }
     }
     RenderLoop.Run(this, () =>
     {
         // Another option is not use RenderLoop at all and call Render when needed, and call here every tick for animations
         if (bRender && !deviceLost)
         {
             Render();
         }
         if (mouseMoved)
         {
             OnMouseMove(lastEvent);
             mouseMoved = false;
         }
     });
     //Application.DoEvents();
 }
Exemple #2
0
 public void Run()
 {
     if (enableDevWarning == true)
     {
         using (var devWarnBox = new DevWarningBox())
         {
             devWarnBox.ShowDialog();
         }
     }
     RenderLoop.Run(this, () =>
     {
         // Another option is not use RenderLoop at all and call Render when needed, and call here every tick for animations
         if (bRender)
         {
             Render();
         }
         if (mouseMoved)
         {
             OnMouseMove(lastEvent);
             mouseMoved = false;
         }
         Application.DoEvents();
     });
 }