示例#1
0
        /// <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 },
            };
        }
示例#2
0
 /// <summary>
 /// Error display method
 /// </summary>
 private void ShowError()
 {
     MessageBox.Show(PluginReporter.Instance().GetLastError(),
                     "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }