Skip to content

Commit f444dde

Browse files
committed
Fix wrong version on splash screen. Add messageBox title.
1 parent 016706b commit f444dde

5 files changed

Lines changed: 17 additions & 14 deletions

File tree

src/QSP/UI/Forms/Splash.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Diagnostics;
32
using System.Reflection;
43

54
namespace QSP.UI.Forms
@@ -18,10 +17,8 @@ private void Splash_Load(object sender, EventArgs e)
1817

1918
public static string AppProductVersion()
2019
{
21-
var assembly = Assembly.GetExecutingAssembly();
22-
var version = FileVersionInfo.GetVersionInfo(assembly.Location);
23-
return $"{version.ProductMajorPart}.{version.ProductMinorPart}" +
24-
$".{version.ProductBuildPart}";
20+
var ver = Assembly.GetEntryAssembly().GetName().Version;
21+
return $"{ver.Major}.{ver.Minor}.{ver.Build}";
2522
}
2623
}
2724
}

src/QSP/UI/ToLdgModule/AboutPage/AboutPageControl.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public void Init(string appName)
2222
panel1.BackColor = Color.FromArgb(160, Color.White);
2323

2424
var ver = Assembly.GetEntryAssembly().GetName().Version;
25-
versionLbl.Text =
26-
$"v{ver.Major}.{ver.Minor}.{ver.Build}";
25+
versionLbl.Text = $"v{ver.Major}.{ver.Minor}.{ver.Build}";
2726
}
2827

2928
private void TryOpenFile(string fileName)

src/QSP/UI/UserControls/FuelPlanningControl.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,15 @@ private void Calculate(object sender, EventArgs e)
459459

460460
if (fuelReport.TotalFuelKG > data.MaxFuelKg)
461461
{
462-
ShowInfo(InsufficientFuelMsg(
463-
fuelReport.TotalFuelKG, data.MaxFuelKg, WeightUnit));
462+
var msg = InsufficientFuelMsg(
463+
fuelReport.TotalFuelKG, data.MaxFuelKg, WeightUnit);
464+
465+
MessageBox.Show(
466+
msg,
467+
"Insufficient fuel",
468+
MessageBoxButtons.OK,
469+
MessageBoxIcon.Information);
470+
464471
return;
465472
}
466473

@@ -505,7 +512,7 @@ private static string InsufficientFuelMsg(
505512
fuelCapacityInt = RoundToInt(fuelCapacityKG * KgLbRatio);
506513
}
507514

508-
return "Insufficient fuel\n" +
515+
return
509516
$"Fuel required for this flight is {fuelReqInt} {wtUnit}. " +
510517
$"Maximum fuel tank capacity is {fuelCapacityInt} {wtUnit}.";
511518
}

src/QSimPlanner/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[assembly: AssemblyTitle("QSimPlanner")]
88
[assembly: AssemblyDescription("")]
99
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("Microsoft")]
10+
[assembly: AssemblyCompany("")]
1111
[assembly: AssemblyProduct("QSimPlanner")]
1212
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
1313
[assembly: AssemblyTrademark("")]
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]
34+
[assembly: AssemblyVersion("0.2.0.0")]
35+
[assembly: AssemblyFileVersion("0.2.0.0")]

src/QSimPlanner/QSimPlanner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<UpdateRequired>false</UpdateRequired>
2626
<MapFileExtensions>true</MapFileExtensions>
2727
<ApplicationRevision>0</ApplicationRevision>
28-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
28+
<ApplicationVersion>0.2.0.%2a</ApplicationVersion>
2929
<UseApplicationTrust>false</UseApplicationTrust>
3030
<BootstrapperEnabled>true</BootstrapperEnabled>
3131
</PropertyGroup>

0 commit comments

Comments
 (0)