public MainForm() { this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); InitializeComponent(); raController = new RAController(); //init forms playbackForm = new PlaybackForm(raController); macroForm = new SettingsForm(); schedulerForm = new SchedulerForm(raController); // load in the current macro setting try { macroKeys = new List <int>(MacroLoader.loadMacro(Directory.GetCurrentDirectory() + "/macro.config")); } catch (FileNotFoundException ex) { Console.WriteLine("Process is being controller by System"); macroKeys = new List <int>(MacroLoader.loadMacro(Environment.GetCommandLineArgs()[1])); Console.WriteLine(ex); } RoutineListener.Start(macroKeys.ToArray()); }
//Closes the form. private void CloseButton_Click(object sender, EventArgs e) { isLocked = false; RoutineListener.Stop(); this.Close(); }