App icon: vwe.ico as the exe and window icon
ApplicationIcon embeds it in the exe (Explorer, taskbar); MainForm pulls the same embedded icon for the title bar via ExtractAssociatedIcon. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,8 @@ internal sealed class MainForm : Form
|
|||||||
{
|
{
|
||||||
// ProductVersion carries the git stamp (see StampGitVersion in the csproj).
|
// ProductVersion carries the git stamp (see StampGitVersion in the csproj).
|
||||||
Text = $"vRIO v{Application.ProductVersion} — Virtual RIO cockpit device";
|
Text = $"vRIO v{Application.ProductVersion} — Virtual RIO cockpit device";
|
||||||
|
// Title-bar/taskbar icon from the exe's embedded ApplicationIcon (vwe.ico).
|
||||||
|
Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
||||||
// Fit the window to its content: the cockpit canvas plus the 330px
|
// Fit the window to its content: the cockpit canvas plus the 330px
|
||||||
// control strip, with just enough height for the strip's log area.
|
// control strip, with just enough height for the strip's log area.
|
||||||
ClientSize = new Size(_canvas.Width + 332, Math.Max(_canvas.Height, 640));
|
ClientSize = new Size(_canvas.Width + 332, Math.Max(_canvas.Height, 640));
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<ApplicationIcon>vwe.ico</ApplicationIcon>
|
||||||
<AssemblyTitle>vRIO — Virtual RIO device</AssemblyTitle>
|
<AssemblyTitle>vRIO — Virtual RIO device</AssemblyTitle>
|
||||||
<!-- StampGitVersion already puts the sha in InformationalVersion; stop the
|
<!-- StampGitVersion already puts the sha in InformationalVersion; stop the
|
||||||
SDK appending "+fullsha" on top of it. -->
|
SDK appending "+fullsha" on top of it. -->
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Reference in New Issue
Block a user