fixed taskbar behaviour (kinda)

This commit is contained in:
WeeXnes 2022-12-12 12:13:03 +01:00
parent 57c8a3bb80
commit de3bf385d6
4 changed files with 12 additions and 4 deletions

View file

@ -6,7 +6,7 @@ namespace WeeXnes.Core
{ {
public class Information public class Information
{ {
public const string Version = "4.0.2"; public const string Version = "4.0.3";
public const string EncryptionHash = "8zf5#RdyQ]$4x4_"; public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest"; public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
} }

View file

@ -31,10 +31,12 @@
ShowClose="True" ShowClose="True"
ShowMaximize="True" ShowMaximize="True"
ShowMinimize="True" ShowMinimize="True"
UseSnapLayout="True"> UseSnapLayout="True"
Name="TitleBar2">
<ui:TitleBar.Tray> <ui:TitleBar.Tray>
<ui:NotifyIcon Icon="/Images/wicon.png"> <ui:NotifyIcon Icon="/Images/wicon.png"
LeftClick="NotifyIcon_OnLeftClick">
<ui:NotifyIcon.Menu> <ui:NotifyIcon.Menu>
<ContextMenu> <ContextMenu>
<MenuItem <MenuItem

View file

@ -14,6 +14,7 @@ using Wpf.Ui.Mvvm.Services;
using Button = System.Windows.Controls.Button; using Button = System.Windows.Controls.Button;
using ButtonBase = System.Windows.Controls.Primitives.ButtonBase; using ButtonBase = System.Windows.Controls.Primitives.ButtonBase;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;
using NotifyIcon = Wpf.Ui.Controls.NotifyIcon;
namespace WeeXnes namespace WeeXnes
{ {
@ -49,6 +50,11 @@ namespace WeeXnes
{ {
ButtonHome.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); ButtonHome.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
} }
private void NotifyIcon_OnLeftClick(NotifyIcon sender, RoutedEventArgs e)
{
this.Show();
}
} }
} }

View file

@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Version>4.0.2</Version> <Version>4.0.3</Version>
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid> <ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>WeeXnes</RootNamespace> <RootNamespace>WeeXnes</RootNamespace>