Ejemplo n.º 1
0
        public virtual void CleanUp()
        {
            if (LauncherProcess != null)
            {
                LauncherProcess.Dispose();
                LauncherProcess = null;
            }

            if (GameProcess == null)
            {
                GameProcess = TryToGetGameProcess();
            }

            if (GameProcess != null)
            {
                try {
                    if (!GameProcess.HasExitedSafe())
                    {
                        GameProcess.Kill();
                    }
                } catch (Exception e) {
                    Logging.Warning("Process killing exception: " + e);
                }

                GameProcess.Dispose();
                GameProcess = null;
            }
        }
Ejemplo n.º 2
0
 private static void Dispose()
 {
     GameData.Dispose();
     GameData = default;
     GameProcess.Dispose();
     GameProcess = default;
 }
        /// <inheritdoc />
        public void Dispose()
        {
            GameData.Dispose();
            GameData = default;

            GameProcess.Dispose();
            GameProcess = default;
        }
Ejemplo n.º 4
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            _appConfig.IsAutoSendEnabled = UserSettingsBlock.AutosendCheck.IsToggled;
            _appConfig.LastUsedKey       = UserSettingsBlock.CurrentKeyControl.CurrentKeyTextBlock.Text;
            _appConfigWorker.SaveConfigFile(_appConfig);

            _playbackStateUpdater.Dispose();
            _gameProcess.Dispose();
            _spotify.Dispose();
        }
        /// <inheritdoc />
        public void Dispose()
        {
            WindowOverlay.Dispose();
            WindowOverlay = default;

            GameData.Dispose();
            GameData = default;

            GameProcess.Dispose();
            GameProcess = default;
        }
Ejemplo n.º 6
0
        public void Dispose()
        {
            RequireGlobalStop();

            try { _startWatch?.Dispose(); } catch { /* ignored */ }
            try { _stopWatch?.Dispose(); } catch { /* ignored */ }
            try { GameProcess?.Dispose(); } catch { /* ignored */ }

            _stopWatch  = null;
            GameProcess = null;
        }
        /// <inheritdoc />
        public void Dispose()
        {
            TriggerBot.Dispose();
            TriggerBot = default;

            Graphics.Dispose();
            Graphics = default;

            WindowOverlay.Dispose();
            WindowOverlay = default;

            GameData.Dispose();
            GameData = default;

            GameProcess.Dispose();
            GameProcess = default;
        }
Ejemplo n.º 8
0
 public void Stop()
 {
     if (IsGameProcessRunning)
     {
         write("Stopping Server...", Color.Yellow);
         SendMessage("quit");
         while (!GameProcess.HasExited)
         {
             Thread.Sleep(1);
         }
         GameProcess.Dispose();
         GameProcess = null;
         write("Stopped Server", Color.Green);
     }
     DeleteSession();
     if (!restarting)
     {
         Program.stopServer(this);
     }
 }
Ejemplo n.º 9
0
 private static void onClose(object sender, EventArgs args)
 {
     process?.Dispose();
     requestsManager?.Dispose();
     trackInfoUpdater?.Dispose();
 }