From 523641201e58a496bf24e8ffff81acf896f0c99d Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Sat, 27 Feb 2021 20:52:17 +0800 Subject: [PATCH] fix x86 app --- SteamToolsV2+.sln | 18 +++--- ...amTools.Client.Desktop.Avalonia.App.csproj | 9 --- .../Application/UI/INotifyIcon.cs | 8 +++ ....SteamTools.Client.Desktop.Avalonia.csproj | 2 + .../Application/UI/NotifyIcon.cs | 29 +++++++++ ...n.SteamTools.Client.Desktop.Windows.csproj | 2 - .../UI/INotifyIcon.cs | 52 ++++++++++++++++ .../Application/UI/Views/Form1.resx | 60 ------------------- 8 files changed, 100 insertions(+), 80 deletions(-) create mode 100644 System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/INotifyIcon.cs create mode 100644 System.Application.SteamTools.Client.Desktop.Mac/Application/UI/NotifyIcon.cs create mode 100644 System.Application.SteamTools.Client.Desktop/UI/INotifyIcon.cs delete mode 100644 System.Application.SteamTools.Tools.Packager/Application/UI/Views/Form1.resx diff --git a/SteamToolsV2+.sln b/SteamToolsV2+.sln index 0c90065d8..11e39a9f6 100644 --- a/SteamToolsV2+.sln +++ b/SteamToolsV2+.sln @@ -79,7 +79,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam4NET", "references\Ste EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy", "references\Titanium-Web-Proxy\src\Titanium.Web.Proxy\Titanium.Web.Proxy.csproj", "{35D60129-6652-4B6E-A04A-9766C3CF1869}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Application.SteamTools.Tools.OpenSourceLibraryList", "System.Application.SteamTools.Tools.OpenSourceLibraryList\System.Application.SteamTools.Tools.OpenSourceLibraryList.csproj", "{CF7C2B80-D393-45EA-A67D-DF46FF17B0F8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Application.SteamTools.Tools.OpenSourceLibraryList", "System.Application.SteamTools.Tools.OpenSourceLibraryList\System.Application.SteamTools.Tools.OpenSourceLibraryList.csproj", "{CF7C2B80-D393-45EA-A67D-DF46FF17B0F8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -197,12 +197,12 @@ Global {D1F15D97-802E-4AA3-A4A5-B890ABE32897}.Release|Any CPU.Build.0 = Release|Any CPU {D1F15D97-802E-4AA3-A4A5-B890ABE32897}.Release|x86.ActiveCfg = Release|Any CPU {D1F15D97-802E-4AA3-A4A5-B890ABE32897}.Release|x86.Build.0 = Release|Any CPU - {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|Any CPU.ActiveCfg = Debug|x86 - {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|Any CPU.Build.0 = Debug|x86 + {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|Any CPU.Build.0 = Debug|Any CPU {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|x86.ActiveCfg = Debug|x86 {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Debug|x86.Build.0 = Debug|x86 - {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|Any CPU.ActiveCfg = Release|x86 - {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|Any CPU.Build.0 = Release|x86 + {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|Any CPU.Build.0 = Release|Any CPU {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|x86.ActiveCfg = Release|Any CPU {2FFA5BCE-B3C3-46EA-8830-838C938BF814}.Release|x86.Build.0 = Release|Any CPU {4F09B6D1-3F83-45A0-AEC8-0F243E7CD263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -229,12 +229,12 @@ Global {948C1EA8-12DB-4F8A-A190-8615DFBD9FE4}.Release|Any CPU.Build.0 = Release|Any CPU {948C1EA8-12DB-4F8A-A190-8615DFBD9FE4}.Release|x86.ActiveCfg = Release|Any CPU {948C1EA8-12DB-4F8A-A190-8615DFBD9FE4}.Release|x86.Build.0 = Release|Any CPU - {141532E1-540E-4E50-8723-96936C191281}.Debug|Any CPU.ActiveCfg = Debug|x86 - {141532E1-540E-4E50-8723-96936C191281}.Debug|Any CPU.Build.0 = Debug|x86 + {141532E1-540E-4E50-8723-96936C191281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {141532E1-540E-4E50-8723-96936C191281}.Debug|Any CPU.Build.0 = Debug|Any CPU {141532E1-540E-4E50-8723-96936C191281}.Debug|x86.ActiveCfg = Debug|Any CPU {141532E1-540E-4E50-8723-96936C191281}.Debug|x86.Build.0 = Debug|Any CPU - {141532E1-540E-4E50-8723-96936C191281}.Release|Any CPU.ActiveCfg = Release|x86 - {141532E1-540E-4E50-8723-96936C191281}.Release|Any CPU.Build.0 = Release|x86 + {141532E1-540E-4E50-8723-96936C191281}.Release|Any CPU.ActiveCfg = Release|Any CPU + {141532E1-540E-4E50-8723-96936C191281}.Release|Any CPU.Build.0 = Release|Any CPU {141532E1-540E-4E50-8723-96936C191281}.Release|x86.ActiveCfg = Release|Any CPU {141532E1-540E-4E50-8723-96936C191281}.Release|x86.Build.0 = Release|Any CPU {60530AF8-4790-4A85-BCE2-C5673E9C601B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia.App/System.Application.SteamTools.Client.Desktop.Avalonia.App.csproj b/System.Application.SteamTools.Client.Desktop.Avalonia.App/System.Application.SteamTools.Client.Desktop.Avalonia.App.csproj index 5b7f8f73a..c2c716b41 100644 --- a/System.Application.SteamTools.Client.Desktop.Avalonia.App/System.Application.SteamTools.Client.Desktop.Avalonia.App.csproj +++ b/System.Application.SteamTools.Client.Desktop.Avalonia.App/System.Application.SteamTools.Client.Desktop.Avalonia.App.csproj @@ -11,15 +11,6 @@ Properties\app.manifest - - - x86 - - - - x86 - - Properties\AssemblyInfo.cs diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/INotifyIcon.cs b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/INotifyIcon.cs new file mode 100644 index 000000000..b951acac7 --- /dev/null +++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/INotifyIcon.cs @@ -0,0 +1,8 @@ +using Avalonia.Controls; + +namespace System.Application.UI +{ + public interface INotifyIcon : INotifyIcon + { + } +} \ No newline at end of file diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj b/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj index 35aab2d8b..baf14309f 100644 --- a/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj +++ b/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj @@ -3,6 +3,8 @@ net5.0 System + false + diff --git a/System.Application.SteamTools.Client.Desktop.Mac/Application/UI/NotifyIcon.cs b/System.Application.SteamTools.Client.Desktop.Mac/Application/UI/NotifyIcon.cs new file mode 100644 index 000000000..c7990ac58 --- /dev/null +++ b/System.Application.SteamTools.Client.Desktop.Mac/Application/UI/NotifyIcon.cs @@ -0,0 +1,29 @@ +//using AppKit; +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; + +//namespace System.Application.UI +//{ +// /// +// /// Represents a Notification Tray Icon (on a OSxMac StatusBarItem) +// /// +// public class NotifyIcon : INotifyIcon +// { +// NSStatusItem _item; +// NSStatusItem statusBarItem +// { +// get => _item; set +// { +// _item = value; +// UpdateMenu(); +// } +// } + +// public event EventHandler? Click; +// public event EventHandler? DoubleClick; +// public event EventHandler? RightClick; +// } +//} diff --git a/System.Application.SteamTools.Client.Desktop.Windows/System.Application.SteamTools.Client.Desktop.Windows.csproj b/System.Application.SteamTools.Client.Desktop.Windows/System.Application.SteamTools.Client.Desktop.Windows.csproj index 20917a959..0c94076ce 100644 --- a/System.Application.SteamTools.Client.Desktop.Windows/System.Application.SteamTools.Client.Desktop.Windows.csproj +++ b/System.Application.SteamTools.Client.Desktop.Windows/System.Application.SteamTools.Client.Desktop.Windows.csproj @@ -3,8 +3,6 @@ net5.0 System - - x86 diff --git a/System.Application.SteamTools.Client.Desktop/UI/INotifyIcon.cs b/System.Application.SteamTools.Client.Desktop/UI/INotifyIcon.cs new file mode 100644 index 000000000..08eb522eb --- /dev/null +++ b/System.Application.SteamTools.Client.Desktop/UI/INotifyIcon.cs @@ -0,0 +1,52 @@ +namespace System.Application.UI +{ + /// + /// Represents a taskbar notification area icon (aka "tray icon") on Windows, + /// and similar task panel notification icons on Linux and Mac. + /// + /// + public interface INotifyIcon + { + /// + /// Gets or sets the icon for the notify icon. Either a file system path + /// or a resm: manifest resource path can be specified. + /// + string IconPath { get; set; } + + /// + /// Gets or sets the tooltip text for the notify icon. + /// + string ToolTipText { get; set; } + + /// + /// Gets or sets the context- (right-click)-menu for the notify icon. + /// + TContextMenu ContextMenu { get; set; } + + /// + /// Gets or sets if the notify icon is visible in the + /// taskbar notification area or not. + /// + bool Visible { get; set; } + + /// + /// Removes the notify icon from the taskbar notification area. + /// + void Remove(); + + /// + /// This event is raised when a user clicks on the notification icon. + /// + event EventHandler Click; + + /// + /// This event is raised when a user doubleclicks on the notification icon. + /// + event EventHandler DoubleClick; + + /// + /// This event is raised when a user right-clicks on the notification icon. + /// + event EventHandler RightClick; + } +} \ No newline at end of file diff --git a/System.Application.SteamTools.Tools.Packager/Application/UI/Views/Form1.resx b/System.Application.SteamTools.Tools.Packager/Application/UI/Views/Form1.resx deleted file mode 100644 index f298a7be8..000000000 --- a/System.Application.SteamTools.Tools.Packager/Application/UI/Views/Form1.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file