mirror of
https://github.com/snltty/linker.git
synced 2025-11-01 13:04:00 +08:00
优化一些细节
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
using cmonitor.client.reports.screen;
|
||||
using common.libs.database;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace cmonitor.client
|
||||
{
|
||||
@@ -19,12 +18,14 @@ namespace cmonitor.client
|
||||
this.configDataProvider = configDataProvider;
|
||||
this.config = config;
|
||||
|
||||
ClientConfig clientConfig = configDataProvider.Load().Result ?? new ClientConfig();
|
||||
ClientConfig clientConfig = configDataProvider.Load().Result ?? new ClientConfig();
|
||||
LLock = clientConfig.LLock;
|
||||
Wallpaper = clientConfig.Wallpaper;
|
||||
WallpaperUrl = clientConfig.WallpaperUrl;
|
||||
HijackConfig = clientConfig.HijackConfig;
|
||||
HijackIds = clientConfig.HijackIds;
|
||||
WindowNames = clientConfig.WindowNames;
|
||||
WindowIds = clientConfig.WindowIds;
|
||||
ScreenShareState = clientConfig.ScreenShareState;
|
||||
UserSid = clientConfig.UserSid;
|
||||
SaveTask();
|
||||
@@ -32,7 +33,7 @@ namespace cmonitor.client
|
||||
|
||||
private void SaveTask()
|
||||
{
|
||||
Task.Factory.StartNew(() =>
|
||||
Task.Factory.StartNew(async () =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
@@ -46,7 +47,7 @@ namespace cmonitor.client
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
Thread.Sleep(5000);
|
||||
await Task.Delay(5000);
|
||||
}
|
||||
}, TaskCreationOptions.LongRunning);
|
||||
}
|
||||
@@ -93,6 +94,17 @@ namespace cmonitor.client
|
||||
}
|
||||
}
|
||||
|
||||
private uint[] _hijackIds = Array.Empty<uint>();
|
||||
public uint[] HijackIds
|
||||
{
|
||||
get => _hijackIds; set
|
||||
{
|
||||
_hijackIds = value;
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string[] _windowNames = Array.Empty<string>();
|
||||
public string[] WindowNames
|
||||
{
|
||||
@@ -103,6 +115,16 @@ namespace cmonitor.client
|
||||
}
|
||||
}
|
||||
|
||||
private uint[] _windowIds = Array.Empty<uint>();
|
||||
public uint[] WindowIds
|
||||
{
|
||||
get => _windowIds; set
|
||||
{
|
||||
_windowIds = value;
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
private ScreenShareStates _screenShareState;
|
||||
public ScreenShareStates ScreenShareState
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user