private void Tray_MouseDoubleClick(object sender, EventArgs e) { GameMasterProcess.Interrupt(); MainFormHelper.Show(); Tray.Visible = false; WindowState = FormWindowState.Normal; }
/// <summary> /// Called when the game process has been terminated /// </summary> public void ProcessEnded() { Running = false; MainFormHelper.Show(); WindowState = FormWindowState.Normal; Tray.Visible = false; GameMasterProcess = null; }
private void P_Exited(object sender, EventArgs e) { Hook.Dispose(); Timer.Dispose(); StopLogging(); Overlay.Clear(); Overlay = null; MainFormHelper.Get().ProcessEnded(); }
/// <summary> /// Moves the rulesets to the proper folder /// </summary> /// <param name="Name">The folder name</param> private bool FileHandling(string folder) { Configuration ruleset = Configuration.TryLoadConfig(folder); if (ruleset == null) { return(false); } string[] pathElements = folder.Split('\\'); Directory.Move(Path.Combine(TempDirectory, pathElements[pathElements.Length - 1]), Path.Combine(RulesetDirectory, pathElements[pathElements.Length - 1])); MainFormHelper.Get().Games.Add(ruleset); MainFormHelper.Get().UpdateList(); return(true); }
public GameMasterProcess(Configuration game) { Configuration = game; Hook.KeyPressed += InputHandling; Hook.RegisterHotKey(ModifierKeys.Control, Keys.F3); Hook.RegisterHotKey(ModifierKeys.Control, Keys.F4); Hook.RegisterHotKey(ModifierKeys.Control, Keys.F5); SetupKeyPressEvents(); GameProcess = Process.Start(game.Executable); GameProcess.EnableRaisingEvents = true; GameProcess.Exited += P_Exited; StartLogging(); Log("Process started"); MainFormHelper.Get().ProcessStarted(); Overlay.Initialize(); Overlay.Run(); Log("Overlay started"); StartUpdates(); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(MainFormHelper.Get()); }
public EditorForm() { InitializeComponent(); game = MainFormHelper.Get().SelectedRuleset; }
private void btExit_Click(object sender, EventArgs e) { MainFormHelper.Show(); Close(); }