diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.Setup.UserInterface/Editors/BootstrapScriptEditor.cs b/Plugins.UserInterface/UniversalEditor.Plugins.Setup.UserInterface/Editors/BootstrapScriptEditor.cs index 4504a068..50a19013 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.Setup.UserInterface/Editors/BootstrapScriptEditor.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.Setup.UserInterface/Editors/BootstrapScriptEditor.cs @@ -56,11 +56,11 @@ namespace UniversalEditor.Plugins.Setup.UserInterface [EventHandler(nameof(tvPlatforms), "SelectionChanged")] private void tvPlatforms_SelectionChanged(object sender, EventArgs e) { - if (tvPlatforms.SelectedRows.Count < 1) return; - tvParameters.Model.Rows.Clear(); tvFiles.Model.Rows.Clear(); + if (tvPlatforms.SelectedRows.Count < 1) return; + BootstrapOperatingSystem os = tvPlatforms.SelectedRows[0].GetExtraData("item"); foreach (KeyValuePair kvp in os.Parameters) @@ -101,12 +101,15 @@ namespace UniversalEditor.Plugins.Setup.UserInterface { new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("Platform", new Setting[] { new TextSetting("Name", "Platform _name") }) }) }); + + dlg.Text = "Platform Properties"; + dlg.EnableProfiles = false; if (dlg.ShowDialog() == DialogResult.OK) { string platformName = dlg.SettingsProviders[0].SettingsGroups[0].Settings[0].GetValue()?.ToString(); @@ -141,12 +144,15 @@ namespace UniversalEditor.Plugins.Setup.UserInterface { new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("Platform", new Setting[] { new TextSetting("Name", "Platform _name") }) }) }); + dlg.Text = "Platform Properties"; + dlg.EnableProfiles = false; + dlg.SettingsProviders[0].SettingsGroups[0].Settings[0].SetValue(os.Name); if (dlg.ShowDialog() == DialogResult.OK) { @@ -201,13 +207,16 @@ namespace UniversalEditor.Plugins.Setup.UserInterface { new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("Parameter", new Setting[] { new TextSetting("Name", "Parameter _name"), new TextSetting("Value", "_Value") }) }) }); + dlg.Text = "Parameter Properties"; + dlg.EnableProfiles = false; + if (dlg.ShowDialog() == DialogResult.OK) { string name = dlg.SettingsProviders[0].SettingsGroups[0].Settings[0].GetValue()?.ToString(); @@ -243,13 +252,16 @@ namespace UniversalEditor.Plugins.Setup.UserInterface { new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("Parameter", new Setting[] { new TextSetting("Name", "Parameter _name"), new TextSetting("Value", "_Value") }) }) }); + dlg.Text = "Parameter Properties"; + dlg.EnableProfiles = false; + dlg.SettingsProviders[0].SettingsGroups[0].Settings[0].SetValue(oldname); dlg.SettingsProviders[0].SettingsGroups[0].Settings[1].SetValue(os.Parameters[oldname]); if (dlg.ShowDialog() == DialogResult.OK) @@ -311,13 +323,16 @@ namespace UniversalEditor.Plugins.Setup.UserInterface if (os == null) return; SettingsDialog dlg = new SettingsDialog(); + dlg.Text = "File Properties"; + dlg.EnableProfiles = false; + dlg.SettingsProviders.Clear(); dlg.SettingsProviders.Add(new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("File", new Setting[] { - new TextSetting("SourceFileName", "_Source"), - new TextSetting("DestinationFileName", "_Destination") + new FileSetting("SourceFileName", "_Source", null, false), + new FileSetting("DestinationFileName", "_Destination", null, false) }) })); if (dlg.ShowDialog() == DialogResult.OK) @@ -358,13 +373,16 @@ namespace UniversalEditor.Plugins.Setup.UserInterface BootstrapFile file = tvFiles.SelectedRows[0].GetExtraData("item"); SettingsDialog dlg = new SettingsDialog(); + dlg.Text = "File Properties"; + dlg.EnableProfiles = false; + dlg.SettingsProviders.Clear(); dlg.SettingsProviders.Add(new CustomSettingsProvider(new SettingsGroup[] { - new SettingsGroup(String.Empty, new Setting[] + new SettingsGroup("File", new Setting[] { - new TextSetting("SourceFileName", "_Source"), - new TextSetting("DestinationFileName", "_Destination") + new FileSetting("SourceFileName", "_Source", file.SourceFileName, false), + new FileSetting("DestinationFileName", "_Destination", file.DestinationFileName, false) }) })); if (dlg.ShowDialog() == DialogResult.OK) diff --git a/Plugins/UniversalEditor.Plugins.Microsoft.Setup/Associations/ACME/BootstrapScript.uexml b/Plugins/UniversalEditor.Plugins.Microsoft.Setup/Associations/ACME/BootstrapScript.uexml index 7b1e717c..2af8ba47 100644 --- a/Plugins/UniversalEditor.Plugins.Microsoft.Setup/Associations/ACME/BootstrapScript.uexml +++ b/Plugins/UniversalEditor.Plugins.Microsoft.Setup/Associations/ACME/BootstrapScript.uexml @@ -3,7 +3,7 @@ - + *.lst diff --git a/Plugins/UniversalEditor.Plugins.Microsoft.Setup/DataFormats/Setup/Microsoft/ACME/BootstrapScript/LSTDataFormat.cs b/Plugins/UniversalEditor.Plugins.Microsoft.Setup/DataFormats/Setup/Microsoft/ACME/BootstrapScript/LSTDataFormat.cs index 56bcbf14..a7f2cc1e 100644 --- a/Plugins/UniversalEditor.Plugins.Microsoft.Setup/DataFormats/Setup/Microsoft/ACME/BootstrapScript/LSTDataFormat.cs +++ b/Plugins/UniversalEditor.Plugins.Microsoft.Setup/DataFormats/Setup/Microsoft/ACME/BootstrapScript/LSTDataFormat.cs @@ -73,6 +73,10 @@ namespace UniversalEditor.DataFormats.Setup.Microsoft.ACME.BootstrapScript if (grp.Name == "Params") { operatingSystem = BootstrapOperatingSystem.PlatformIndependent; + if (!script.OperatingSystems.Contains(operatingSystem)) + { + script.OperatingSystems.Add(operatingSystem); + } } else { @@ -101,6 +105,10 @@ namespace UniversalEditor.DataFormats.Setup.Microsoft.ACME.BootstrapScript if (grp.Name == "Files") { operatingSystem = BootstrapOperatingSystem.PlatformIndependent; + if (!script.OperatingSystems.Contains(operatingSystem)) + { + script.OperatingSystems.Add(operatingSystem); + } } else {