Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
- Minor UI improvements.
- Changed File IO to use the OS's path separator instead of hardcoded backslashes.
  • Loading branch information
Nifty255 committed Apr 2, 2016
1 parent 12a4125 commit 88652e2
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 81 deletions.
6 changes: 5 additions & 1 deletion Kerbal Config Editor/KCE README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Kerbal Config Editor
v1.0.3 Release
v1.0.4 Release

Kerbal Config Editor (KCE) is an easy to use tool designed to allow modders of Kerbal Space Program to easily and quickly alter or even create KSP Config Files.

Expand Down Expand Up @@ -35,6 +35,10 @@ Kerbal Config Editor allows users and modders to easily read, edit, and even cre

CHANGELOG:

v1.0.4:
- Minor UI improvements.
- Changed File IO to use the OS's path separator instead of hardcoded backslashes.

v1.0.3:
- The Open and Save file dialogs now begin at the install path of the program.

Expand Down
Binary file modified Kerbal Config Editor/Kerbal Config Editor.exe
Binary file not shown.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Kerbal Config Editor
v1.0.3 Release
v1.0.4 Release

Kerbal Config Editor (KCE) is an easy to use tool designed to allow modders of Kerbal Space Program to easily and quickly alter or even create KSP Config Files.

Expand Down Expand Up @@ -35,6 +35,10 @@ Kerbal Config Editor allows users and modders to easily read, edit, and even cre

CHANGELOG:

v1.0.4:
- Minor UI improvements.
- Changed File IO to use the OS's path separator instead of hardcoded backslashes.

v1.0.3:
- The Open and Save file dialogs now begin at the install path of the program.

Expand Down
7 changes: 4 additions & 3 deletions Source/Kerbal Config Editor/Kerbal Config Editor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\KSP Test Folder\0.90\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\KSP Test Folder\1.0\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -53,7 +54,7 @@
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\KSP Test Folder\0.90\KSP_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\..\..\..\KSP Test Folder\1.0\KSP_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Source/Kerbal Config Editor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ static void Main()
{
// Validate correct install.
#if (!DEBUG)
if (!File.Exists(Directory.GetCurrentDirectory() + "\\KSP.exe"))
if (!File.Exists(Directory.GetCurrentDirectory() + "\\KSP.exe".Replace('\\', Path.DirectorySeparatorChar)))
{
System.Windows.Forms.MessageBox.Show("Error: This program must be installed in your KSP install directory.", "Error 404: KSP Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
#endif

// Create Autosave folder if it doesn't exist.
if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave"))
if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave".Replace('\\', Path.DirectorySeparatorChar)))
{
Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave");
Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave".Replace('\\', Path.DirectorySeparatorChar));
}

// Set the Assembly Handler.
Expand Down Expand Up @@ -59,7 +59,7 @@ private static Assembly ResolveAssembly(object sender, ResolveEventArgs args)
if (strAssmbName.FullName.Substring(0, strAssmbName.FullName.IndexOf(",")) == args.Name.Substring(0, args.Name.IndexOf(",")))
{
// Build the path of the assembly from where it has to be loaded.
strTempAssmbPath = Directory.GetCurrentDirectory() + "\\KSP_Data\\Managed\\" + args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll";
strTempAssmbPath = Directory.GetCurrentDirectory() + "\\KSP_Data\\Managed\\".Replace('\\', Path.DirectorySeparatorChar) + args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll";
break;
}

Expand Down
49 changes: 19 additions & 30 deletions Source/Kerbal Config Editor/ProgramForm.Designer.cs

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

34 changes: 29 additions & 5 deletions Source/Kerbal Config Editor/ProgramForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial class ProgramForm : Form
private static int cfgIncrement = 0;

// The path used to check for and save autosaved files.
private string autosavePath = Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave\\autosave.cfg";
private string autosavePath = Directory.GetCurrentDirectory() + "\\KCE_Data\\Autosave\\autosave.cfg".Replace('\\', Path.DirectorySeparatorChar);
#endregion

#region Form
Expand All @@ -54,6 +54,8 @@ public ProgramForm()
{
// Initialize the form.
InitializeComponent();
openConfigDialog.InitialDirectory = Directory.GetCurrentDirectory();
saveConfigDialog.InitialDirectory = Directory.GetCurrentDirectory();
}

/// <summary>
Expand Down Expand Up @@ -261,6 +263,9 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e)
// If the code reaches this point without success, then the user
// canceled and there are still unsaved changes.
changesUnsaved = !success;

// Show the File Saved status label for 3 seconds.
FileSaved();
}
}

Expand Down Expand Up @@ -303,6 +308,9 @@ private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
// there are still unsaved changes.
changesUnsaved = !success;
currentIsNew = changesUnsaved;

// Show the File Saved status label for 3 seconds.
FileSaved();
}
}
else
Expand Down Expand Up @@ -571,7 +579,7 @@ private void saveValuesButton_Click(object sender, EventArgs e)
foreach(Component c in valuesTable.Controls)
{
// If c's type is of TextBox,
if (c.GetType() == typeof(TextBox))
if (c.GetType().ToString() == typeof(TextBox).ToString())
{
// Cast it into a text box.
TextBox field = (TextBox)c;
Expand Down Expand Up @@ -612,6 +620,9 @@ private void saveValuesButton_Click(object sender, EventArgs e)
}
}

// Sets valuesUnsaved to false, since the user just saved them.
valuesUnsaved = false;

// Call ValuesSaved, which shows the status bar indicator for a short time.
ValuesSaved();
}
Expand All @@ -622,11 +633,24 @@ private void saveValuesButton_Click(object sender, EventArgs e)
private async void ValuesSaved()
{
// Set Visible to true.
toolStripSavedLabel.Visible = true;
toolStripValsSavedLabel.Visible = true;
// Wait 3 seconds.
await Task.Delay(3000);
// Set Visible to false.
toolStripValsSavedLabel.Visible = false;
}

/// <summary>
/// Shows the "File Saved" status bar indicator for 3 seconds (3000 milliseconds), and then hide it.
/// </summary>
private async void FileSaved()
{
// Set Visible to true.
toolStripFileSavedLabel.Visible = true;
// Wait 3 seconds.
await Task.Delay(3000);
// Set Visible to false.
toolStripSavedLabel.Visible = false;
toolStripFileSavedLabel.Visible = false;
}

/// <summary>
Expand Down Expand Up @@ -855,7 +879,7 @@ private void FinishOpeningFile()
saveAsToolStripMenuItem.Enabled = true;

// Change the form's title to reflect the file's name and location.
this.Text = "Kerbal Config Editor - " + openConfigDialog.FileName.Substring(0, 10) + "..." + openConfigDialog.FileName.Substring(openConfigDialog.FileName.LastIndexOf('\\') + 1);
this.Text = "Kerbal Config Editor - " + openConfigDialog.FileName.Substring(0, 10) + "..." + openConfigDialog.FileName.Substring(openConfigDialog.FileName.LastIndexOf(Path.DirectorySeparatorChar) + 1);

// Start opening the UI up for interaction again.
toolStripProgressBar.Value = 100;
Expand Down
34 changes: 0 additions & 34 deletions Source/Kerbal Config Editor/ProgramForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="mainMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="mainMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="newToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down Expand Up @@ -176,37 +173,6 @@
<metadata name="mainStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>155, 18</value>
</metadata>
<metadata name="mainStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>155, 18</value>
</metadata>
<data name="printToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIpSURBVDhPtZL/T1JRGMb5p1itrVZbbRpqZbawnBENV1I0
jGlByTSyJTXJwq2oKZQb1KAv6JCYWSxvBrkkZUq4CeQEiRABFeLL072Xa0zRra31bO8v57zP5znnPYf1
X+TxhWF6O7VtGYcnwbSWijKPOLzYrPSvLPwLS3huGUMlT7o9wGD9grVUBj+icdid03S9tDmgNxNwTgVQ
J+rA8XNtWwM+uuZATMwxmQVRycuJFNyzIRitDlScugKzjSgFRGJJaIwEsrk8AsHIhnSL/Ssck37UNipQ
I5DjtuYV7uksRYhr2kebhx2eP6nrycFIEh5fBA/1Nvru8q5+PDaOovK0rABwfwugWzcErfkzHhjsePL6
E7q1VrTdNUDcrgGvSYlDZHN5XTNOnL8BVe8AJAoNDtZfLgDu9L1BPJmikzcrk81hlRwodZJwdBXziwnI
OrVoaOkiT8C8hKLHBPO7CbywOaE1jeC+bhAd6meQdvZC1KoG/5IS3MZ2HObLUHZSggvkWq3wOvbWiAqA
VpWeyStVfCUNf3AZ4zNhfHCFMEDMgye+hYr6FrDLzxQAUuVTpr0ocn74mchg5vsKRt1RcHp2Qv9+kZ78
UcE17KkWFgHNN/uQzgBkGKLJPBZiecyGchjzrmFwPIF++xJUbDbUQzEacIArLpopSRSP4CUN1Obf1Abz
uqob5KjiXwWH/GVl5HPt5zZh37GL2H1EiF1VZ7GDI6CNW5r/TSzWbwHYL0mKJ5czAAAAAElFTkSuQmCC
</value>
</data>
<data name="printPreviewToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGCSURBVDhPnZK9S0JRGMb9F1xb2gqaq6mhwCGDtvYIIyLI
cJOE1paoIYpMKUjFRDH87lpoakGlIZF9DA2hZJEQhJXl1xPn3HPV29WQfvBwOfA+P95zuDJ39A6/4wyl
YOOSMHvOcHGThuwvSKEVRvsR+pQqWD3R1pK98DUbl7Jm5hA8SfESd6S5xH5wycalrO4E0D8yWQuriLH6
E2xcSqlcoRJBxCpiTO5TNi4m/ZgDF4nDsOulsfujyGRzUsmWM8YqdcggKbveS3A88bEkslRye58RSzZt
IVarY/FFaPmlwp+fUaESYRNW5Vm3BPmpBpZNvppACDmTLbS6FbGAPFAj5OGI4PALOK/yZfIlAlk4j7n5
xdaCarWKj0KRXmE2+UklJEJZZ/RCPTPdWvBdLOP1rYD41QNcgRiVkKJQ1mjGsa2VNxeQb2OWDC7sh47p
ddQLeoyOTSFiVAAFvVhChsmv2k6Uvd3Icx1UolMNiDdpl4nhLiohW/xb0tMph2JwCJxjAz9A30JI8zYA
tAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>58</value>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Source/Kerbal Config Editor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyFileVersion("1.0.4.0")]
6 changes: 5 additions & 1 deletion Source/Kerbal Config Editor/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Kerbal Config Editor
v1.0.3 Release
v1.0.4 Release

Kerbal Config Editor (KCE) is an easy to use tool designed to allow modders of Kerbal Space Program to easily and quickly alter or even create KSP Config Files.

Expand Down Expand Up @@ -35,6 +35,10 @@ Kerbal Config Editor allows users and modders to easily read, edit, and even cre

CHANGELOG:

v1.0.4:
- Minor UI improvements.
- Changed File IO to use the OS's path separator instead of hardcoded backslashes.

v1.0.3:
- The Open and Save file dialogs now begin at the install path of the program.

Expand Down

0 comments on commit 88652e2

Please sign in to comment.