A: 添加任务栏窗口界面 (TaskbarWindow.xaml) 以显示实时网络流量;新增工具类 TaskbarHelper 获取任务栏位置
A: README 更新,详述功能清单及说明 A: 添加图片资源(img.png, img_1.png, img_2.png, img_3.png) D: 移除 MainWindow.xaml.cs 中无用引用
This commit is contained in:
1 parent
0feeb00fae
commit
42464d9408
9 files changed
+100
-11
No files matched your search
@@ -43,3 +43,26 @@ npm run test:unit
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
|
||||
1. 流量图表:定时查询指定网络的信息并记录,根据线程为单位将内容记录下来
|
||||
2. 进程网络限制:上传/下载拦截(未设置、询问、拦截、允许)
|
||||
3. 限额:上传限额、下载限额
|
||||
4. 获取网络列表(本地连接;以太网等 连接状态信息、IP信息)
|
||||
5. 应用列表(列出所有活动或安装的软件,包括:软件状态、内存占用、CPU占用等信息)
|
||||
6. TCP 和 UDP 的连接历史,对于目标端口第一次和最后一次连接时间
|
||||

|
||||
7. 连接日志
|
||||

|
||||
8. 流量统计。按照年、月、周、日、12小时、6小时、3小时、1小时、30分钟、5分钟(应用、主机、流量类型、国家等维度筛选显示) 进行分段;用户可选查看时间(日期和小时的选择可以滑动选择);按照应用程序,端口、目标地址等内容信息进行展示和分类
|
||||

|
||||

|
||||
9. 对于不同的 网络环境、GPS 地址、设备状态(电量、设备模式) 自动切换联网控制规则(公司的网络切换某些软件联网;个人网络则打开某些软件联网)
|
||||
10. 配置文件可导入导出
|
||||
11. 网络连接地图:不同软件联网的IP是那个区域和国家
|
||||
12. 联网规则可设置有效时间(5分钟、10分钟、20分钟、30分钟、45分钟、1小时、3小时、6小时、12小时、1天、1周、自定义时间)、关机后重置、关闭软件后重置、永久有效
|
||||
13. 弹出连接请求提示,可选择允许/拒绝,并可记忆成规则
|
||||
|
||||
|
||||
|
||||
所连接服务器的地理位置
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -1,14 +1,4 @@
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows;
|
||||
|
||||
namespace Shell;
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
namespace Shell.Utils;
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public static class TaskbarHelper
|
||||
{
|
||||
[DllImport("shell32.dll", SetLastError = true)]
|
||||
static extern UInt32 SHAppBarMessage(UInt32 dwMessage, ref APPBARDATA pData);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct APPBARDATA
|
||||
{
|
||||
public UInt32 cbSize;
|
||||
public IntPtr hWnd;
|
||||
public UInt32 uCallbackMessage;
|
||||
public UInt32 uEdge;
|
||||
public RECT rc;
|
||||
public Int32 lParam;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
public int left, top, right, bottom;
|
||||
}
|
||||
|
||||
public static RECT GetTaskbarPosition()
|
||||
{
|
||||
APPBARDATA data = new APPBARDATA();
|
||||
data.cbSize = (UInt32)Marshal.SizeOf(typeof(APPBARDATA));
|
||||
SHAppBarMessage(0x00000005, ref data); // ABM_GETTASKBARPOS
|
||||
return data.rc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<Window x:Class="Shell.Views.TaskbarWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Background="Transparent"
|
||||
mc:Ignorable="d"
|
||||
Topmost="True"
|
||||
ShowInTaskbar="False"
|
||||
Title="MainWindow"
|
||||
ResizeMode="NoResize"
|
||||
Width="100" Height="50">
|
||||
<Grid>
|
||||
<TextBlock Text="↑ 0.1 MB/s
↓ 1.8 MB/s"
|
||||
Foreground="White"
|
||||
FontSize="14"
|
||||
FontFamily="Consolas"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using Shell.Utils;
|
||||
|
||||
namespace Shell.Views;
|
||||
|
||||
public partial class TaskbarWindow : Window
|
||||
{
|
||||
public TaskbarWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
// 获取任务栏位置
|
||||
var rect = TaskbarHelper.GetTaskbarPosition();
|
||||
|
||||
// 将窗口贴在任务栏右下角
|
||||
this.Left = rect.right - this.Width;
|
||||
this.Top = rect.bottom - this.Height;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user