mirror of
https://github.com/snltty/linker.git
synced 2025-12-24 12:38:04 +08:00
我靠,大BUG
This commit is contained in:
@@ -1,2 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Compile Update="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -20,7 +20,7 @@ namespace cmonitor.wallpaper.win
|
||||
|
||||
string imgUrl = "./bg.jpg";
|
||||
string shareMkey = "cmonitor/share";
|
||||
int shareMLength = 10;
|
||||
int shareMLength = 100;
|
||||
int shareItemMLength = 1024;
|
||||
int shareKeyBoardIndex = 1;
|
||||
int shareWallpaperIndex = 2;
|
||||
|
||||
@@ -34,14 +34,9 @@ namespace cmonitor.plugins.llock.report
|
||||
|
||||
public object GetReports(ReportType reportType)
|
||||
{
|
||||
if (reportType == ReportType.Full || shareMemory.ReadVersionUpdated((int)ShareMemoryIndexs.LLock))
|
||||
report.LockScreen = Running();
|
||||
if (reportType == ReportType.Full || report.Updated() || shareMemory.ReadVersionUpdated((int)ShareMemoryIndexs.LLock))
|
||||
{
|
||||
bool old = lLockConfigInfo.Open;
|
||||
lLockConfigInfo.Open = report.LockScreen = Running();
|
||||
if (lLockConfigInfo.Open != old)
|
||||
{
|
||||
clientConfig.Set(lLockConfigInfo);
|
||||
}
|
||||
return report;
|
||||
}
|
||||
return null;
|
||||
@@ -96,9 +91,14 @@ namespace cmonitor.plugins.llock.report
|
||||
public bool Open { get; set; }
|
||||
}
|
||||
|
||||
public sealed class LLockReportInfo
|
||||
public sealed class LLockReportInfo : ReportInfo
|
||||
{
|
||||
public bool LockScreen { get; set; }
|
||||
|
||||
public override int HashCode()
|
||||
{
|
||||
return LockScreen.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using cmonitor.config;
|
||||
using cmonitor.libs;
|
||||
using common.libs;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace cmonitor.plugins.share.report
|
||||
{
|
||||
@@ -20,11 +21,34 @@ namespace cmonitor.plugins.share.report
|
||||
if (config.Common.BlueProtect && OperatingSystem.IsWindows())
|
||||
{
|
||||
ProcessBlueProtection.Protect();
|
||||
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
||||
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
||||
}
|
||||
#endif
|
||||
|
||||
this.shareMemory = shareMemory;
|
||||
InitShare();
|
||||
}
|
||||
|
||||
private void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
if (e.Reason == SessionSwitchReason.SessionLogoff)
|
||||
{
|
||||
ProcessBlueProtection.Unprotect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e)
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
ProcessBlueProtection.Unprotect();
|
||||
}
|
||||
}
|
||||
|
||||
public object GetReports(ReportType reportType)
|
||||
{
|
||||
bool updated = GetShare();
|
||||
|
||||
@@ -33,10 +33,9 @@ namespace cmonitor.plugins.wallpaper.report
|
||||
|
||||
public object GetReports(ReportType reportType)
|
||||
{
|
||||
if (reportType == ReportType.Full || shareMemory.ReadVersionUpdated((int)ShareMemoryIndexs.Wallpaper))
|
||||
report.Value = Running();
|
||||
if (reportType == ReportType.Full || report.Updated() || shareMemory.ReadVersionUpdated((int)ShareMemoryIndexs.Wallpaper))
|
||||
{
|
||||
report.Value = Running();
|
||||
|
||||
return report;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user