public MainForm() { InitializeComponent(); GlobalKeyEvents globalKeyEvents = new GlobalKeyEvents(); globalKeyEvents.SubscribeGlobal(); FormClosing += globalKeyEvents.Main_Closing; globalKeyEvents.MacroEventHandler += MacroEventListener; macroService = new MacroService(tagsService); tagsService.PrintTags(splitContainer.Panel1.Controls); macroService.PrintMacros(splitContainer.Panel2.Controls); macroService.RefreshMacrosHandler += RemoveMacrosEvent; tagsService.refreshTagsHandler += RemoveTagsEvent; }
/// <summary> /// Remove all the buttons from the screen. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RemoveMacrosEvent(object sender, EventArgs e) { RemoveMacroButtons(); macroService.PrintMacros(splitContainer.Panel2.Controls); }