Beispiel #1
0
 public About(LCG lcg)
 {
     InitializeComponent();
     this.lcg = lcg;
     pictureBoxLCG.Visible = !lcg.isUML;
     pictureBoxUML.Visible = lcg.isUML;
     if (lcg.isUML)
     {
         linkWebpage.Text = "https://jonasr.app/UML";
     }
     PopulateAssemblies();
 }
Beispiel #2
0
 internal static bool GetSettings(LCG lcg, Settings settings)
 {
     using (var settingdlg = new FormatDialogLCG())
     {
         settingdlg.rbFileCommon.Checked            = lcg.isUML || settings.UseCommonFile;
         settingdlg.rbFilePerEntity.Checked         = !settingdlg.rbFileCommon.Checked;
         settingdlg.cmbFileName.SelectedIndex       = (int)settings.FileName;
         settingdlg.chkFileIncludeSelection.Checked = settings.SaveConfigurationInCommonFile;
         settingdlg.txtNamespace.Text = settings.NameSpace;
         settingdlg.cmbCommonAttributes.SelectedIndex = (int)settings.CommonAttributes;
         settingdlg.cmbConstantName.SelectedIndex     = (int)settings.ConstantName;
         settingdlg.chkConstCamelCased.Checked        = settings.ConstantCamelCased && settings.ConstantName != NameType.DisplayName;
         settingdlg.chkConstStripPrefix.Checked       = settings.DoStripPrefix && settings.ConstantName != NameType.DisplayName;
         settingdlg.txtConstStripPrefix.Text          = settings.StripPrefix;
         settingdlg.chkXmlProperties.Checked          = settings.XmlProperties;
         settingdlg.chkXmlDescription.Checked         = settings.XmlDescription;
         settingdlg.chkRegions.Checked       = settings.Regions;
         settingdlg.chkRelationships.Checked = settings.RelationShips;
         settingdlg.chkEnumsInclude.Checked  = settings.OptionSets;
         settingdlg.chkEnumsGlobal.Checked   = settings.GlobalOptionSets;
         if (settingdlg.ShowDialog(lcg) == DialogResult.OK)
         {
             settings.UseCommonFile = lcg.isUML || settingdlg.rbFileCommon.Checked;
             settings.FileName      = (NameType)Math.Max(settingdlg.cmbFileName.SelectedIndex, 0);
             settings.SaveConfigurationInCommonFile = settingdlg.rbFileCommon.Checked && settingdlg.chkFileIncludeSelection.Checked;
             settings.NameSpace          = settingdlg.txtNamespace.Text;
             settings.CommonAttributes   = (CommonAttributesType)Math.Max(settingdlg.cmbCommonAttributes.SelectedIndex, 0);
             settings.ConstantName       = (NameType)Math.Max(settingdlg.cmbConstantName.SelectedIndex, 0);
             settings.ConstantCamelCased = settingdlg.chkConstCamelCased.Checked;
             settings.DoStripPrefix      = settingdlg.chkConstStripPrefix.Checked;
             settings.StripPrefix        = settingdlg.txtConstStripPrefix.Text.ToLowerInvariant().TrimEnd('_') + "_";
             settings.XmlProperties      = settingdlg.chkXmlProperties.Checked;
             settings.XmlDescription     = settingdlg.chkXmlDescription.Checked;
             settings.Regions            = settingdlg.chkRegions.Checked;
             settings.RelationShips      = settingdlg.chkRelationships.Checked;
             settings.OptionSets         = settingdlg.chkEnumsInclude.Checked;
             settings.GlobalOptionSets   = settingdlg.chkEnumsGlobal.Checked;
             settings.AttributeSortMode  = AttributeSortMode.None;
             return(true);
         }
     }
     return(false);
 }
Beispiel #3
0
 internal static bool GetSettings(LCG lcg, Settings settings)
 {
     using (var settingdlg = new FormatDialogUML())
     {
         settingdlg.chkFileIncludeSelection.Checked = settings.SaveConfigurationInCommonFile;
         settingdlg.txtNamespace.Text               = settings.NameSpace;
         settingdlg.cmbConstantName.SelectedIndex   = (int)settings.ConstantName;
         settingdlg.chkConstCamelCased.Checked      = settings.ConstantCamelCased && settings.ConstantName != NameType.DisplayName;
         settingdlg.chkConstStripPrefix.Checked     = settings.DoStripPrefix && settings.ConstantName != NameType.DisplayName;
         settingdlg.txtConstStripPrefix.Text        = settings.StripPrefix;
         settingdlg.cmbSortAttributes.SelectedIndex = (int)settings.AttributeSortMode;
         settingdlg.chkRelationshipLabels.Checked   = settings.RelationshipLabels;
         settingdlg.chkShowLegend.Checked           = settings.Legend;
         if (settingdlg.ShowDialog(lcg) == DialogResult.OK)
         {
             settings.SaveConfigurationInCommonFile = settingdlg.chkFileIncludeSelection.Checked;
             settings.NameSpace          = settingdlg.txtNamespace.Text;
             settings.ConstantName       = (NameType)Math.Max(settingdlg.cmbConstantName.SelectedIndex, 0);
             settings.ConstantCamelCased = settingdlg.chkConstCamelCased.Checked;
             settings.DoStripPrefix      = settingdlg.chkConstStripPrefix.Checked;
             settings.StripPrefix        = settingdlg.txtConstStripPrefix.Text.ToLowerInvariant().TrimEnd('_') + "_";
             settings.AttributeSortMode  = (AttributeSortMode)Math.Max(settingdlg.cmbSortAttributes.SelectedIndex, 0);
             settings.RelationshipLabels = settingdlg.chkRelationshipLabels.Checked;
             settings.Legend             = settingdlg.chkShowLegend.Checked;
             settings.CommonAttributes   = CommonAttributesType.None;
             settings.XmlProperties      = false;
             settings.XmlDescription     = false;
             settings.Regions            = false;
             settings.RelationShips      = true;
             settings.OptionSets         = false;
             settings.GlobalOptionSets   = false;
             return(true);
         }
     }
     return(false);
 }
 public About(LCG lcg)
 {
     InitializeComponent();
     this.lcg = lcg;
     PopulateAssemblies();
 }