Skip to content

Commit

Permalink
- Implement installers
Browse files Browse the repository at this point in the history
- Add nuget projects

#24
  • Loading branch information
Smurf-IV committed Dec 10, 2024
1 parent 74d32b1 commit 1a4da13
Show file tree
Hide file tree
Showing 65 changed files with 1,959 additions and 1,797 deletions.

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

9 changes: 6 additions & 3 deletions Applications/Source/Palette Designer/FormChromeRibbon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved.
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
*
*/
#endregion

using System.ComponentModel;

namespace PaletteDesigner
{
public partial class FormChromeRibbon : KryptonForm
Expand All @@ -22,13 +24,14 @@ public FormChromeRibbon()
#endregion

#region Public
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public KryptonCustomPaletteBase OverridePalette
{
set
{
Palette = value;
LocalCustomPalette = value;
kryptonPanel1.Palette = value;
kryptonRibbon1.Palette = value;
kryptonRibbon1.LocalCustomPalette = value;
}
}
#endregion
Expand Down
6 changes: 5 additions & 1 deletion Applications/Source/Palette Designer/FormChromeTMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved.
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
*
*/
#endregion

using System.ComponentModel;

namespace PaletteDesigner
{
public partial class FormChromeTMS : KryptonForm
Expand All @@ -23,8 +25,10 @@ public FormChromeTMS()

#region Public

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public KryptonProgressBarToolStripItem ToolStripKryptonProgressBar => kryptonProgressBarToolStripItem1;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ToolStripRenderer OverrideToolStripRenderer
{
set
Expand Down
301 changes: 156 additions & 145 deletions Applications/Source/Palette Designer/FormPaletteUpgradeTool.Designer.cs

Large diffs are not rendered by default.

30 changes: 13 additions & 17 deletions Applications/Source/Palette Designer/FormPaletteUpgradeTool.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#region BSD License
/*
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2023 - 2023. All rights reserved.
*
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2023 - 2024. All rights reserved.
*/
#endregion

Expand All @@ -20,13 +18,13 @@ public partial class FormPaletteUpgradeTool : KryptonForm

private const int MINIMUM_PALETTE_FILE_VERSION = 2;

private const int MAXIMUM_PALETTE_FILE_VERSION = 20;
private const int MAXIMUM_PALETTE_FILE_VERSION = GlobalStaticValues.CURRENT_SUPPORTED_PALETTE_VERSION;

#endregion

#region Public

public int InputVersionNumber { get; set; }
private int _inputVersionNumber;

#endregion

Expand All @@ -46,11 +44,11 @@ public FormPaletteUpgradeTool()
#region Setters and Getters
/// <summary>Sets the InputVersionNumber to the value of value.</summary>
/// <param name="value">The desired value of InputVersionNumber.</param>
private void SetInputVersionNumber(int value) => InputVersionNumber = value;
private void SetInputVersionNumber(int value) => _inputVersionNumber = value;

/// <summary>Returns the value of the InputVersionNumber.</summary>
/// <returns>The value of the InputVersionNumber.</returns>
private int GetInputVersionNumber() => InputVersionNumber;
private int GetInputVersionNumber() => _inputVersionNumber;

#endregion

Expand Down Expand Up @@ -122,17 +120,15 @@ private void UpdateState()
bool length = krtbInput.Text.Length > 0;
bool flag0 = ValidOutputDirectory(krtbOutput.Text);
bool flag1 = ValidOutputFilename(krtbOutput.Text);
bool flag2 = (GetInputVersionNumber() >= MINIMUM_PALETTE_FILE_VERSION && GetInputVersionNumber() <= MAXIMUM_PALETTE_FILE_VERSION);
bool flag2 = (GetInputVersionNumber() >= MINIMUM_PALETTE_FILE_VERSION && GetInputVersionNumber() < MAXIMUM_PALETTE_FILE_VERSION);

kbtnUpgrade.Enabled = (length && flag0 && flag1 && flag2);

if (kbtnUpgrade.Enabled)
{
klblStatus.ForeColor = Color.Green;

int num = MAXIMUM_PALETTE_FILE_VERSION + 1;

klblStatus.Text = $"Convert to output version ' {num}'.";
klblStatus.Text = $"Convert to output version ' {MAXIMUM_PALETTE_FILE_VERSION}'.";

return;
}
Expand Down Expand Up @@ -213,7 +209,7 @@ private void kbtnUpgrade_Click(object sender, EventArgs e)
{
try
{
StreamReader reader = new StreamReader(krtbInput.Text);
var reader = new StreamReader(krtbInput.Text);

string end = reader.ReadToEnd();

Expand All @@ -226,9 +222,9 @@ private void kbtnUpgrade_Click(object sender, EventArgs e)
xslCompiledTransform.Load(new XmlTextReader(new StringReader(Resources.v2to6)));
end = TransformXml(xslCompiledTransform, end);
}
else if (GetInputVersionNumber() <= MAXIMUM_PALETTE_FILE_VERSION)
else if (GetInputVersionNumber() < MAXIMUM_PALETTE_FILE_VERSION)
{
var streamReader = new StringReader(Resources.v6to19);
var streamReader = new StringReader(Resources.v6to20);
var xmlTextReader = XmlReader.Create(streamReader);
var xslCompiledTransform1 = new XslCompiledTransform();
xslCompiledTransform1.Load(xmlTextReader);
Expand All @@ -245,7 +241,7 @@ private void kbtnUpgrade_Click(object sender, EventArgs e)

writer.Close();

object[] text = ["Input file: ", krtbInput.Text, "\nOutput file: ", krtbOutput.Text, "\n\nUpgrade from version '", InputVersionNumber, "' to version '", 19.ToString(), "' has succeeded."
object[] text = ["Input file: ", krtbInput.Text, "\nOutput file: ", krtbOutput.Text, "\n\nUpgrade from version '", _inputVersionNumber, "' to version '", MAXIMUM_PALETTE_FILE_VERSION.ToString(), "' has succeeded."
];

KryptonMessageBox.Show(this, string.Concat(text), "Upgrade Success", KryptonMessageBoxButtons.OK, KryptonMessageBoxIcon.Information);
Expand Down Expand Up @@ -291,7 +287,7 @@ private void kcmdBrowseForOriginalFile_Execute(object sender, EventArgs e)
KryptonMessageBoxIcon.Warning);
break;
}
case <= MAXIMUM_PALETTE_FILE_VERSION:
case < MAXIMUM_PALETTE_FILE_VERSION:
{
krtbInput.Text = openFileDialog.FileName;

Expand Down Expand Up @@ -358,7 +354,7 @@ private void kcmdBrowseForUpgradedFile_Execute(object sender, EventArgs e)

if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
StreamWriter writer = new StreamWriter(Path.GetFullPath(saveFileDialog.FileName));
var writer = new StreamWriter(Path.GetFullPath(saveFileDialog.FileName));

writer.Write(krtbOutput.Text);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="kcmdBrowseForUpgradedFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>217, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down Expand Up @@ -165,7 +168,7 @@
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEgAACxIB0t1+/AAABx9JREFUeF7tm+lWE0kU
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEQAACxEBf2RfkQAABx9JREFUeF7tm+lWE0kU
x30AH8U3mPngS8w58wQz58ycMzpfFBfcFcWVTUAWFZWwDIvI4g4CKiqC4AoKWcgCSQhLAiGAc6f+BR27
qysb0H0GCOf8ThL63uquf1dX1b1VvQN/RLSLsXs7MU7enbzyEYrsGl78utQZ6qbtQxcVD5ZYuABj5Nrd
EmyjxkATtQbaqMHXsGWpZ9T4a8nir6bDdzPbNQLUTzbS/pF9W54DIxmUN1CgF8Diq+IG72ae0NfQCxqY
Expand Down Expand Up @@ -202,9 +205,6 @@
<metadata name="kcmdBrowseForOriginalFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="kcmdBrowseForUpgradedFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>217, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAUAMDAAAAEAIACoJQAAVgAAACAgAAABACAAqBAAAP4lAAAgIAAAAQAIAKgIAACmNgAAEBAAAAEA
Expand Down
Loading

0 comments on commit 1a4da13

Please sign in to comment.