Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ink Canvas/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Ink_Canvas"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
>
Expand Down
3 changes: 2 additions & 1 deletion Ink Canvas/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using Ink_Canvas.Helpers;
using Ink_Canvas.Properties;
using iNKORE.UI.WPF.Modern.Controls;
Expand Down Expand Up @@ -831,7 +831,7 @@
LogHelper.WriteLogToFile($"App | 清理更新标记文件失败: {ex.Message}", LogHelper.LogType.Warning);
}

Task.Run(async () =>

Check warning on line 834 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 834 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 834 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 834 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
{
try
{
Expand Down Expand Up @@ -1061,6 +1061,7 @@
}

_taskbar = (TaskbarIcon)FindResource("TaskbarTrayIcon");
_taskbar.ForceCreate();

StartArgs = e.Args;

Expand Down Expand Up @@ -1117,7 +1118,7 @@
{
LogHelper.WriteLogToFile($"App | 处理启动URI参数: {startupUriArg}", LogHelper.LogType.Event);
// 延迟一点执行,确保窗口初始化完成
Task.Delay(1000).ContinueWith(_ =>

Check warning on line 1121 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 1121 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 1121 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 1121 in Ink Canvas/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
{
mainWindow.Dispatcher.Invoke(() =>
{
Expand Down
7 changes: 3 additions & 4 deletions Ink Canvas/Helpers/WindowsNotificationHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using Microsoft.Toolkit.Uwp.Notifications;
using System;
using System.Windows;
Expand Down Expand Up @@ -40,10 +40,9 @@ private static void ShowBalloonForWin7(string version)

taskbar.Visibility = Visibility.Visible;

taskbar.ShowBalloonTip(
taskbar.ShowNotification(
"InkCanvasForClass CE",
$"发现新版本!:{version}",
BalloonIcon.Info);
$"发现新版本!:{version}");
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/InkCanvasForClass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<PackageReference Include="Costura.Fody" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.1" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.131" />
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.10.2.1" />
<PackageReference Include="iNKORE.UI.WPF" Version="1.2.8" />
<PackageReference Include="MdXaml" Version="1.27.0" />
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/MainWindow_cs/MW_Settings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using Ink_Canvas.Helpers;
using Newtonsoft.Json;
using OSVersionExtension;
Expand Down Expand Up @@ -5242,7 +5242,7 @@
MessageBoxImage.Warning);

Settings.Startup.UpdateChannel = oldChannel;
Dispatcher.BeginInvoke(new Action(() =>

Check warning on line 5245 in Ink Canvas/MainWindow_cs/MW_Settings.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 5245 in Ink Canvas/MainWindow_cs/MW_Settings.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
{
_isChangingUpdateChannelInternally = true;
try
Expand Down Expand Up @@ -5293,7 +5293,7 @@
else
{
Settings.Startup.UpdateChannel = oldChannel;
Dispatcher.BeginInvoke(new Action(() =>

Check warning on line 5296 in Ink Canvas/MainWindow_cs/MW_Settings.cs

View workflow job for this annotation

GitHub Actions / Build & Package (AnyCPU)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 5296 in Ink Canvas/MainWindow_cs/MW_Settings.cs

View workflow job for this annotation

GitHub Actions / Build & Package (x86)

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
{
_isChangingUpdateChannelInternally = true;
try
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using Ink_Canvas.Helpers;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/MainWindow_cs/MW_TrayIcon.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using Ink_Canvas.Helpers;
using iNKORE.UI.WPF.Controls;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hardcodet.Wpf.TaskbarNotification;
using H.NotifyIcon;
using iNKORE.UI.WPF.Helpers;
using System;
using System.Collections.Generic;
Expand Down
25 changes: 21 additions & 4 deletions Ink Canvas/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@
"Fody": "6.8.2"
}
},
"Hardcodet.NotifyIcon.Wpf": {
"H.NotifyIcon.Wpf": {
"type": "Direct",
"requested": "[2.0.1, )",
"resolved": "2.0.1",
"contentHash": "dtxmeZXzV2GzSm91aZ3hqzgoeVoARSkDPVCYfhVUNyyKBWYxMgNC0EcLiSYxD4Uc4alq/2qb3SmV8DgAENLRLQ=="
"requested": "[2.0.131, )",
"resolved": "2.0.131",
"contentHash": "f71kXNl6PjCqipJ7DQytg1QUBMQ+7j8rF1UyL8UPegymG1G57EYsskdIcf/VmF6JDuts6Dk6F8Hd4ziiz4/3Dw==",
"dependencies": {
"H.NotifyIcon": "2.0.131",
"System.ValueTuple": "4.5.0"
}
},
"iNKORE.UI.WPF": {
"type": "Direct",
Expand Down Expand Up @@ -185,6 +189,19 @@
"resolved": "6.8.2",
"contentHash": "sjGHrtGS1+kcrv99WXCvujOFBTQp4zCH3ZC9wo2LAtVaJkuLpHghQx3y4k1Q8ZKuDAbEw+HE6ZjPUJQK3ejepQ=="
},
"H.GeneratedIcons.System.Drawing": {
"type": "Transitive",
"resolved": "2.0.131",
"contentHash": "QoNGQrhxzG+dQufa4xRjSqihMy5aVVVZqQUt0fLJbwhs7rcM4hpN1qVkZpZEkHsRgrHfFBC/Ursjh8STY/sg7A=="
},
"H.NotifyIcon": {
"type": "Transitive",
"resolved": "2.0.131",
"contentHash": "mdznQAfcJFehblFoDUvtmdm1Y9+u1eMN1ffORbdYv5EwreMxkCwvdj8qQn3qnUo9EIJ6h5Xdgqey9Nj4us8w7w==",
"dependencies": {
"H.GeneratedIcons.System.Drawing": "2.0.131"
}
},
"MdXaml.Plugins": {
"type": "Transitive",
"resolved": "1.27.0",
Expand Down
Loading