From 4226c5774742876aa13bee5bf847386eb1898010 Mon Sep 17 00:00:00 2001 From: MakesYT <42534870+MakesYT@users.noreply.github.com> Date: Mon, 29 Apr 2024 00:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=B0=86=E6=95=B0?= =?UTF-8?q?=E5=AD=A6=E8=BF=90=E7=AE=97=E7=BB=93=E6=9E=9C=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=88=B0=E5=89=AA=E8=B4=B4=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core.Window/SearchItemTool.cs | 13 +++++++++++++ .../Converter/SearchWindow/SearchItemToInfo.cs | 2 ++ KitopiaAvalonia/KitopiaAvalonia.csproj | 2 +- PinyinM.NET | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Core.Window/SearchItemTool.cs b/Core.Window/SearchItemTool.cs index 14226ea..c07490d 100644 --- a/Core.Window/SearchItemTool.cs +++ b/Core.Window/SearchItemTool.cs @@ -1,5 +1,6 @@ using System.Diagnostics; using System.IO; +using System.Windows; using CommunityToolkit.Mvvm.Messaging; using Core.SDKs.CustomScenario; using Core.SDKs.Services; @@ -80,6 +81,18 @@ public void OpenFile(SearchViewItem? searchViewItem) }); break; } + case FileType.数学运算: + { + var tcs = new TaskCompletionSource(); + var thread = new Thread(() => + { + Clipboard.SetText(searchViewItem.ItemDisplayName.Remove(0,1)); + }); + thread.SetApartmentState(ApartmentState.STA); + thread.Start(); + break; + } + case FileType.文件夹: { if (searchViewItem.Arguments == null) diff --git a/KitopiaAvalonia/Converter/SearchWindow/SearchItemToInfo.cs b/KitopiaAvalonia/Converter/SearchWindow/SearchItemToInfo.cs index 156b7f3..fe888f6 100644 --- a/KitopiaAvalonia/Converter/SearchWindow/SearchItemToInfo.cs +++ b/KitopiaAvalonia/Converter/SearchWindow/SearchItemToInfo.cs @@ -39,6 +39,8 @@ public class SearchItemToInfo : IValueConverter info.Append(item.OnlyKey); break; case FileType.数学运算: + info.Append($"点击将{item.ItemDisplayName.Remove(0,1)}复制到剪贴板"); + break; case FileType.剪贴板图像: case FileType.None: break; diff --git a/KitopiaAvalonia/KitopiaAvalonia.csproj b/KitopiaAvalonia/KitopiaAvalonia.csproj index f2a96eb..d0d7147 100644 --- a/KitopiaAvalonia/KitopiaAvalonia.csproj +++ b/KitopiaAvalonia/KitopiaAvalonia.csproj @@ -28,7 +28,7 @@ Assets\icon.ico true none - 0.0.2.041 + 0.0.2.042 diff --git a/PinyinM.NET b/PinyinM.NET index 9ea0b79..1dd7c3f 160000 --- a/PinyinM.NET +++ b/PinyinM.NET @@ -1 +1 @@ -Subproject commit 9ea0b79bf1a6d0de3c6cf61161be2660f138b783 +Subproject commit 1dd7c3f31fb8845f87d1517bc0d95710fd95433a