/// <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(); }
private void btnOk_Click(object sender, EventArgs e) { modelSettings.Prefix = this.textPrefix.Text; modelSettings.Suffix = this.textSuffix.Text; //Add languages to update modelSettings.LabelsToUpdate.Clear(); modelSettings.LabelsToUpdate.AddRange(this.listBoxLangSelected.Items.Cast <string>().ToList()); // Save the model FetchSettings.SaveSettings(modelSettings); this.Close(); }
/// <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); } }