Skip to content

Commit

Permalink
Grmbl.... Fix bugs on validation of Latest Firmware (not mandatory) a…
Browse files Browse the repository at this point in the history
…nd on DSM Name
  • Loading branch information
vletroye committed Dec 13, 2017
1 parent 0f26fab commit 9be493a
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 18 deletions.
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/.vs/Mods/v14/.suo
Binary file not shown.
39 changes: 21 additions & 18 deletions MyOwnDSMShortcuts/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,18 +650,21 @@ private void buttonReset_Click(object sender, EventArgs e)
// Click on Button Create Package
private void buttonPublish_Click(object sender, EventArgs e)
{
GeneratePackage(PackageRootPath);
if (ValidateChildren())
{
GeneratePackage(PackageRootPath);

SpkRepoBrowserDialog4Mods.Title = "Pick a folder to publish the Package.";
if (!string.IsNullOrEmpty(PackageRepoPath))
SpkRepoBrowserDialog4Mods.InitialDirectory = PackageRepoPath;
else
SpkRepoBrowserDialog4Mods.InitialDirectory = Properties.Settings.Default.PackageRepo;
SpkRepoBrowserDialog4Mods.Title = "Pick a folder to publish the Package.";
if (!string.IsNullOrEmpty(PackageRepoPath))
SpkRepoBrowserDialog4Mods.InitialDirectory = PackageRepoPath;
else
SpkRepoBrowserDialog4Mods.InitialDirectory = Properties.Settings.Default.PackageRepo;

if (SpkRepoBrowserDialog4Mods.ShowDialog())
{
PackageRepoPath = SpkRepoBrowserDialog4Mods.FileName;
PublishPackage(PackageRootPath, PackageRepoPath);
if (SpkRepoBrowserDialog4Mods.ShowDialog())
{
PackageRepoPath = SpkRepoBrowserDialog4Mods.FileName;
PublishPackage(PackageRootPath, PackageRepoPath);
}
}
}

Expand Down Expand Up @@ -2337,7 +2340,7 @@ private void textBoxDsmAppName_Validating(object sender, CancelEventArgs e)
{
if (!CheckEmpty(textBoxDsmAppName, ref e))
{
var name = textBoxDsmAppName.Text.Replace(".", "_");
var name = textBoxDsmAppName.Text.Replace(".", "_").Replace("__","_");
var cleaned = Helper.CleanUpText(textBoxDsmAppName.Text);
if (name != cleaned)
{
Expand Down Expand Up @@ -2756,14 +2759,14 @@ private void PublishPackage(string PackagePath, string PackageRepo)
try
{
publishFile(Path.Combine(PackagePath, packName + ".spk"), Path.Combine(PackageRepo, packName + ".spk"));
publishFile(Path.Combine(PackagePath, "INFO"), Path.Combine(PackageRepo, packName + ".nfo"));
publishFile(Path.Combine(PackagePath, "PACKAGE_ICON.PNG"), Path.Combine(PackageRepo, packName + "_thumb_72.png"));
//publishFile(Path.Combine(PackagePath, "INFO"), Path.Combine(PackageRepo, packName + ".nfo"));
//publishFile(Path.Combine(PackagePath, "PACKAGE_ICON.PNG"), Path.Combine(PackageRepo, packName + "_thumb_72.png"));

var pathImage = Path.Combine(PackageRepo, packName + "_thumb_120.png");
publishFile(Path.Combine(PackagePath, "PACKAGE_ICON_256.PNG"), pathImage);
//var pathImage = Path.Combine(PackageRepo, packName + "_thumb_120.png");
//publishFile(Path.Combine(PackagePath, "PACKAGE_ICON_256.PNG"), pathImage);

var image = LoadImage(pathImage, 0, 120);
image.Save(pathImage, ImageFormat.Png);
//var image = LoadImage(pathImage, 0, 120);
//image.Save(pathImage, ImageFormat.Png);

MessageBox.Show(this, "The package has been successfuly published", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
Expand Down Expand Up @@ -3887,7 +3890,7 @@ private void textBoxLatestFirmware_Validated(object sender, EventArgs e)

private void textBoxLatestFirmware_Validating(object sender, CancelEventArgs e)
{
if (!CheckEmpty(textBoxLatestFirmware, ref e))
if (textBoxLatestFirmware.Text != "")
{
if (getOldVersion.IsMatch(textBoxLatestFirmware.Text))
{
Expand Down
Binary file added MyOwnDSMShortcuts/bin/Debug/MODS_SSPKS.spk
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/bin/Debug/Mods.exe
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/bin/Debug/Mods.pdb
Binary file not shown.
11 changes: 11 additions & 0 deletions MyOwnDSMShortcuts/bin/Debug/Mods.vshost.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Binary file added MyOwnDSMShortcuts/bin/Release.zip
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/bin/Release/Mods.exe
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/bin/Release/Mods.pdb
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/obj/Debug/Mods.csproj.GenerateResource.Cache
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/obj/Debug/Mods.exe
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/obj/Debug/Mods.pdb
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/obj/Release/Mods.exe
Binary file not shown.
Binary file modified MyOwnDSMShortcuts/obj/Release/Mods.pdb
Binary file not shown.

0 comments on commit 9be493a

Please sign in to comment.