Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Context" /> class.
        /// </summary>
        public Context()
        {
            // Create our timer object.
            if (GorgonTimerQpc.SupportsQpc())
            {
                _timer = new GorgonTimerQpc();
            }
            else
            {
                _timer = new GorgonTimerMultimedia();
            }

            // Create the splash screen and the main interface.
            _splashScreen = new formSplash();
            MainForm      = new formMain();                             // Note that we're assign this to the inherited property 'MainForm'.
            // This how the application context knows which form controls the application.

            RunMe();
        }
Пример #2
0
 /// <summary>Initializes a new instance of the <see cref="RenderTargetFactory"/> class.</summary>
 /// <param name="graphics">The graphics interface that owns this factory.</param>
 public RenderTargetFactory(GorgonGraphics graphics)
 {
     _graphics    = graphics;
     _expiryTimer = GorgonTimerQpc.SupportsQpc() ? (IGorgonTimer) new GorgonTimerQpc() : new GorgonTimerMultimedia();
 }