mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-22 22:25:37 +01:00
Tag debug/beta builds in window title.
This commit is contained in:
parent
1377f51276
commit
18fe4087ad
@ -16,7 +16,6 @@ namespace Giants.Launcher
|
|||||||
public partial class LauncherForm : Form
|
public partial class LauncherForm : Form
|
||||||
{
|
{
|
||||||
// Constant settings
|
// Constant settings
|
||||||
private const string GameName = "Giants: Citizen Kabuto";
|
|
||||||
private const string GamePath = "GiantsMain.exe";
|
private const string GamePath = "GiantsMain.exe";
|
||||||
private const string RegistryKey = @"HKEY_CURRENT_USER\Software\PlanetMoon\Giants";
|
private const string RegistryKey = @"HKEY_CURRENT_USER\Software\PlanetMoon\Giants";
|
||||||
private const string RegistryValue = "DestDir";
|
private const string RegistryValue = "DestDir";
|
||||||
@ -38,7 +37,7 @@ namespace Giants.Launcher
|
|||||||
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
|
||||||
// Set window title
|
// Set window title
|
||||||
this.Text = GameName;
|
this.SetTitle();
|
||||||
|
|
||||||
// Read newer file-based game settings
|
// Read newer file-based game settings
|
||||||
this.config = new Config();
|
this.config = new Config();
|
||||||
@ -97,7 +96,7 @@ namespace Giants.Launcher
|
|||||||
|
|
||||||
private void btnOptions_Click(object sender, EventArgs e)
|
private void btnOptions_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
OptionsForm form = new OptionsForm(GameName + " Options", this.gamePath);
|
OptionsForm form = new OptionsForm(Resources.AppName + " Options", this.gamePath);
|
||||||
|
|
||||||
form.StartPosition = FormStartPosition.CenterParent;
|
form.StartPosition = FormStartPosition.CenterParent;
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
@ -116,7 +115,7 @@ namespace Giants.Launcher
|
|||||||
|
|
||||||
if (this.gamePath == null || !File.Exists(this.gamePath))
|
if (this.gamePath == null || !File.Exists(this.gamePath))
|
||||||
{
|
{
|
||||||
string message = string.Format(Resources.AppNotFound, GameName);
|
string message = string.Format(Resources.AppNotFound, Resources.AppName);
|
||||||
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
return;
|
return;
|
||||||
@ -131,7 +130,7 @@ namespace Giants.Launcher
|
|||||||
Version gameVersion = VersionHelper.GetGameVersion(this.gamePath);
|
Version gameVersion = VersionHelper.GetGameVersion(this.gamePath);
|
||||||
if (gameVersion == null)
|
if (gameVersion == null)
|
||||||
{
|
{
|
||||||
string message = string.Format(Resources.AppNotFound, GameName);
|
string message = string.Format(Resources.AppNotFound, Resources.AppName);
|
||||||
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
@ -334,6 +333,21 @@ namespace Giants.Launcher
|
|||||||
}
|
}
|
||||||
|
|
||||||
Process.Start(this.communityAppUri);
|
Process.Start(this.communityAppUri);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetTitle()
|
||||||
|
{
|
||||||
|
string title = Resources.AppName;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
title += " DEBUG";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BETA
|
||||||
|
title += " BETA";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
this.Text = title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
9
Giants.Launcher/Properties/Resources.Designer.cs
generated
9
Giants.Launcher/Properties/Resources.Designer.cs
generated
@ -60,6 +60,15 @@ namespace Giants.Launcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Giants: Citizen Kabuto.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AppName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AppName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Could not locate an installation of {0}. The launcher will now exit..
|
/// Looks up a localized string similar to Could not locate an installation of {0}. The launcher will now exit..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -205,4 +205,7 @@
|
|||||||
<data name="ErrorNoConfigFile" xml:space="preserve">
|
<data name="ErrorNoConfigFile" xml:space="preserve">
|
||||||
<value>Settings file {0} was not found.</value>
|
<value>Settings file {0} was not found.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AppName" xml:space="preserve">
|
||||||
|
<value>Giants: Citizen Kabuto</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user