diff --git a/screenshot.png b/screenshot.png index 4a60795..d6e5189 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/src/MainForm.Designer.cs b/src/MainForm.Designer.cs index a2a0412..4caa0b7 100644 --- a/src/MainForm.Designer.cs +++ b/src/MainForm.Designer.cs @@ -44,7 +44,7 @@ private void InitializeComponent() this.startButton = new System.Windows.Forms.Button(); this.closeButton = new System.Windows.Forms.Button(); this.sshCheckBox = new System.Windows.Forms.CheckBox(); - this.label7 = new System.Windows.Forms.Label(); + this.versionLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // label1 @@ -199,15 +199,15 @@ private void InitializeComponent() this.sshCheckBox.Text = "Enable SSH (with default user \'pi\' and password \'raspberry\')"; this.sshCheckBox.UseVisualStyleBackColor = true; // - // label7 + // versionLabel // - this.label7.AutoSize = true; - this.label7.Enabled = false; - this.label7.Location = new System.Drawing.Point(15, 402); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(78, 13); - this.label7.TabIndex = 11; - this.label7.Text = "Version 2018.1"; + this.versionLabel.AutoSize = true; + this.versionLabel.Enabled = false; + this.versionLabel.Location = new System.Drawing.Point(15, 402); + this.versionLabel.Name = "versionLabel"; + this.versionLabel.Size = new System.Drawing.Size(78, 13); + this.versionLabel.TabIndex = 11; + this.versionLabel.Text = "Version"; // // MainForm // @@ -216,7 +216,7 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.closeButton; this.ClientSize = new System.Drawing.Size(344, 441); - this.Controls.Add(this.label7); + this.Controls.Add(this.versionLabel); this.Controls.Add(this.sshCheckBox); this.Controls.Add(this.closeButton); this.Controls.Add(this.startButton); @@ -260,7 +260,7 @@ private void InitializeComponent() private System.Windows.Forms.Button startButton; private System.Windows.Forms.Button closeButton; private System.Windows.Forms.CheckBox sshCheckBox; - private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label versionLabel; } } diff --git a/src/MainForm.cs b/src/MainForm.cs index a7b43e5..4993a44 100644 --- a/src/MainForm.cs +++ b/src/MainForm.cs @@ -9,6 +9,7 @@ using System.Windows.Forms; using System.Globalization; using System.IO; +using System.Reflection; namespace PiBootstrapper { @@ -79,10 +80,10 @@ private void ConfigureImage(string bootDrive, string networkConfig, bool enableS if (writeConfig) { var regionInfo = new RegionInfo(CultureInfo.CurrentCulture.LCID); - string country = regionInfo.TwoLetterISORegionName; + string countryCode = regionInfo.TwoLetterISORegionName; string configText = "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n" - + "update_config=1\ncountry=" + country + "\n\n" + networkConfig + "\n"; + + "update_config=1\ncountry=" + countryCode + "\n\n" + networkConfig + "\n"; File.WriteAllText(wpaSupplicantConf, configText); } @@ -172,10 +173,11 @@ private void formControl_Modified(object sender, EventArgs e) private void MainForm_Load(object sender, EventArgs e) { - UpdateDriveList(); - + string appVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + versionLabel.Text += " " + appVersion.TrimEnd('.', '0'); typeComboBox.SelectedIndex = 0; + UpdateDriveList(); UpdateGuiState(); } } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index c1c631a..8a3cf87 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PiBootstrapper")] -[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyCopyright("Copyright © 2018 Timothy Johnson")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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("2018.1.1")] +//[assembly: AssemblyFileVersion("1.0.0.0")]