Esempio n. 1
0
 private void Tray_MouseDoubleClick(object sender, EventArgs e)
 {
     GameMasterProcess.Interrupt();
     MainFormHelper.Show();
     Tray.Visible = false;
     WindowState  = FormWindowState.Normal;
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 private void P_Exited(object sender, EventArgs e)
 {
     Hook.Dispose();
     Timer.Dispose();
     StopLogging();
     Overlay.Clear();
     Overlay = null;
     MainFormHelper.Get().ProcessEnded();
 }
Esempio n. 4
0
        /// <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);
        }
Esempio n. 5
0
 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();
 }
Esempio n. 6
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(MainFormHelper.Get());
 }
Esempio n. 7
0
 public EditorForm()
 {
     InitializeComponent();
     game = MainFormHelper.Get().SelectedRuleset;
 }
Esempio n. 8
0
 private void btExit_Click(object sender, EventArgs e)
 {
     MainFormHelper.Show();
     Close();
 }