mirror of
https://github.com/psforever/GameLauncher.git
synced 2026-01-19 18:24:45 +00:00
Add icons and improve version display
This commit is contained in:
parent
fce71df0f3
commit
9f280093c2
32
PSLauncher/AboutBox1.Designer.cs
generated
32
PSLauncher/AboutBox1.Designer.cs
generated
|
|
@ -32,13 +32,15 @@
|
|||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.versionInfo = new System.Windows.Forms.TextBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.okButton.Location = new System.Drawing.Point(135, 107);
|
||||
this.okButton.Location = new System.Drawing.Point(135, 200);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.okButton.TabIndex = 25;
|
||||
|
|
@ -49,17 +51,17 @@
|
|||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||
this.label1.Location = new System.Drawing.Point(9, 97);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(328, 23);
|
||||
this.label1.TabIndex = 26;
|
||||
this.label1.Text = "PS1 GameLauncher";
|
||||
this.label1.Text = "PSForever Launcher";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label2.Location = new System.Drawing.Point(9, 32);
|
||||
this.label2.Location = new System.Drawing.Point(9, 120);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(328, 23);
|
||||
this.label2.TabIndex = 27;
|
||||
|
|
@ -70,7 +72,7 @@
|
|||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(9, 55);
|
||||
this.linkLabel1.Location = new System.Drawing.Point(9, 143);
|
||||
this.linkLabel1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 5);
|
||||
|
|
@ -85,7 +87,7 @@
|
|||
//
|
||||
this.versionInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.versionInfo.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.versionInfo.Location = new System.Drawing.Point(9, 77);
|
||||
this.versionInfo.Location = new System.Drawing.Point(9, 165);
|
||||
this.versionInfo.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
|
||||
this.versionInfo.Name = "versionInfo";
|
||||
this.versionInfo.ReadOnly = true;
|
||||
|
|
@ -95,16 +97,28 @@
|
|||
this.versionInfo.Text = "Version 1.x.x.x";
|
||||
this.versionInfo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pictureBox1.Image = global::PSLauncher.Properties.Resources.vector_logo_psforever;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(9, 9);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(328, 88);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 30;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// About
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(346, 142);
|
||||
this.ClientSize = new System.Drawing.Size(346, 235);
|
||||
this.Controls.Add(this.versionInfo);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
|
|
@ -113,7 +127,8 @@
|
|||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "About PS1 GameLauncher";
|
||||
this.Text = "About PSForever Launcher";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
@ -126,5 +141,6 @@
|
|||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.TextBox versionInfo;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ namespace PSLauncher
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
||||
|
||||
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
string version = fvi.FileVersion;
|
||||
|
|
|
|||
2
PSLauncher/LauncherForm.Designer.cs
generated
2
PSLauncher/LauncherForm.Designer.cs
generated
|
|
@ -304,7 +304,7 @@
|
|||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MinimumSize = new System.Drawing.Size(420, 350);
|
||||
this.Name = "LauncherForm";
|
||||
this.Text = "PS1 GameLauncher";
|
||||
this.Text = "PSForever Launcher";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LauncherForm_FormClosing);
|
||||
this.ResizeBegin += new System.EventHandler(this.LauncherForm_ResizeBegin);
|
||||
this.ResizeEnd += new System.EventHandler(this.LauncherForm_ResizeEnd);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ namespace PSLauncher
|
|||
public LauncherForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
||||
|
||||
#if DEBUG
|
||||
Settings.Default.Reset();
|
||||
Console.SetOut(new Util.ControlWriter(this.ps_consoleOutput));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PSLauncher</RootNamespace>
|
||||
<AssemblyName>PS1_GameLauncher</AssemblyName>
|
||||
<AssemblyName>PSForever_Launcher</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
|
@ -131,15 +131,19 @@
|
|||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
|
|
@ -227,6 +231,12 @@
|
|||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\vector-logo-psforever.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PS1 GameLauncher")]
|
||||
[assembly: AssemblyTitle("PSForever Launcher")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("PSForever")]
|
||||
[assembly: AssemblyProduct("PS1 GameLauncher")]
|
||||
[assembly: AssemblyCompany("PSForever.net")]
|
||||
[assembly: AssemblyProduct("PSForever Launcher")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
|||
10
PSLauncher/Properties/Resources.Designer.cs
generated
10
PSLauncher/Properties/Resources.Designer.cs
generated
|
|
@ -59,5 +59,15 @@ namespace PSLauncher.Properties {
|
|||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap vector_logo_psforever {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("vector-logo-psforever", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,4 +117,8 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="vector-logo-psforever" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\vector-logo-psforever.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
PSLauncher/Resources/icon.ico
Normal file
BIN
PSLauncher/Resources/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 550 KiB |
BIN
PSLauncher/Resources/vector-logo-psforever.png
Normal file
BIN
PSLauncher/Resources/vector-logo-psforever.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
|
|
@ -20,6 +20,8 @@ namespace PSLauncher
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
||||
|
||||
planetsidePathTextField.Text = Settings.Default.PSPath;
|
||||
launchArgs.Text = Settings.Default.ExtraArgs;
|
||||
clearOnLaunch.Checked = Settings.Default.ClearOutputOnLaunch;
|
||||
|
|
@ -61,17 +63,26 @@ namespace PSLauncher
|
|||
return false;
|
||||
}
|
||||
|
||||
var versionInfo = FileVersionInfo.GetVersionInfo(path);
|
||||
var vi = FileVersionInfo.GetVersionInfo(path);
|
||||
|
||||
if (versionInfo.FileVersion != "")
|
||||
if (vi.FileVersion != "")
|
||||
{
|
||||
planetsideVersion.Text = "Version " + versionInfo.FileVersion;
|
||||
// TODO: add advanced version handling
|
||||
int[] iParts = new int[4] { vi.FileMajorPart, vi.FileMinorPart, vi.FileBuildPart, vi.FilePrivatePart };
|
||||
string[] parts = new string[4];
|
||||
|
||||
for(var i = 0; i < 4; i++)
|
||||
{
|
||||
parts[i] = iParts[i].ToString();
|
||||
}
|
||||
|
||||
planetsideVersion.Text = "Version " + string.Join(".", parts);
|
||||
planetsideVersion.ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
planetsideVersion.Text = "Unknown version";
|
||||
planetsideVersion.ForeColor = System.Drawing.Color.Yellow;
|
||||
planetsideVersion.Text = "Missing version";
|
||||
planetsideVersion.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue