private static string UpdateStrongNameByPlatForm(this string ruleSetXml, DotNetPlatForm platForm) { if (ruleSetXml == null) { return(null); } return(Regex.Replace(ruleSetXml, AssemblyStrongNames.NETFRAMEWORK_MATCH, StrongNames[platForm])); }
private static string UpdateStrongNameByPlatForm(this string ruleSetXml, DotNetPlatForm platForm) { if (ruleSetXml == null) { return(null); } ruleSetXml = Regex.Replace(ruleSetXml, AssemblyStrongNames.NETCORE_MATCH, StrongNames[platForm]); ruleSetXml = Regex.Replace(ruleSetXml, AssemblyStrongNames.CODEDOM_NETCORE_MATCH, CodeDomStrongNames[platForm]); return(ruleSetXml); }
private void Initialize() { groupBoxEditRuleSets.Anchor = AnchorStyles.Left | AnchorStyles.Right; txtActivityClass.Anchor = AnchorStyles.Left | AnchorStyles.Right; txtActivityAssembly.Anchor = AnchorStyles.Left | AnchorStyles.Right; txtRuleset.Anchor = AnchorStyles.Left | AnchorStyles.Right; panel3.Anchor = AnchorStyles.Left | AnchorStyles.Right; btnNew.Anchor = AnchorStyles.Top | AnchorStyles.Right; btnEdit.Anchor = AnchorStyles.Top | AnchorStyles.Right; btnLoad.Anchor = AnchorStyles.Top | AnchorStyles.Right; btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Right; lblPlatform.Anchor = AnchorStyles.Top | AnchorStyles.Right; platformComboBox.Anchor = AnchorStyles.Top | AnchorStyles.Right; btnBrowseActivityAssembly.Anchor = AnchorStyles.Top | AnchorStyles.Right; btnBrowseRuleset.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.rulesGroupBox.Anchor = AnchorStyles.Left | AnchorStyles.Right; this.panel2.Anchor = AnchorStyles.Left | AnchorStyles.Right; this.rulesListView.Anchor = AnchorStyles.Left | AnchorStyles.Right; this.platformComboBox.Items.AddRange(new ComboBoxItem[] { new ComboBoxItem(Resources.NetCore, DotNetPlatForm.NetCore), new ComboBoxItem(Resources.NetFramework, DotNetPlatForm.NetFramework), new ComboBoxItem(Resources.UWP, DotNetPlatForm.UWP), new ComboBoxItem(Resources.XamarinAndroid, DotNetPlatForm.XamarinAndroid), new ComboBoxItem(Resources.XamarinIOS, DotNetPlatForm.XamarinIOS), new ComboBoxItem(Resources.XamarinUWP, DotNetPlatForm.XamarinUWP), }); if (Enum.IsDefined(typeof(DotNetPlatForm), Settings.Default.selectedPlatForm)) { DotNetPlatForm selectedPlatForm = (DotNetPlatForm)Enum.Parse(typeof(DotNetPlatForm), Settings.Default.selectedPlatForm); this.platformComboBox.SelectedItem = this.platformComboBox.Items .OfType <ComboBoxItem>() .SingleOrDefault(i => i.PlatForm == selectedPlatForm); } else { this.platformComboBox.SelectedIndex = 0; } this.groupBoxErrors.Anchor = AnchorStyles.Left | AnchorStyles.Right; flowLayoutPanel1.Anchor = AnchorStyles.Left | AnchorStyles.Right; labelErrors.ForeColor = SystemColors.InfoText; labelErrors.BackColor = SystemColors.Info; flowLayoutPanel1.AutoScroll = true; txtActivityClass.Text = Settings.Default.activityClass; txtActivityAssembly.Text = Settings.Default.activityAssembly; txtRuleset.Text = Settings.Default.ruleSet; ValidateButtons(); }
internal static string SerializeRuleSet(object rules, DotNetPlatForm platForm) { StringBuilder ruleSet = new StringBuilder(); WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer(); StringWriter stringWriter = new StringWriter(ruleSet, CultureInfo.InvariantCulture); XmlTextWriter writer = new XmlTextWriter(stringWriter); serializer.Serialize(writer, rules); writer.Flush(); writer.Close(); stringWriter.Flush(); stringWriter.Close(); return(ruleSet.ToString().UpdateStrongNameByPlatForm(platForm)); }
internal ComboBoxItem(string text, DotNetPlatForm platForm) { this.text = text; this.PlatForm = platForm; }