예제 #1
0
        private void LanguageStylesButton_Click(object sender, RibbonControlEventArgs e)
        {
            LanguageStyleForm form = new LanguageStyleForm(addIn.Colorizer);

            System.Windows.Forms.DialogResult result = form.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                form.SaveCurrentElementIfChanged(false);
                form.SaveLanguagePropertiesIfChanged(false);
            }
            if (form.ColorizerReassigned)
            {
                addIn.Colorizer = form.Colorizer;
            }
            if (form.LanguageListChanged) // already uses the new Colorizer if it was replaced
            {
                InitializeLanguageList();
            }
            form.Dispose();
        }
 private void LanguageStylesButton_Click(object sender, RibbonControlEventArgs e)
 {
     LanguageStyleForm form = new LanguageStyleForm(addIn.Colorizer);
     System.Windows.Forms.DialogResult result = form.ShowDialog();
     if (result == System.Windows.Forms.DialogResult.OK)
     {
         form.SaveCurrentElementIfChanged(false);
         form.SaveLanguagePropertiesIfChanged(false);
     }
     if (form.ColorizerReassigned)
     {
         addIn.Colorizer = form.Colorizer;
     }
     if (form.LanguageListChanged) // already uses the new Colorizer if it was replaced
     {
         InitializeLanguageList();
     }
     form.Dispose();
 }