Skip to content

Commit 8b63d9e

Browse files
committed
[Preview Release] 1.0.0.2 版本信息和README.md
1 parent 8384d13 commit 8b63d9e

File tree

11 files changed

+156
-132
lines changed

11 files changed

+156
-132
lines changed

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
# MyToolBar (Beta)
1+
# MyToolBar (Preview)
22
[![LICENSE](https://img.shields.io/badge/license-GPL%20v3.0-blue.svg?style=flat-square)](https://github.com/TwilightLemon/MyToolBar/blob/master/LICENSE)
33
### Platform
4-
Run on Windows 10 1803~11
4+
Run on Windows10 1803~ Windows11
55
Powered by .NET 8 on WPF
6-
7-
目前此App处于测试阶段,功能可能不稳定,作者正在努力提高可定制性。
6+
现已进入预发布阶段,欢迎体验和反馈!
87
## 简介
98
这是一个为提升Surface等Windows平板设备体验的全局顶部栏工具,目标是:
10-
- 实时了解和控制设备运行状态
11-
- 提供常用功能适用于平板的快捷方式
12-
- 提升平板触控和笔的操作体验
9+
- 实时了解和控制设备运行状态:硬件状态监控和快速进程管理,现由插件`MyToolBar.Plugin.BasicPackage`提供
10+
- 提供常用功能常驻平台、提升平板触控和笔的操作体验: 拓展触控笔菜单、侧边栏、顶部栏手势等交互方式,现由插件`MyToolBar.Plugin.TabletUtils`提供
1311
- 与WindowsUI融为一体
1412
- 轻量级和低功耗
1513
- 高拓展性和可定制性
1614

1715
当然,此app不仅适配平板,也同样适用于用鼠标操作的桌面设备。
1816

19-
![Main](https://github.com/TwilightLemon/Data/blob/master/50c4d49f1bd71f44cd3bec9e4fdf5fd8.jpg?raw=true)
17+
![Main](https://raw.githubusercontent.com/TwilightLemon/Data/refs/heads/master/MTB_Settings_Main.jpg)
2018
## 功能
2119
### 通过AppBar固定的顶部栏
2220
了解什么是AppBar(Win32 API): [WPF使用AppBar实现窗口停靠,适配缩放、全屏响应和多窗口并列](https://blog.twlmgatito.cn/posts/use-appbar-in-wpf/)
@@ -29,28 +27,43 @@ Powered by .NET 8 on WPF
2927

3028
- 右部: "胶囊(Capsules)"交互信息显示区,并可以下滑(或单击)弹出详细信息(PopupWindow)。
3129
目前在`MyToolBar.Plugin.BasicPackage`中提供了以下功能:
32-
- 硬件监测: 电池、CPU占有率、温度、内存占用、网络状态;PopupWindow为进程管理器提供`Administrator`级别的进程查看和结束`NT Kernel`级别的进程冻结和压缩功能。
30+
- 硬件监测: 电池、CPU占有率、内存占用、网络状态;PopupWindow为进程管理器提供进程查看和结束`NT Kernel`级别的进程冻结和压缩功能。
3331
- 天气: (我移除了windows小部件 但很需要一个地方来显示天气) 通过GPS定位城市,有搜索、收藏功能,长按(鼠标右键点击)可设置为默认显示城市
3432

3533
上面的Outer Control和Capsules都是由插件提供的,可以自行在设置页面中启用和调整。
34+
![Plugin](https://raw.githubusercontent.com/TwilightLemon/Data/refs/heads/master/MTB_Settings_Plugin.jpg)
3635

3736
### 平板设备拓展工具 (由`MyToolBar.Plugin.TabletUtils`提供)
3837
现有功能:
3938
- 适用于触摸和笔的菜单:
4039
在屏幕右上角滑动打开菜单,目前提供截图和屏幕绘制功能。
4140
- 左侧侧边栏:
42-
触摸屏幕左侧边缘(鼠标靠近停留)打开侧边栏,功能待拓展。
41+
触摸屏幕左侧边缘(鼠标靠近停留)打开侧边栏,现接入DeepSeek AI Chat
4342

43+
![Tablet](https://raw.githubusercontent.com/TwilightLemon/Data/refs/heads/master/MTB_Settings_Services.jpg)
4444
### 保持与Windows高度融合
4545
- 支持Dark/Light Mode 跟随系统
4646
- 全局亚克力/云母材质特效
4747
- 支持Modern Standby待机模式和电源优化
4848

4949
### More...
5050

51-
## 如何使用(Beta)
52-
(尚未发布Release版之前,暂无打包好的插件包可用,未来将制作成独立文件并支持直接导入)
53-
编译整个解决方案,选择你需要的插件,在生成目录将主文件(例如`MyToolBar.Plugin.BasicPackage.dll`)和资源文件夹复制到主程序目录/Plugins目录下;之后在设置页启用即可。
51+
## 如何使用(Preview)
52+
1. 自行编译:
53+
- 编译整个项目
54+
-`MyToolBar.Plugin.BasicPackage``MyToolBar.Plugin.TabletUtils`的dll文件及其依赖文件放入同名文件夹下,再放入`Plugins`文件夹
55+
插件文件结构如下:
56+
```
57+
/MyToolBar.exe运行目录/Plugins/
58+
MyToolBar.Plugin.BasicPackage/
59+
MyToolBar.Plugin.BasicPackage.dll 主文件
60+
MyToolBar.Plugin.BasicPackage.deps.json 依赖文件
61+
...其他依赖dll
62+
/Zh-CN/xxxresource.dll 资源文件
63+
...
64+
```
65+
2. 到Release页面下载最新版本,解压到任意目录,运行MyToolBar.exe
66+
3. 计划上架Microsoft Store和WinGet
5467
5568
## 版权声明
5669
本应用由 [TwilightLemon (https://blog.twlmgatito.cn) (QQ:2728578956)](https://twlm.space) 开发,Fork请保留原仓库地址和版权信息
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<UseWPF>true</UseWPF>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<UseWPF>true</UseWPF>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<AssemblyVersion>1.0.0.2</AssemblyVersion>
9+
</PropertyGroup>
910

10-
<ItemGroup>
11-
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
12-
<PackageReference Include="EleCho.WpfSuite" Version="0.8.1" />
13-
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
14-
</ItemGroup>
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
13+
<PackageReference Include="EleCho.WpfSuite" Version="0.8.1" />
14+
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
15+
</ItemGroup>
1516

16-
<ItemGroup>
17-
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
18-
</ItemGroup>
17+
<ItemGroup>
18+
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
19+
</ItemGroup>
1920

2021
</Project>

src/MyToolBar.Common/Styles/UITemplate.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@
181181
<Setter Property="Background" Value="{DynamicResource MaskColor}"/>
182182
<Setter Property="Foreground" Value="{DynamicResource ForeColor}"/>
183183
<Setter Property="CaretBrush" Value="{DynamicResource ForeColor}"/>
184+
<Setter Property="SelectionBrush"
185+
Value="{DynamicResource SystemThemeColor}" />
184186
<Setter Property="BorderThickness" Value="0"/>
185187
<Setter Property="CornerRadius" Value="10"/>
186188
</Style>
Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<UseWPF>true</UseWPF>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<UseWPF>true</UseWPF>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<AssemblyVersion>1.0.0.2</AssemblyVersion>
9+
</PropertyGroup>
910

10-
<ItemGroup>
11-
<ProjectReference Include="..\MyToolBar.Common\MyToolBar.Common.csproj" />
12-
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
13-
<PackageReference Include="EleCho.WpfSuite" Version="0.8.1" />
14-
<PackageReference Include="System.Management" Version="8.0.0" />
15-
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
16-
</ItemGroup>
11+
<ItemGroup>
12+
<ProjectReference Include="..\MyToolBar.Common\MyToolBar.Common.csproj" />
13+
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
14+
<PackageReference Include="EleCho.WpfSuite" Version="0.8.1" />
15+
<PackageReference Include="System.Management" Version="8.0.0" />
16+
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
17+
</ItemGroup>
1718

18-
<ItemGroup>
19-
<EmbeddedResource Update="LanguageRes\PluginLang.En-US.resx">
20-
<Generator>PublicResXFileCodeGenerator</Generator>
21-
</EmbeddedResource>
22-
<EmbeddedResource Update="LanguageRes\PluginLang.Zh-CN.resx">
23-
<Generator>PublicResXFileCodeGenerator</Generator>
24-
</EmbeddedResource>
25-
</ItemGroup>
19+
<ItemGroup>
20+
<EmbeddedResource Update="LanguageRes\PluginLang.En-US.resx">
21+
<Generator>PublicResXFileCodeGenerator</Generator>
22+
</EmbeddedResource>
23+
<EmbeddedResource Update="LanguageRes\PluginLang.Zh-CN.resx">
24+
<Generator>PublicResXFileCodeGenerator</Generator>
25+
</EmbeddedResource>
26+
</ItemGroup>
2627

2728
</Project>

src/MyToolBar.Plugin.TabletUtils/DeepSeek/DeepSeekChatWindow.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
Background="{DynamicResource MaskColor}"
5353
CheckedBackground="{DynamicResource SystemThemeColor}"
5454
HoverBackground="{DynamicResource SystemThemeColor}"
55+
PressedBackground="{DynamicResource SystemThemeColor}"
5556
Foreground="{DynamicResource ForeColor}"
5657
HoverForeground="{DynamicResource ForeColor}"
5758
CheckedForeground="{DynamicResource ForeColor}">
@@ -109,6 +110,7 @@
109110
Background="{DynamicResource MaskColor}"
110111
CheckedBackground="{DynamicResource SystemThemeColor}"
111112
HoverBackground="{DynamicResource SystemThemeColor}"
113+
PressedBackground="{DynamicResource SystemThemeColor}"
112114
Foreground="{DynamicResource ForeColor}"
113115
HoverForeground="{DynamicResource ForeColor}"
114116
CheckedForeground="{DynamicResource ForeColor}">

src/MyToolBar.Plugin.TabletUtils/DeepSeek/DeepSeekChatWindow.xaml.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,19 @@ public partial class DeepSeekChatWindow : Window
2222
{
2323
#region Deepseek config
2424
internal static string DeepSeekConfigKey = "MyToolBar.Plugin.TabletUtils.DeepSeek";
25-
private static SettingsMgr<DeepSeekConfig> config = new(DeepSeekConfigKey, SideBarPlugin._name);
26-
private static DeepSeekClient? client = null;
27-
static DeepSeekChatWindow()
25+
private SettingsMgr<DeepSeekConfig> config = new(DeepSeekConfigKey, SideBarPlugin._name);
26+
private DeepSeekClient? client = null;
27+
private void Mgr_OnDataChanged()
2828
{
29-
Init();
30-
config.OnDataChanged += Mgr_OnDataChanged;
31-
}
32-
private static void Mgr_OnDataChanged()
33-
{
34-
Init();
29+
_=Init();
3530
}
36-
private static async void Init()
31+
private async Task Init()
3732
{
3833
await config.Load();
3934
if (!string.IsNullOrEmpty(config.Data?.APIKey))
4035
{
4136
client = new DeepSeekClient(config.Data.APIKey);
42-
client.SetTimeout(5000);
37+
client.SetTimeout(5);
4338
request.Model = config.Data!.Model;
4439
}
4540
}
@@ -53,12 +48,20 @@ public DeepSeekChatWindow()
5348
{
5449
InitializeComponent();
5550
Height = SystemParameters.WorkArea.Height-12;
51+
config.OnDataChanged += Mgr_OnDataChanged;
5652
Deactivated += SideWindow_Deactivated;
5753
Activated += SideWindow_Activated;
54+
Loaded += DeepSeekChatWindow_Loaded;
5855
Closed += SideWindow_Closed;
5956
GlobalService.OnIsDarkModeChanged += GlobalService_OnIsDarkModeChanged;
6057
}
6158

59+
private async void DeepSeekChatWindow_Loaded(object sender, RoutedEventArgs e)
60+
{
61+
await Init();
62+
SwitchModelTb.IsChecked = config.Data.Model == DeepSeekModels.ReasonerModel;
63+
}
64+
6265
private void SideWindow_Closed(object? sender, EventArgs e)
6366
{
6467
GlobalService.OnIsDarkModeChanged -= GlobalService_OnIsDarkModeChanged;
@@ -86,7 +89,6 @@ private void SideWindow_Activated(object? sender, EventArgs e)
8689
if (FixTb.IsChecked == true) return;
8790

8891
ApplyThemeForMdViewer(GlobalService.IsDarkMode);
89-
SwitchModelTb.IsChecked = request.Model == DeepSeekModels.ReasonerModel;
9092

9193
var da = new DoubleAnimation(0, 20, TimeSpan.FromMilliseconds(300));
9294
da.EasingFunction = new CircleEase();

src/MyToolBar.Plugin.TabletUtils/MyToolBar.Plugin.TabletUtils.csproj

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<UseWPF>true</UseWPF>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
9-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<UseWPF>true</UseWPF>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<AssemblyVersion>1.0.0.2</AssemblyVersion>
9+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
10+
</PropertyGroup>
1011

1112
<ItemGroup>
1213
<PackageReference Include="ColorCode.Core" Version="2.0.15" />
1314
<PackageReference Include="Markdig" Version="0.40.0" />
1415
</ItemGroup>
1516

16-
<ItemGroup>
17-
<ProjectReference Include="..\MyToolBar.Common\MyToolBar.Common.csproj" />
18-
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
19-
</ItemGroup>
17+
<ItemGroup>
18+
<ProjectReference Include="..\MyToolBar.Common\MyToolBar.Common.csproj" />
19+
<ProjectReference Include="..\MyToolBar.Plugin\MyToolBar.Plugin.csproj" />
20+
</ItemGroup>
2021

21-
<ItemGroup>
22-
<Reference Include="DeepSeek.Core">
23-
<HintPath>Lib\DeepSeek.Core.dll</HintPath>
24-
</Reference>
25-
<Reference Include="EleCho.MdViewer">
26-
<HintPath>Lib\EleCho.MdViewer.dll</HintPath>
27-
</Reference>
28-
</ItemGroup>
22+
<ItemGroup>
23+
<Reference Include="DeepSeek.Core">
24+
<HintPath>Lib\DeepSeek.Core.dll</HintPath>
25+
</Reference>
26+
<Reference Include="EleCho.MdViewer">
27+
<HintPath>Lib\EleCho.MdViewer.dll</HintPath>
28+
</Reference>
29+
</ItemGroup>
2930

3031
<ItemGroup>
3132
<EmbeddedResource Update="LanguageRes\PluginLang.En-US.resx">

src/MyToolBar.Plugin.TabletUtils/PenPackages/SideLauncherWindow.xaml.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
using MyToolBar.Common.WinAPI;
22
using MyToolBar.Plugin.TabletUtils.DeepSeek;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Diagnostics;
6-
using System.Threading.Tasks;
73
using System.Windows;
84
using System.Windows.Controls;
95
using System.Windows.Input;
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<UseWPF>true</UseWPF>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<UseWPF>true</UseWPF>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<AssemblyVersion>1.0.0.2</AssemblyVersion>
9+
</PropertyGroup>
910

1011
</Project>

0 commit comments

Comments
 (0)