diff --git a/PistolWhipModSelector/PistolWhipModSelector/MainForm.Designer.cs b/PistolWhipModSelector/PistolWhipModSelector/MainForm.Designer.cs
index a3325f1..2acaed8 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/MainForm.Designer.cs
+++ b/PistolWhipModSelector/PistolWhipModSelector/MainForm.Designer.cs
@@ -42,6 +42,7 @@ private void InitializeComponent()
this.CustomSongsEditButton = new System.Windows.Forms.Button();
this.Creator = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
+ this.CopyStateLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.CustomSongsDataGridView)).BeginInit();
this.SuspendLayout();
//
@@ -100,8 +101,9 @@ private void InitializeComponent()
this.CustomSongsDataGridView.RowHeadersVisible = false;
this.CustomSongsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.CustomSongsDataGridView.ShowEditingIcon = false;
- this.CustomSongsDataGridView.Size = new System.Drawing.Size(418, 384);
+ this.CustomSongsDataGridView.Size = new System.Drawing.Size(418, 352);
this.CustomSongsDataGridView.TabIndex = 3;
+ this.CustomSongsDataGridView.SelectionChanged += new System.EventHandler(this.CustomSongsDataGridView_SelectionChanged);
this.CustomSongsDataGridView.DragDrop += new System.Windows.Forms.DragEventHandler(this.CustomSongsDataGridView_DragDrop);
this.CustomSongsDataGridView.DragEnter += new System.Windows.Forms.DragEventHandler(this.CustomSongsDataGridView_DragEnter);
//
@@ -196,11 +198,24 @@ private void InitializeComponent()
this.linkLabel1.Text = "github.com/JustPaRcS/PistolWhipModSelector";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
+ // CopyStateLabel
+ //
+ this.CopyStateLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.CopyStateLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.CopyStateLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+ this.CopyStateLabel.Location = new System.Drawing.Point(370, 399);
+ this.CopyStateLabel.Name = "CopyStateLabel";
+ this.CopyStateLabel.Size = new System.Drawing.Size(418, 29);
+ this.CopyStateLabel.TabIndex = 11;
+ this.CopyStateLabel.Text = "State";
+ this.CopyStateLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 461);
+ this.Controls.Add(this.CopyStateLabel);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.Creator);
this.Controls.Add(this.CustomSongsEditButton);
@@ -238,6 +253,7 @@ private void InitializeComponent()
private System.Windows.Forms.Button CustomSongsEditButton;
private System.Windows.Forms.Label Creator;
private System.Windows.Forms.LinkLabel linkLabel1;
+ private System.Windows.Forms.Label CopyStateLabel;
}
}
diff --git a/PistolWhipModSelector/PistolWhipModSelector/MainForm.cs b/PistolWhipModSelector/PistolWhipModSelector/MainForm.cs
index ecf30d6..c4d437b 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/MainForm.cs
+++ b/PistolWhipModSelector/PistolWhipModSelector/MainForm.cs
@@ -35,6 +35,7 @@ private void MainForm_Load(object sender, EventArgs e)
GlobalVariables.GetCustomSongFolderPath(audioLines[3].ID);
this.FillOriginalSongNamesList();
+ this.ChangeState("Ready", Color.Green);
}
private void ReloadAllButton_Click(object sender, EventArgs e)
{
@@ -123,6 +124,8 @@ private void OriginalSongNamesListBox_SelectedIndexChanged(object sender, EventA
CustomSongsReplaceButton.Enabled = true;
CustomSongsResetButton.Enabled = true;
ReloadAllButton.Enabled = true;
+
+ this.ChangeState("Ready", Color.Green);
}
private void CustomSongsDataGridView_DragDrop(object sender, DragEventArgs e)
@@ -181,10 +184,28 @@ private void CustomSongsEditButton_Click(object sender, EventArgs e)
}
}
+ private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ System.Diagnostics.Process.Start("https://github.com/JustPaRcS/PistolWhipModSelector");
+ }
+
+ private void CustomSongsDataGridView_SelectionChanged(object sender, EventArgs e)
+ {
+ this.ChangeState("Ready", Color.Green);
+ }
+
private void ReplaceSong(string destinationPath)
{
string targetPath = GlobalVariables.SongsFolderPath + "\\" + GlobalVariables.CurrentID + ".wem";
- File.Copy(destinationPath, targetPath, true);
+ try
+ {
+ File.Copy(destinationPath, targetPath, true);
+ this.ChangeState("Finished replacing", Color.Green);
+ }
+ catch (IOException e)
+ {
+ this.ChangeState("Error: " + e.Message, Color.Red);
+ }
}
private string GetDestinationPath()
@@ -201,9 +222,10 @@ private string GetDestinationPath()
return null;
}
- private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ private void ChangeState(string text, Color color)
{
- System.Diagnostics.Process.Start("https://github.com/JustPaRcS/PistolWhipModSelector");
+ CopyStateLabel.Text = text;
+ CopyStateLabel.ForeColor = color;
}
}
}
diff --git a/PistolWhipModSelector/PistolWhipModSelector/MainForm.resx b/PistolWhipModSelector/PistolWhipModSelector/MainForm.resx
index 690d71e..6539e12 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/MainForm.resx
+++ b/PistolWhipModSelector/PistolWhipModSelector/MainForm.resx
@@ -126,13 +126,4 @@
True
-
- True
-
-
- True
-
-
- True
-
\ No newline at end of file
diff --git a/PistolWhipModSelector/PistolWhipModSelector/PistolWhipModSelector.csproj b/PistolWhipModSelector/PistolWhipModSelector/PistolWhipModSelector.csproj
index 0616719..a796d58 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/PistolWhipModSelector.csproj
+++ b/PistolWhipModSelector/PistolWhipModSelector/PistolWhipModSelector.csproj
@@ -12,6 +12,7 @@
512
true
true
+ false
publish\
true
Disk
@@ -23,9 +24,9 @@
false
true
0
- 1.0.0.%2a
- false
+ 1.1.0.0
false
+ true
true
@@ -47,6 +48,18 @@
prompt
4
+
+ DDCD64778B74B9AF8DA937C0BC9034CE503115FD
+
+
+ PistolWhipModSelector_TemporaryKey.pfx
+
+
+ true
+
+
+ true
+
@@ -118,6 +131,7 @@
Resources.resx
+
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/PistolWhipModSelector/PistolWhipModSelector/Properties/AssemblyInfo.cs b/PistolWhipModSelector/PistolWhipModSelector/Properties/AssemblyInfo.cs
index 5c47337..c295ee1 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/Properties/AssemblyInfo.cs
+++ b/PistolWhipModSelector/PistolWhipModSelector/Properties/AssemblyInfo.cs
@@ -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.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.1.0.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/PistolWhipModSelector/PistolWhipModSelector/Settings/PistolWhipModSettings.cs b/PistolWhipModSelector/PistolWhipModSelector/Settings/PistolWhipModSettings.cs
index e829440..f5df885 100644
--- a/PistolWhipModSelector/PistolWhipModSelector/Settings/PistolWhipModSettings.cs
+++ b/PistolWhipModSelector/PistolWhipModSelector/Settings/PistolWhipModSettings.cs
@@ -26,6 +26,8 @@ public PistolWhipModSettings()
this.CheckMainSettingsExist();
this.LoadXmlDoc();
+
+ this.UpdateVersion();
}
private void CheckMainSettingsFolderExist()
@@ -146,5 +148,16 @@ public string GetGameFolderPath()
XmlNode node = xmlDoc.SelectSingleNode("//PistolWhipModSettings/settings/gameFolderPath");
return node.InnerText;
}
+ public void UpdateVersion()
+ {
+ XmlNode node = xmlDoc.SelectSingleNode("//PistolWhipModSettings/info/version");
+ string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+
+ if (node.InnerText != version)
+ {
+ node.InnerText = version;
+ this.SaveXmlDoc();
+ }
+ }
}
}