Skip to content

Commit

Permalink
- Fix a bug preventing to Add items without saving first changes done…
Browse files Browse the repository at this point in the history
… in the INFO part.

- Make the features "beta" and "embedded" part of the basic version (used to be accessible only in advance mode)
- Checking now the option to 'use a default Root folder for the Packages' will open automatically the Explorer to pick a folder.
  • Loading branch information
vletroye committed Jan 6, 2018
1 parent 13828f7 commit 3130ac2
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 33 deletions.
28 changes: 14 additions & 14 deletions Mods/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions Mods/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -970,11 +970,15 @@ private void listViewItems_SelectedIndexChanged(object sender, EventArgs e)
// Add an new item
private void buttonAddItem_Click(object sender, EventArgs e)
{
if (ValidateChildren() && SavePackage(CurrentPackageFolder, true) == DialogResult.Yes) // Need to save to get the latest value in info["package"]
if (ValidateChildren())
{
state = State.Add;
DisplayDetails(new KeyValuePair<string, AppsData>(Guid.NewGuid().ToString(), new AppsData()));
textBoxTitle.Focus();
var saved = SavePackage(CurrentPackageFolder, true); // Need to save to get the latest value in info["package"]
if (saved == DialogResult.Yes || saved == DialogResult.No)
{
state = State.Add;
DisplayDetails(new KeyValuePair<string, AppsData>(Guid.NewGuid().ToString(), new AppsData()));
textBoxTitle.Focus();
}
}
}

Expand Down Expand Up @@ -4395,8 +4399,9 @@ private void ShowAdvancedEditor(bool advanced)
labelFirmware.Visible = advanced;
textBoxFirmware.Visible = advanced;
checkBoxSingleApp.Visible = advanced;
checkBoxBeta.Visible = advanced;
TextBoxReportUrl.Visible = advanced && checkBoxBeta.Checked;
//checkBoxBeta.Visible = advanced;
//TextBoxReportUrl.Visible = advanced && checkBoxBeta.Checked;
//labelReportUrl.Visible = TextBoxReportUrl.Visible;

checkBoxOfflineInstall.Visible = advanced;
checkBoxSilentInstalll.Visible = advanced;
Expand All @@ -4408,7 +4413,7 @@ private void ShowAdvancedEditor(bool advanced)
checkBoxSilentReboot.Visible = advanced;

checkBoxSupportCenter.Visible = advanced;
checkBoxLegacy.Visible = advanced;
//checkBoxLegacy.Visible = advanced;
labelGrantPrivilege.Visible = advanced;
ComboBoxGrantPrivilege.Visible = advanced;
checkBoxAdvanceGrantPrivilege.Visible = advanced;
Expand Down Expand Up @@ -4575,7 +4580,7 @@ private void menuParameters_Click(object sender, EventArgs e)
{
var param = new Parameters();
param.ShowDialog();
if (Properties.Settings.Default.Recents.Count == 0)
if (Properties.Settings.Default.Recents != null && Properties.Settings.Default.Recents.Count == 0)
CreateRecentsMenu();
}

Expand Down
31 changes: 22 additions & 9 deletions Mods/Forms/Parameters.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Mods/Forms/Parameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ private void buttonDefaultPackageRoot_Click(object sender, EventArgs e)
private void checkBoxDefaultPackageRoot_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.DefaultPackageRoot = checkBoxDefaultPackageRoot.Checked;

if (checkBoxDefaultPackageRoot.Checked)
{
if (string.IsNullOrEmpty(Properties.Settings.Default.PackageRoot))
PickPackageRoot();
}
ShowParameters();
}

Expand Down
2 changes: 1 addition & 1 deletion Mods/Forms/Parameters.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<metadata name="toolTipProperties.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="checkBoxPublishFolder.ToolTip" xml:space="preserve">
<data name="checkBoxDefaultPackageRepo.ToolTip" xml:space="preserve">
<value>If you select this option, you will have to provide the path of a folder where all your packages can be published. This could be the folder used by your SSPKS (Google on 'Simple SPK Server' of Julien Del-Piccolo).
If you don't select this option, you will be prompted for a path each time you publish a package.</value>
</data>
Expand Down

0 comments on commit 3130ac2

Please sign in to comment.