Skip to content

Commit

Permalink
- Added app icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgemagic committed Jul 19, 2024
1 parent 21ddb16 commit 9bb06d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DonatelloAI.Windows/DonatelloAI.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<None Remove="appicon.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Evergine.DirectX11" Version="2024.6.28.320" />
<PackageReference Include="Evergine.HLSLEverywhere" Version="2024.6.28.320" />
Expand All @@ -15,6 +18,9 @@
<ItemGroup Condition="$(DefineConstants.Contains('EVERGINE_EDITOR'))">
<ProjectReference Include="..\NetTripoAI.Editor\NetTripoAI.Editor.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="appicon.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DonatelloAI\DonatelloAI.csproj" />
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions DonatelloAI.Windows/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using Evergine.Platform;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;

namespace DonatelloAI.Windows
{
Expand Down Expand Up @@ -51,6 +53,8 @@ static void Main(string[] args)
WindowsSystem windowsSystem = new Evergine.Forms.FormsWindowsSystem();
application.Container.RegisterInstance(windowsSystem);
var window = windowsSystem.CreateWindow("Donatello AI", width, height);
var assembly = Assembly.GetExecutingAssembly();
(window as Evergine.Forms.FormsWindow).NativeWindow.Icon = new Icon(assembly.GetManifestResourceStream("DonatelloAI.Windows.appicon.ico"));

ConfigureGraphicsContext(application, window);

Expand Down
Binary file added DonatelloAI.Windows/appicon.ico
Binary file not shown.

0 comments on commit 9bb06d0

Please sign in to comment.