Exemple #1
0
 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);
        }
Exemple #3
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();
 }
Exemple #4
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(MainFormHelper.Get());
 }
 public EditorForm()
 {
     InitializeComponent();
     game = MainFormHelper.Get().SelectedRuleset;
 }