Add Dev Tray Icon

This commit is contained in:
DB p 2024-05-31 01:48:29 +09:00
parent fe71d1e03b
commit 874418ae0d
6 changed files with 21 additions and 5 deletions

View file

@ -111,6 +111,12 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Update="Resources\dev.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="taskkill /f /fi &quot;IMAGENAME eq Flow.Launcher.exe&quot;" /> <Exec Command="taskkill /f /fi &quot;IMAGENAME eq Flow.Launcher.exe&quot;" />
</Target> </Target>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -332,11 +332,10 @@ namespace Flow.Launcher
_notifyIcon = new NotifyIcon _notifyIcon = new NotifyIcon
{ {
Text = Infrastructure.Constant.FlowLauncherFullName, Text = Infrastructure.Constant.FlowLauncherFullName,
Icon = Properties.Resources.app, Icon = Constant.Version == "1.0.0" ? Properties.Resources.dev : Properties.Resources.app,
Visible = !_settings.HideNotifyIcon Visible = !_settings.HideNotifyIcon
}; };
var openIcon = new FontIcon var openIcon = new FontIcon
{ {
Glyph = "\ue71e" Glyph = "\ue71e"

View file

@ -77,5 +77,13 @@ namespace Flow.Launcher.Properties {
return ((System.Drawing.Icon)(obj)); return ((System.Drawing.Icon)(obj));
} }
} }
internal static System.Drawing.Icon dev
{
get
{
object obj = ResourceManager.GetObject("dev", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }

View file

@ -112,15 +112,18 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="app" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="app" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\app.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\app.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="dev" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\dev.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="gamemode" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="gamemode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gamemode.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Images\gamemode.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB