Example #1
0
        /// <summary>
        /// Fetches the current model settings file and sets the data in the form
        /// </summary>
        public void initModelSettings()
        {
            // Get the model settings file
            modelSettings = FetchSettings.FindOrCreateSettings();

            // Get the list of labels in the current model
            this.labelFiles = Labels.LabelHelper.GetLabelFiles();

            this.BindData();
        }
        /// <summary>
        /// Called when user clicks on the add-in menu
        /// </summary>
        /// <param name="e">The context of the VS tools and metadata</param>
        public override void OnClick(AddinEventArgs e)
        {
            try
            {
                // Read the model Settings
                var modelSettings = FetchSettings.FindOrCreateSettings();

                // Send the model settings to the UI
                ModelSettingsUI modelSettingsUI = new ModelSettingsUI();
                var             dialogResult    = modelSettingsUI.ShowDialog();
                if (dialogResult == System.Windows.Forms.DialogResult.OK)
                {
                }
            }
            catch (Exception ex)
            {
                CoreUtility.HandleExceptionWithErrorMessage(ex);
            }
        }