/// <summary> /// Constructor class /// </summary> public MainForm() { InitializeComponent(); PluginReporter.Instance().OnAdd += ShowError; _typeErrorToTextBoxDictionary = new Dictionary <PluginReporter.TypeError, TextBox>() { { PluginReporter.TypeError.ErrorStandHeight, StandHeightTextBox }, { PluginReporter.TypeError.ErrorStandDiameter, StandDiameterTextBox }, { PluginReporter.TypeError.ErrorLegHeight, LegHeightTextBox }, { PluginReporter.TypeError.ErrorLegWidth, LegWidthTextBox }, { PluginReporter.TypeError.ErrorLegThikness, LegThiknessTextBox }, { PluginReporter.TypeError.ErrorScreenHeight, ScreenHeightTextBox }, { PluginReporter.TypeError.ErrorScreenWidth, ScreenWidthTextBox }, { PluginReporter.TypeError.ErrorScreenThikness, ScreenThiknessTextBox }, }; }
/// <summary> /// Error display method /// </summary> private void ShowError() { MessageBox.Show(PluginReporter.Instance().GetLastError(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }