コード例 #1
0
 public void Dispose()
 {
   if (_mainForm == null)
     return;
   _mainForm.DisposeDirectX();
   _mainForm.Dispose();
   _screenManager = null;
   _mainForm = null;
 }
コード例 #2
0
    public void Startup()
    {
      ILogger logger = ServiceRegistration.Get<ILogger>();
      logger.Info("SkinEnginePlugin: Startup");
#if DEBUG
      // Enable object tracking only in debug builds, as it adds overhead to each object creation.
      SharpDX.Configuration.EnableObjectTracking = true;
#endif

      logger.Debug("SkinEnginePlugin: Create DirectX main window");
      _mainForm = new MainForm(_screenManager);
      // Install background manager before the mainform gets visible
      _screenManager.InstallBackgroundManager();
      _mainForm.Visible = true;
      _mainForm.Start();

      logger.Debug("SkinEnginePlugin: Switching workflow manager to home state");
      ServiceRegistration.Get<IWorkflowManager>().NavigatePush(new Guid(HOME_STATE_STR));

      logger.Debug("SkinEnginePlugin: Registering default key bindings");
      RegisterGlobalKeyBindings();
    }