예제 #1
0
        private void CreateOverlays()
        {
            var graphics = new Graphics
            {
                MeasureFPS = true,
                PerPrimitiveAntiAliasing  = true,
                TextAntiAliasing          = true,
                UseMultiThreadedFactories = false,
                VSync        = true,
                WindowHandle = IntPtr.Zero
            };

            window = new GraphicsWindow(graphics)
            {
                IsTopmost = true,
                IsVisible = true,
                FPS       = 60,
                X         = 0,
                Y         = 0,
                Width     = actualScreenWidth,
                Height    = actualScreenHeight
            };

            window.SetupGraphics   += Window_SetupGraphics;
            window.DestroyGraphics += Window_DestroyGraphics;
            window.DrawGraphics    += Window_DrawGraphics;

            window.StartThread();
        }
        public void Run()
        {
            // creates the window and setups the graphics
            _window.StartThread();

            while (true)
            {
                Thread.Sleep(100);
            }
        }
예제 #3
0
        public bool Run()
        {
            if (!IsRunning)
            {
                IsRunning = true;

                // creates the window and setups the graphics
                _window.StartThread();

                return(true);
            }

            return(false);
        }
예제 #4
0
 /// <summary>
 /// Creates the window and setups the graphics
 /// </summary>
 public void Run(IEnumerable <PrimePart> primeParts)
 {
     _primeParts = primeParts;
     _window.StartThread();
 }
예제 #5
0
 public void Run()
 {
     // creates the window and setups the graphics
     _window.StartThread();
 }