mirror of
https://github.com/snltty/linker.git
synced 2025-10-28 03:13:15 +08:00
内网穿透测试
This commit is contained in:
62
cmonitor.install.win/.build/default.Manifest.xml
Normal file
62
cmonitor.install.win/.build/default.Manifest.xml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly
|
||||||
|
xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||||
|
manifestVersion="1.0">
|
||||||
|
<assemblyIdentity
|
||||||
|
processorArchitecture="x86"
|
||||||
|
version="5.1.0.0"
|
||||||
|
type="win32"
|
||||||
|
name="cmonitor.install.win.exe"/>
|
||||||
|
<description>cmonitor.install.win</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
processorArchitecture="x86"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!--Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!--Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!--Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10, Windows 11 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges>
|
||||||
|
<!--
|
||||||
|
可任选以下配置之一指定一个进程权限:
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
requireAdministrator 为管理员权限,
|
||||||
|
highestAvailable 为可以获取到的最高权限,
|
||||||
|
asInvoker 为默认值,即调用进程当前权限,一般不需要显式指定,指定后会禁用虚拟化。
|
||||||
|
|
||||||
|
虚拟化指Vista以后系统禁止写 Program File目录,启用虚拟化则重定向到%localappdata%\VirtualStore目录,
|
||||||
|
而注册表 HKEY_LOCAL_MACHINE\Software 则重定向到HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\Software
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
</assembly>
|
||||||
2
cmonitor.install.win/.build/default.init.aardio
Normal file
2
cmonitor.install.win/.build/default.init.aardio
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
//发布前触发
|
||||||
|
import ide;
|
||||||
6
cmonitor.install.win/.build/default.main.aardio
Normal file
6
cmonitor.install.win/.build/default.main.aardio
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
//此触发器在生成EXE以后执行
|
||||||
|
import ide;
|
||||||
|
import fsys;
|
||||||
|
|
||||||
|
//获取生成的EXE文件路径
|
||||||
|
var publishFile = ide.getPublishPath();
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
using common.libs;
|
|
||||||
using common.libs.extends;
|
|
||||||
using System.Net;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace cmonitor.install.win
|
|
||||||
{
|
|
||||||
public sealed class Config
|
|
||||||
{
|
|
||||||
FileStream fs = null;
|
|
||||||
StreamWriter writer = null;
|
|
||||||
StreamReader reader = null;
|
|
||||||
SemaphoreSlim slim = new SemaphoreSlim(1);
|
|
||||||
|
|
||||||
public Config()
|
|
||||||
{
|
|
||||||
if (Directory.Exists(ConfigPath) == false)
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(ConfigPath);
|
|
||||||
}
|
|
||||||
string path = Path.Join(ConfigPath, "config.json");
|
|
||||||
fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
|
|
||||||
reader = new StreamReader(fs, System.Text.Encoding.UTF8);
|
|
||||||
writer = new StreamWriter(fs, System.Text.Encoding.UTF8);
|
|
||||||
|
|
||||||
Load();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConfigCommonInfo Common { get; set; } = new ConfigCommonInfo();
|
|
||||||
public ConfigClientInfo Client { get; set; } = new ConfigClientInfo();
|
|
||||||
public ConfigServerInfo Server { get; set; } = new ConfigServerInfo();
|
|
||||||
|
|
||||||
public string ConfigPath { get; } = "./configs/";
|
|
||||||
|
|
||||||
|
|
||||||
private Dictionary<string, Dictionary<string, object>> JsonDic = new Dictionary<string, Dictionary<string, object>>();
|
|
||||||
public T Get<T>(T defaultValue)
|
|
||||||
{
|
|
||||||
return Get<T>(typeof(T).Name, defaultValue);
|
|
||||||
}
|
|
||||||
public T Get<T>(string name, T defaultValue)
|
|
||||||
{
|
|
||||||
if (JsonDic.ContainsKey(name))
|
|
||||||
{
|
|
||||||
return JsonDic[name].ToJson().DeJson<T>();
|
|
||||||
}
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
public void Set<T>(T value)
|
|
||||||
{
|
|
||||||
Set<T>(typeof(T).Name, value);
|
|
||||||
}
|
|
||||||
public void Set<T>(string name, T value)
|
|
||||||
{
|
|
||||||
JsonDic[name] = value.ToJson().DeJson<Dictionary<string, object>>();
|
|
||||||
Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Load()
|
|
||||||
{
|
|
||||||
InitFileConfig();
|
|
||||||
ReadJson();
|
|
||||||
Save();
|
|
||||||
}
|
|
||||||
private void InitFileConfig()
|
|
||||||
{
|
|
||||||
slim.Wait();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fs.Seek(0, SeekOrigin.Begin);
|
|
||||||
string text = reader.ReadToEnd();
|
|
||||||
if (string.IsNullOrWhiteSpace(text))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
JsonDic = text.DeJson<Dictionary<string, Dictionary<string, object>>>();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Logger.Instance.Error(ex);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
slim.Release();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void ReadJson()
|
|
||||||
{
|
|
||||||
if (JsonDic.TryGetValue("Client", out Dictionary<string, object> elClient))
|
|
||||||
{
|
|
||||||
Client = elClient.ToJson().DeJson<ConfigClientInfo>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (JsonDic.TryGetValue("Server", out Dictionary<string, object> elServer))
|
|
||||||
{
|
|
||||||
Server = elServer.ToJson().DeJson<ConfigServerInfo>();
|
|
||||||
}
|
|
||||||
if (JsonDic.TryGetValue("Common", out Dictionary<string, object> elCommon))
|
|
||||||
{
|
|
||||||
Common = elCommon.ToJson().DeJson<ConfigCommonInfo>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Save()
|
|
||||||
{
|
|
||||||
slim.Wait();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
JsonDic["Client"] = Client.ToJson().DeJson<Dictionary<string, object>>();
|
|
||||||
JsonDic["Server"] = Server.ToJson().DeJson<Dictionary<string, object>>();
|
|
||||||
JsonDic["Common"] = Common.ToJson().DeJson<Dictionary<string, object>>();
|
|
||||||
|
|
||||||
fs.Seek(0, SeekOrigin.Begin);
|
|
||||||
fs.SetLength(0);
|
|
||||||
writer.Write(JsonDic.ToJsonFormat());
|
|
||||||
writer.Flush();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Logger.Instance.Error(ex);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
slim.Release();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed partial class ConfigCommonInfo
|
|
||||||
{
|
|
||||||
public string[] Modes { get; set; } = new string[] { "client", "server" };
|
|
||||||
public bool BlueProtect { get; set; }
|
|
||||||
}
|
|
||||||
public sealed partial class ConfigClientInfo
|
|
||||||
{
|
|
||||||
private string server = new IPEndPoint(IPAddress.Loopback, 1802).ToString();
|
|
||||||
public string Server
|
|
||||||
{
|
|
||||||
get => server; set
|
|
||||||
{
|
|
||||||
server = value;
|
|
||||||
if (string.IsNullOrWhiteSpace(server) == false)
|
|
||||||
{
|
|
||||||
string[] arr = server.Split(':');
|
|
||||||
int port = arr.Length == 2 ? int.Parse(arr[1]) : 1802;
|
|
||||||
IPAddress ip = NetworkHelper.GetDomainIp(arr[0]);
|
|
||||||
ServerEP = new IPEndPoint(ip, port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public IPEndPoint ServerEP { get; set; } = new IPEndPoint(IPAddress.Loopback, 1802);
|
|
||||||
|
|
||||||
private string name = Dns.GetHostName().SubStr(0, 12);
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get => name; set
|
|
||||||
{
|
|
||||||
name = value.SubStr(0, 12);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string ShareMemoryKey { get; set; } = "cmonitor/share";
|
|
||||||
public int ShareMemoryCount { get; set; } = 100;
|
|
||||||
public int ShareMemorySize { get; set; } = 1024;
|
|
||||||
|
|
||||||
}
|
|
||||||
public sealed partial class ConfigServerInfo
|
|
||||||
{
|
|
||||||
public int WebPort { get; set; } = 1800;
|
|
||||||
public string WebRoot { get; set; } = "./web/";
|
|
||||||
public int ApiPort { get; set; } = 1801;
|
|
||||||
public int ServicePort { get; set; } = 1802;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace cmonitor.install.win
|
|
||||||
{
|
|
||||||
public sealed class ViewerConfigInfo
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed partial class ConfigClientInfo
|
|
||||||
{
|
|
||||||
public ViewerConfigInfo Viewer { get; set; } = new ViewerConfigInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed partial class ConfigServerInfo
|
|
||||||
{
|
|
||||||
public ViewerConfigInfo Viewer { get; set; } = new ViewerConfigInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
248
cmonitor.install.win/MainForm.Designer.cs
generated
248
cmonitor.install.win/MainForm.Designer.cs
generated
@@ -1,248 +0,0 @@
|
|||||||
namespace cmonitor.install.win
|
|
||||||
{
|
|
||||||
partial class MainForm
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
|
||||||
serverIP = new TextBox();
|
|
||||||
label1 = new Label();
|
|
||||||
label2 = new Label();
|
|
||||||
serverPort = new TextBox();
|
|
||||||
label3 = new Label();
|
|
||||||
webPort = new TextBox();
|
|
||||||
label4 = new Label();
|
|
||||||
apiPort = new TextBox();
|
|
||||||
modeClient = new CheckBox();
|
|
||||||
modeServer = new CheckBox();
|
|
||||||
label5 = new Label();
|
|
||||||
shareLen = new TextBox();
|
|
||||||
label6 = new Label();
|
|
||||||
shareKey = new TextBox();
|
|
||||||
label11 = new Label();
|
|
||||||
machineName = new TextBox();
|
|
||||||
installBtn = new Button();
|
|
||||||
runBtn = new Button();
|
|
||||||
checkStateBtn = new Button();
|
|
||||||
label16 = new Label();
|
|
||||||
shareItemLen = new TextBox();
|
|
||||||
gbClient = new GroupBox();
|
|
||||||
gbServer = new GroupBox();
|
|
||||||
gbClient.SuspendLayout();
|
|
||||||
gbServer.SuspendLayout();
|
|
||||||
SuspendLayout();
|
|
||||||
//
|
|
||||||
// serverIP
|
|
||||||
//
|
|
||||||
resources.ApplyResources(serverIP, "serverIP");
|
|
||||||
serverIP.Name = "serverIP";
|
|
||||||
//
|
|
||||||
// label1
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label1, "label1");
|
|
||||||
label1.Name = "label1";
|
|
||||||
//
|
|
||||||
// label2
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label2, "label2");
|
|
||||||
label2.Name = "label2";
|
|
||||||
//
|
|
||||||
// serverPort
|
|
||||||
//
|
|
||||||
resources.ApplyResources(serverPort, "serverPort");
|
|
||||||
serverPort.Name = "serverPort";
|
|
||||||
//
|
|
||||||
// label3
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label3, "label3");
|
|
||||||
label3.Name = "label3";
|
|
||||||
//
|
|
||||||
// webPort
|
|
||||||
//
|
|
||||||
resources.ApplyResources(webPort, "webPort");
|
|
||||||
webPort.Name = "webPort";
|
|
||||||
//
|
|
||||||
// label4
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label4, "label4");
|
|
||||||
label4.Name = "label4";
|
|
||||||
//
|
|
||||||
// apiPort
|
|
||||||
//
|
|
||||||
resources.ApplyResources(apiPort, "apiPort");
|
|
||||||
apiPort.Name = "apiPort";
|
|
||||||
//
|
|
||||||
// modeClient
|
|
||||||
//
|
|
||||||
resources.ApplyResources(modeClient, "modeClient");
|
|
||||||
modeClient.Name = "modeClient";
|
|
||||||
modeClient.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// modeServer
|
|
||||||
//
|
|
||||||
resources.ApplyResources(modeServer, "modeServer");
|
|
||||||
modeServer.Name = "modeServer";
|
|
||||||
modeServer.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// label5
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label5, "label5");
|
|
||||||
label5.Name = "label5";
|
|
||||||
//
|
|
||||||
// shareLen
|
|
||||||
//
|
|
||||||
resources.ApplyResources(shareLen, "shareLen");
|
|
||||||
shareLen.Name = "shareLen";
|
|
||||||
//
|
|
||||||
// label6
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label6, "label6");
|
|
||||||
label6.Name = "label6";
|
|
||||||
//
|
|
||||||
// shareKey
|
|
||||||
//
|
|
||||||
resources.ApplyResources(shareKey, "shareKey");
|
|
||||||
shareKey.Name = "shareKey";
|
|
||||||
//
|
|
||||||
// label11
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label11, "label11");
|
|
||||||
label11.Name = "label11";
|
|
||||||
//
|
|
||||||
// machineName
|
|
||||||
//
|
|
||||||
resources.ApplyResources(machineName, "machineName");
|
|
||||||
machineName.Name = "machineName";
|
|
||||||
//
|
|
||||||
// installBtn
|
|
||||||
//
|
|
||||||
resources.ApplyResources(installBtn, "installBtn");
|
|
||||||
installBtn.Name = "installBtn";
|
|
||||||
installBtn.UseVisualStyleBackColor = true;
|
|
||||||
installBtn.Click += OnInstallClick;
|
|
||||||
//
|
|
||||||
// runBtn
|
|
||||||
//
|
|
||||||
resources.ApplyResources(runBtn, "runBtn");
|
|
||||||
runBtn.Name = "runBtn";
|
|
||||||
runBtn.UseVisualStyleBackColor = true;
|
|
||||||
runBtn.Click += RunClick;
|
|
||||||
//
|
|
||||||
// checkStateBtn
|
|
||||||
//
|
|
||||||
resources.ApplyResources(checkStateBtn, "checkStateBtn");
|
|
||||||
checkStateBtn.Name = "checkStateBtn";
|
|
||||||
checkStateBtn.UseVisualStyleBackColor = true;
|
|
||||||
checkStateBtn.Click += checkStateBtn_Click;
|
|
||||||
//
|
|
||||||
// label16
|
|
||||||
//
|
|
||||||
resources.ApplyResources(label16, "label16");
|
|
||||||
label16.Name = "label16";
|
|
||||||
//
|
|
||||||
// shareItemLen
|
|
||||||
//
|
|
||||||
resources.ApplyResources(shareItemLen, "shareItemLen");
|
|
||||||
shareItemLen.Name = "shareItemLen";
|
|
||||||
//
|
|
||||||
// gbClient
|
|
||||||
//
|
|
||||||
resources.ApplyResources(gbClient, "gbClient");
|
|
||||||
gbClient.Controls.Add(machineName);
|
|
||||||
gbClient.Controls.Add(label16);
|
|
||||||
gbClient.Controls.Add(serverIP);
|
|
||||||
gbClient.Controls.Add(shareItemLen);
|
|
||||||
gbClient.Controls.Add(label1);
|
|
||||||
gbClient.Controls.Add(label11);
|
|
||||||
gbClient.Controls.Add(shareLen);
|
|
||||||
gbClient.Controls.Add(shareKey);
|
|
||||||
gbClient.Controls.Add(label5);
|
|
||||||
gbClient.Controls.Add(label6);
|
|
||||||
gbClient.Name = "gbClient";
|
|
||||||
gbClient.TabStop = false;
|
|
||||||
//
|
|
||||||
// gbServer
|
|
||||||
//
|
|
||||||
resources.ApplyResources(gbServer, "gbServer");
|
|
||||||
gbServer.Controls.Add(apiPort);
|
|
||||||
gbServer.Controls.Add(serverPort);
|
|
||||||
gbServer.Controls.Add(label2);
|
|
||||||
gbServer.Controls.Add(label4);
|
|
||||||
gbServer.Controls.Add(webPort);
|
|
||||||
gbServer.Controls.Add(label3);
|
|
||||||
gbServer.Name = "gbServer";
|
|
||||||
gbServer.TabStop = false;
|
|
||||||
//
|
|
||||||
// MainForm
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this, "$this");
|
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
|
||||||
Controls.Add(gbServer);
|
|
||||||
Controls.Add(gbClient);
|
|
||||||
Controls.Add(checkStateBtn);
|
|
||||||
Controls.Add(runBtn);
|
|
||||||
Controls.Add(installBtn);
|
|
||||||
Controls.Add(modeServer);
|
|
||||||
Controls.Add(modeClient);
|
|
||||||
Name = "MainForm";
|
|
||||||
Load += OnLoad;
|
|
||||||
gbClient.ResumeLayout(false);
|
|
||||||
gbClient.PerformLayout();
|
|
||||||
gbServer.ResumeLayout(false);
|
|
||||||
gbServer.PerformLayout();
|
|
||||||
ResumeLayout(false);
|
|
||||||
PerformLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
private System.Windows.Forms.TextBox serverIP;
|
|
||||||
private System.Windows.Forms.Label label1;
|
|
||||||
private System.Windows.Forms.Label label2;
|
|
||||||
private System.Windows.Forms.TextBox serverPort;
|
|
||||||
private System.Windows.Forms.Label label3;
|
|
||||||
private System.Windows.Forms.TextBox webPort;
|
|
||||||
private System.Windows.Forms.Label label4;
|
|
||||||
private System.Windows.Forms.TextBox apiPort;
|
|
||||||
private System.Windows.Forms.CheckBox modeClient;
|
|
||||||
private System.Windows.Forms.CheckBox modeServer;
|
|
||||||
private System.Windows.Forms.Label label5;
|
|
||||||
private System.Windows.Forms.TextBox shareLen;
|
|
||||||
private System.Windows.Forms.Label label6;
|
|
||||||
private System.Windows.Forms.TextBox shareKey;
|
|
||||||
private System.Windows.Forms.Label label11;
|
|
||||||
private System.Windows.Forms.TextBox machineName;
|
|
||||||
private System.Windows.Forms.Button installBtn;
|
|
||||||
private System.Windows.Forms.Button runBtn;
|
|
||||||
private System.Windows.Forms.Button checkStateBtn;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private Label label16;
|
|
||||||
private TextBox shareItemLen;
|
|
||||||
private GroupBox gbClient;
|
|
||||||
private GroupBox gbServer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,304 +0,0 @@
|
|||||||
using common.libs;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace cmonitor.install.win
|
|
||||||
{
|
|
||||||
public partial class MainForm : Form
|
|
||||||
{
|
|
||||||
|
|
||||||
Config config = new Config();
|
|
||||||
public MainForm()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnLoad(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
LoadConfig();
|
|
||||||
SaveConfig();
|
|
||||||
|
|
||||||
CheckInstall();
|
|
||||||
CheckRunning();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveConfig()
|
|
||||||
{
|
|
||||||
config.Save();
|
|
||||||
|
|
||||||
}
|
|
||||||
private void LoadConfig()
|
|
||||||
{
|
|
||||||
modeClient.Checked = config.Common.Modes.Contains("client");
|
|
||||||
modeServer.Checked = config.Common.Modes.Contains("server");
|
|
||||||
|
|
||||||
machineName.Text = config.Client.Name;
|
|
||||||
serverIP.Text = config.Client.Server;
|
|
||||||
|
|
||||||
shareKey.Text = config.Client.ShareMemoryKey;
|
|
||||||
shareLen.Text = config.Client.ShareMemoryCount.ToString();
|
|
||||||
shareItemLen.Text = config.Client.ShareMemorySize.ToString();
|
|
||||||
|
|
||||||
serverPort.Text = config.Server.ServicePort.ToString();
|
|
||||||
apiPort.Text = config.Server.ApiPort.ToString();
|
|
||||||
webPort.Text = config.Server.WebPort.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool loading = false;
|
|
||||||
private bool installed = false;
|
|
||||||
private bool running = false;
|
|
||||||
private string serviceName = "cmonitor.sas.service";
|
|
||||||
private string exeName = "cmonitor.sas.service.exe";
|
|
||||||
private void OnInstallClick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (loading)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool result = CheckMode();
|
|
||||||
if (result == false) return;
|
|
||||||
result = CheckIPAndPort();
|
|
||||||
if (result == false) return;
|
|
||||||
result = CheckShare();
|
|
||||||
if (result == false) return;
|
|
||||||
|
|
||||||
CheckLoading(true);
|
|
||||||
SaveConfig();
|
|
||||||
|
|
||||||
string filename = Process.GetCurrentProcess().MainModule.FileName;
|
|
||||||
string dir = Path.GetDirectoryName(filename);
|
|
||||||
string sasPath = Path.Combine(dir, exeName);
|
|
||||||
|
|
||||||
string sasIndexStr = "4";
|
|
||||||
|
|
||||||
string shareKeyStr = shareKey.Text;
|
|
||||||
string shareLenStr = shareLen.Text;
|
|
||||||
string shareItemLenStr = shareItemLen.Text;
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
if (installed == false)
|
|
||||||
{
|
|
||||||
string taskStr = $"sc create \"{serviceName}\" binpath= \"{sasPath} {shareKeyStr} {shareLenStr} {shareItemLenStr} {sasIndexStr} \" start= AUTO";
|
|
||||||
CommandHelper.Windows(string.Empty, new string[] {
|
|
||||||
taskStr,
|
|
||||||
$"net start {serviceName}",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while (running)
|
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
await Task.Delay(1000);
|
|
||||||
CheckRunning();
|
|
||||||
}
|
|
||||||
string resultStr = CommandHelper.Windows(string.Empty, new string[] {
|
|
||||||
"schtasks /delete /TN \"cmonitorService\" /f",
|
|
||||||
$"net stop {serviceName}",
|
|
||||||
$"sc delete {serviceName}",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckLoading(false);
|
|
||||||
CheckInstall();
|
|
||||||
CheckRunning();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool CheckMode()
|
|
||||||
{
|
|
||||||
if (modeClient.Checked == false && modeServer.Checked == false)
|
|
||||||
{
|
|
||||||
MessageBox.Show("客户端和服务端必须选择一样!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(machineName.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("机器名必填!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
config.Client.Name = machineName.Text;
|
|
||||||
|
|
||||||
List<string> modeStr = new List<string>();
|
|
||||||
if (modeClient.Checked)
|
|
||||||
{
|
|
||||||
modeStr.Add("client");
|
|
||||||
}
|
|
||||||
if (modeServer.Checked)
|
|
||||||
{
|
|
||||||
modeStr.Add("server");
|
|
||||||
}
|
|
||||||
config.Common.Modes = modeStr.ToArray();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
private bool CheckIPAndPort()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(serverIP.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("服务器ip必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(serverPort.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("服务器端口必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(apiPort.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("管理端口必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(webPort.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("web端口必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
config.Client.Server = serverIP.Text;
|
|
||||||
config.Server.WebPort = int.Parse(webPort.Text);
|
|
||||||
config.Server.ApiPort = int.Parse(apiPort.Text);
|
|
||||||
config.Server.ServicePort = int.Parse(serverPort.Text);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool CheckShare()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(shareKey.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("共享数据键必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(shareLen.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("共享数量必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrWhiteSpace(shareItemLen.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show("共享每项数据长度必填");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
config.Client.ShareMemoryKey = shareKey.Text;
|
|
||||||
config.Client.ShareMemoryCount = int.Parse(shareLen.Text);
|
|
||||||
config.Client.ShareMemorySize = int.Parse(shareItemLen.Text);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckLoading(bool state)
|
|
||||||
{
|
|
||||||
loading = state;
|
|
||||||
this.Invoke(new EventHandler(delegate
|
|
||||||
{
|
|
||||||
if (loading)
|
|
||||||
{
|
|
||||||
installBtn.Text = "操作中..";
|
|
||||||
runBtn.Text = "操作中..";
|
|
||||||
checkStateBtn.Text = "操作中..";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
checkStateBtn.Text = "检查状态";
|
|
||||||
if (installed)
|
|
||||||
{
|
|
||||||
installBtn.ForeColor = Color.Red;
|
|
||||||
installBtn.Text = "解除自启动";
|
|
||||||
runBtn.Enabled = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
installBtn.ForeColor = Color.Black;
|
|
||||||
installBtn.Text = "安装自启动";
|
|
||||||
runBtn.Enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (running)
|
|
||||||
{
|
|
||||||
runBtn.ForeColor = Color.Red;
|
|
||||||
runBtn.Text = "停止运行";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
runBtn.ForeColor = Color.Black;
|
|
||||||
runBtn.Text = "启动";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
private void CheckInstall()
|
|
||||||
{
|
|
||||||
Task.Run(() =>
|
|
||||||
{
|
|
||||||
string result = CommandHelper.Windows(string.Empty, new string[] { $"sc query {serviceName}" });
|
|
||||||
installed = result.Contains($"SERVICE_NAME: {serviceName}");
|
|
||||||
CheckLoading(loading);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RunClick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (loading) return;
|
|
||||||
|
|
||||||
CheckLoading(true);
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
if (running)
|
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
while (running)
|
|
||||||
{
|
|
||||||
CheckRunning();
|
|
||||||
await Task.Delay(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Run();
|
|
||||||
for (int i = 0; i < 15 && running == false; i++)
|
|
||||||
{
|
|
||||||
CheckRunning();
|
|
||||||
await Task.Delay(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CheckLoading(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
private void Run()
|
|
||||||
{
|
|
||||||
CommandHelper.Windows(string.Empty, new string[] {
|
|
||||||
"schtasks /run /I /TN \"cmonitorService\"",
|
|
||||||
$"net stop {serviceName}",
|
|
||||||
$"net start {serviceName}",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
private void Stop()
|
|
||||||
{
|
|
||||||
CommandHelper.Windows(string.Empty, new string[] { $"net stop \"{serviceName}\"", });
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckRunning()
|
|
||||||
{
|
|
||||||
Task.Run(() =>
|
|
||||||
{
|
|
||||||
string result = CommandHelper.Windows(string.Empty, new string[] { $"sc query {serviceName}" });
|
|
||||||
running = result.Contains(": 4 RUNNING");
|
|
||||||
CheckLoading(loading);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkStateBtn_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (loading) return;
|
|
||||||
|
|
||||||
CheckLoading(loading);
|
|
||||||
CheckInstall();
|
|
||||||
CheckRunning();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,638 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="serverIP.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>186, 95</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="serverIP.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="serverIP.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>34, 100</value>
|
|
||||||
</data>
|
|
||||||
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>134, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="label1.Text" xml:space="preserve">
|
|
||||||
<value>服务端地址</value>
|
|
||||||
</data>
|
|
||||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>34, 146</value>
|
|
||||||
</data>
|
|
||||||
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="label2.Text" xml:space="preserve">
|
|
||||||
<value>服务端口</value>
|
|
||||||
</data>
|
|
||||||
<data name="serverPort.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>158, 140</value>
|
|
||||||
</data>
|
|
||||||
<data name="serverPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="serverPort.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>34, 51</value>
|
|
||||||
</data>
|
|
||||||
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="webPort.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>158, 44</value>
|
|
||||||
</data>
|
|
||||||
<data name="webPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="webPort.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>34, 98</value>
|
|
||||||
</data>
|
|
||||||
<data name="label4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="label4.Text" xml:space="preserve">
|
|
||||||
<value>管理端口</value>
|
|
||||||
</data>
|
|
||||||
<data name="apiPort.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>158, 93</value>
|
|
||||||
</data>
|
|
||||||
<data name="apiPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="apiPort.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeClient.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>210, 39</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeClient.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeClient.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>118, 35</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeServer.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>596, 39</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeServer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="modeServer.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>118, 35</value>
|
|
||||||
</data>
|
|
||||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>38, 274</value>
|
|
||||||
</data>
|
|
||||||
<data name="label5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>110, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareLen.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>186, 268</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareLen.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareLen.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>28, 226</value>
|
|
||||||
</data>
|
|
||||||
<data name="label6.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>134, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareKey.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>186, 219</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareKey.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="label11.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>52, 53</value>
|
|
||||||
</data>
|
|
||||||
<data name="label11.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>86, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="machineName.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>186, 46</value>
|
|
||||||
</data>
|
|
||||||
<data name="machineName.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="machineName.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="installBtn.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>350, 502</value>
|
|
||||||
</data>
|
|
||||||
<data name="installBtn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="installBtn.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>162, 64</value>
|
|
||||||
</data>
|
|
||||||
<data name="runBtn.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>176, 502</value>
|
|
||||||
</data>
|
|
||||||
<data name="runBtn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="runBtn.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>162, 64</value>
|
|
||||||
</data>
|
|
||||||
<data name="checkStateBtn.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>610, 513</value>
|
|
||||||
</data>
|
|
||||||
<data name="checkStateBtn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="checkStateBtn.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>150, 42</value>
|
|
||||||
</data>
|
|
||||||
<data name="label16.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>14, 326</value>
|
|
||||||
</data>
|
|
||||||
<data name="label16.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 0, 6, 0</value>
|
|
||||||
</data>
|
|
||||||
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>158, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareItemLen.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>186, 321</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareItemLen.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="shareItemLen.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 38</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbClient.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>24, 88</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbClient.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbClient.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbClient.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>400, 387</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbClient.Text" xml:space="preserve">
|
|
||||||
<value>客户端参数</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbServer.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>438, 90</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbServer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbServer.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbServer.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>374, 385</value>
|
|
||||||
</data>
|
|
||||||
<data name="gbServer.Text" xml:space="preserve">
|
|
||||||
<value>服务端参数</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
|
||||||
<value>14, 31</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>836, 601</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
AAABAAEAAAAAAAEAIABdQAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAQCRJ
|
|
||||||
REFUeNrtnXd8XMW5sJ/ZIq16lyzZsi1Z7sYFY9xxwwUINU7hkpBCQsKFG0joBGKZllySmwspBEJyk5BQ
|
|
||||||
EhIwfDHYuGKMK+7dlmXZkmVZVu9b5/tjJFuWzqrualfSPP6dn9Y7Z8+Zc3bnPe+88xbQaDQajUbT/xCB
|
|
||||||
7oDGx2RffCUu/pXN3hOAvNjatI+8+J5s/P+lVnlxn8uPr+kDaAEQzGQ3/hWEAjYkNiAMsDVuUQgSkEQD
|
|
||||||
4Y1bWIvXoUBI42YBrI1/QxpfAzgBB+BqfO1q/L8DsAP1QF3j1vx1FYJSJNVAQ2NbA9CAiQbM2JHAk4G+
|
|
||||||
kRpvaAEQKLIvvjIhMWPGCsTiIRlIBlIa/yYDiUA8ENtsi0MNcAGYGo8lmm3+QDbbADyNr+uBcqCi2VYG
|
|
||||||
lADFwHkExUiKMVGMoAInTkJwk4yHSuDhQH0R/RstAHqKZwCw4iYeSAASEAxCMgIYDmRxaVA3bTbAHOiu
|
|
||||||
dxM3l7SDpq0MyUkEJ4DjSAqAEkyUYqIccPJUoLvdP9ACwNc8i7qrLqxIwoAkYDQwBhgFDAEGAmlAJPo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
|
|
||||||
kiOSL67hm4QJm8XG8IThXD3was5Wn+XIhSO+uXABDa4GtuZvJa8ij+HxwxkQOcCr/0BaVBrD4oaxo3AH
|
|
||||||
pXWlWgh0jwjgfaCouxrALcDN7e6rMUbCDSNu4KcLfsqAyAFedyupK+G5Tc/xiy2/oLy+3Kc/fovZwiMz
|
|
||||||
H+E7k77TpmdhfFg8wxOG8+mZT7lQe8FnfZBIjlw4wtazWxmTPIYhMUMMhYBJmBgcO5iEsAR2FO6guqFa
|
|
||||||
C4GuYwb2Abu6JgCyAXX77wGuCvTV9EokLM5azK+v/zXD4od53e1s9VkeW/sYf977Z98viXlgxuAZPDv/
|
|
||||||
Wa8qeHMGRA7A5XGx6uQq394LAedrzrOzcCcJEQkMTxhuaBcwCzOjk0YTExrDxryNONwOLQS6hhkoBv4f
|
|
||||||
c8GbEPAuAOYBgjTgP9Hef51HwqikUby45EXGp4z3utuZyjP8cNUPeevAW7ikf/zkbxtzG18a86UO7y+E
|
|
||||||
4MMTH1Jt9/ETWMCFugt8fvZzYkJjGJs81qsQGJs8lip7FbvO7cItfVgOt3/RgOBDBDXeBIB3fVAtD2UB
|
|
||||||
WYG+il6HhPCQcB6e8TDTBk3zutu56nPcs/Ie/nX4X357ytmsNkYljOrUZ5IjkhkYNdBvt+d05Wme2/wc
|
|
||||||
7xx+x6vB0Wax8eD0B7ku6zqdubjrDEMyrK37ZywAltN000cByYG+it6GEIJ7rrqHr477qtd9SutL+enm
|
|
||||||
n7ImZ41fVVynx0mFvaJTn/FIj9+fuqcrTvPspmf5+OTHXvdJjUrlidlPkBWfpYVA10gBRiHBm1uwsQBQ
|
|
||||||
eedC0K6/nUfCNUOu4b6r7yPcahw1Xeus5eef/Zw/7P4DTun0a3fcLjfHSo6puXQHKasvo7C60O+36njJ
|
|
||||||
cR5d+yifnvnU6z5T0qbw+OzHiQmL0UKga0xEEOLt3rUVlGkDxqPpFEkRSTw661GGxg41bHd5XLy0/SVe
|
|
||||||
2v7Spay6fuZI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CmWdR35Cb0MbphI1LmoENtRSZgMqIFN64hbV4HYZK
|
|
||||||
nGpF2SCsLTZQJasdqLm3s/Gvo3GzowZ4XePW/HUVglIk1ainfNOTvgETDZixI4EnA30jNd7QAqCvkX3x
|
|
||||||
lbj4VzZ7T6Ce2eKyfeTF92Tj/y+1yov7XH58jUaj0Wg0Gk2v5P8D5M/bzdE8cNIAAAAASUVORK5CYII=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
|
||||||
<value>6, 5, 6, 5</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
namespace cmonitor.install.win
|
|
||||||
{
|
|
||||||
internal static class Program
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The main entry point for the application.
|
|
||||||
/// </summary>
|
|
||||||
[STAThread]
|
|
||||||
static void Main()
|
|
||||||
{
|
|
||||||
Mutex mutex = new Mutex(true, System.Diagnostics.Process.GetCurrentProcess().ProcessName, out bool isAppRunning);
|
|
||||||
if (isAppRunning == false)
|
|
||||||
{
|
|
||||||
Environment.Exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += (a, b) =>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
// To customize application configuration such as set high DPI settings or default font,
|
|
||||||
// see https://aka.ms/applicationconfiguration.
|
|
||||||
ApplicationConfiguration.Initialize();
|
|
||||||
Application.Run(new MainForm());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
|
||||||
-->
|
|
||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Any CPU</Platform>
|
|
||||||
<PublishDir>bin\Release\net7.0-windows\publish\win-x64\</PublishDir>
|
|
||||||
<PublishProtocol>FileSystem</PublishProtocol>
|
|
||||||
<_TargetId>Folder</_TargetId>
|
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
||||||
<SelfContained>true</SelfContained>
|
|
||||||
<PublishSingleFile>true</PublishSingleFile>
|
|
||||||
<PublishReadyToRun>false</PublishReadyToRun>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
|
||||||
-->
|
|
||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<History>True|2024-01-15T07:11:18.1268938Z;True|2024-01-15T15:08:01.2098368+08:00;True|2024-01-15T15:06:39.4979669+08:00;True|2024-01-15T15:00:07.0902803+08:00;</History>
|
|
||||||
<LastFailureDetails />
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<!-- UAC 清单选项
|
|
||||||
如果想要更改 Windows 用户帐户控制级别,请使用
|
|
||||||
以下节点之一替换 requestedExecutionLevel 节点。
|
|
||||||
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
|
||||||
|
|
||||||
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
|
||||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
|
||||||
元素。
|
|
||||||
-->
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
|
||||||
Windows 版本的列表。取消评论适当的元素,
|
|
||||||
Windows 将自动选择最兼容的环境。 -->
|
|
||||||
|
|
||||||
<!-- Windows Vista -->
|
|
||||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
|
||||||
|
|
||||||
<!-- Windows 7 -->
|
|
||||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
|
||||||
|
|
||||||
<!-- Windows 8 -->
|
|
||||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
|
||||||
|
|
||||||
<!-- Windows 8.1 -->
|
|
||||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
|
||||||
|
|
||||||
<!-- Windows 10 -->
|
|
||||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
|
||||||
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
|
|
||||||
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
|
||||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
|
||||||
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
|
||||||
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
|
|
||||||
|
|
||||||
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
|
||||||
<!--
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<windowsSettings>
|
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
|
||||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
|
||||||
</windowsSettings>
|
|
||||||
</application>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity
|
|
||||||
type="win32"
|
|
||||||
name="Microsoft.Windows.Common-Controls"
|
|
||||||
version="6.0.0.0"
|
|
||||||
processorArchitecture="*"
|
|
||||||
publicKeyToken="6595b64144ccf1df"
|
|
||||||
language="*"
|
|
||||||
/>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</assembly>
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<TargetFrameworks>net7.0-windows;net8.0-windows</TargetFrameworks>
|
|
||||||
<Nullable>disable</Nullable>
|
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
|
||||||
<Configurations>Debug;Release</Configurations>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows|AnyCPU'">
|
|
||||||
<DebugType>embedded</DebugType>
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows|AnyCPU'">
|
|
||||||
<DebugType>embedded</DebugType>
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows|AnyCPU'">
|
|
||||||
<DebugType>embedded</DebugType>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows|AnyCPU'">
|
|
||||||
<DebugType>embedded</DebugType>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="favicon.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\common.libs\common.libs.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<_LastSelectedProfileId>D:\desktop\cmonitor\cmonitor.install.win\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="MainForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
25
cmonitor.install.win/configs/config.json
Normal file
25
cmonitor.install.win/configs/config.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"Client":{
|
||||||
|
"ApiPassword":"snltty",
|
||||||
|
"ApiPort":1803,
|
||||||
|
"GroupId":"snltty",
|
||||||
|
"Name":"DESKTOP-1111",
|
||||||
|
"Server":"127.0.0.1:1802",
|
||||||
|
"ShareMemoryCount":100,
|
||||||
|
"ShareMemoryKey":"cmonitor/share",
|
||||||
|
"ShareMemorySize":1024,
|
||||||
|
"WebPort":1804
|
||||||
|
},
|
||||||
|
"Common":{
|
||||||
|
"Modes":[
|
||||||
|
"client",
|
||||||
|
"server"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Server":{
|
||||||
|
"ApiPassword":"snltty",
|
||||||
|
"ApiPort":1801,
|
||||||
|
"ServicePort":1802,
|
||||||
|
"WebPort":1800
|
||||||
|
}
|
||||||
|
}
|
||||||
9
cmonitor.install.win/default.aproj
Normal file
9
cmonitor.install.win/default.aproj
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project ver="10" name="cmonitor.install.win" libEmbed="true" icon="..\cmonitor\favicon.ico" ui="win" output="cmonitor.install.win.exe" CompanyName="单位名称" FileDescription="cmonitor.install.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="cmonitor.install.win" InternalName="cmonitor.install.win" FileVersion="0.0.0.03" ProductVersion="0.0.0.03" publishDir="/dist/" dstrip="false" local="false" ignored="false">
|
||||||
|
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
|
||||||
|
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
|
||||||
|
<file name="favicon.ico" path="res\favicon.ico" comment="res\favicon.ico"/>
|
||||||
|
<file name="favicon1.ico" path="res\favicon1.ico" comment="res\favicon1.ico"/>
|
||||||
|
</folder>
|
||||||
|
<folder name="窗体文件" path="dlg" comment="目录" embed="true" local="false" ignored="false"/>
|
||||||
|
</project>
|
||||||
BIN
cmonitor.install.win/dist/cmonitor.install.win.exe
vendored
Normal file
BIN
cmonitor.install.win/dist/cmonitor.install.win.exe
vendored
Normal file
Binary file not shown.
17
cmonitor.install.win/lib/config.aardio
Normal file
17
cmonitor.install.win/lib/config.aardio
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//config 配置文件
|
||||||
|
import fsys.config;
|
||||||
|
config = fsys.config("/config/");
|
||||||
|
//config = fsys.config( io.appData("/软件作者/应用程序名/") );
|
||||||
|
|
||||||
|
//不需要序列化的配置名字前请添加下划线
|
||||||
|
namespace config {
|
||||||
|
__appName = "应用程序名";
|
||||||
|
__website = "http://www.aardio.com/";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**intellisense(config)
|
||||||
|
__appName = 应用程序名
|
||||||
|
__website = 官方网站
|
||||||
|
saveAll() = 写入所有配置到文件
|
||||||
|
? = 获取值时指定不以下划线开始的配置表名称,\n返回一个可自动序列化到同名配置文件的表对象。\n如果此对象名以下划线开始,则可以正常读写值不会序列化为配置文件。\n否则不能对此对象直接赋值,只能对配置表对象的成员赋值。\n\n配置表可自动自文件加载,退出线程前自动序列化并存入文件。\n仅序列化以字符串、数值为键的元素,\n仅序列化值为字符串、数值、buffer 以及定义了 _serialize 元方法的成员。\n循环引用的值转换为 null,序列化时忽略成员函数\n!fsys_table.
|
||||||
|
end intellisense**/
|
||||||
333
cmonitor.install.win/main.aardio
Normal file
333
cmonitor.install.win/main.aardio
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
import win.ui;
|
||||||
|
/*DSG{{*/
|
||||||
|
mainForm = win.form(text="cmonitor.install.win";right=403;bottom=395;max=false)
|
||||||
|
mainForm.add(
|
||||||
|
btnCheck={cls="button";text="检查安装";left=324;top=351;right=393;bottom=374;z=4};
|
||||||
|
btnHidePassword={cls="button";text="隐藏密码";left=321;top=201;right=382;bottom=224;z=34};
|
||||||
|
btnInstall={cls="button";text="安装";left=129;top=349;right=189;bottom=379;z=6};
|
||||||
|
btnRun={cls="button";text="运行";left=205;top=349;right=265;bottom=379;z=14};
|
||||||
|
btnSaveConfig={cls="button";text="保存";left=210;top=202;right=248;bottom=225;z=35};
|
||||||
|
btnShowPassword={cls="button";text="显示密码";left=255;top=202;right=316;bottom=225;z=33};
|
||||||
|
cbClient={cls="checkbox";text="客户端";left=72;top=17;right=133;bottom=36;tabstop=1;z=19};
|
||||||
|
cbService={cls="checkbox";text="服务端";left=262;top=17;right=327;bottom=35;tabstop=1;z=20};
|
||||||
|
editApiClientPassword={cls="edit";left=74;top=199;right=174;bottom=221;edge=1;password=1;tabstop=1;z=25};
|
||||||
|
editApiClientPort={cls="edit";left=74;top=168;right=174;bottom=190;edge=1;tabstop=1;z=24};
|
||||||
|
editApiPassword={cls="edit";left=273;top=135;right=373;bottom=157;edge=1;password=1;tabstop=1;z=28};
|
||||||
|
editApiPort={cls="edit";left=273;top=105;right=373;bottom=127;edge=1;tabstop=1;z=27};
|
||||||
|
editMachineName={cls="edit";left=74;top=75;right=174;bottom=97;edge=1;tabstop=1;z=21};
|
||||||
|
editServer={cls="edit";left=74;top=105;right=174;bottom=127;edge=1;tabstop=1;z=22};
|
||||||
|
editServicePort={cls="edit";left=273;top=168;right=373;bottom=190;edge=1;tabstop=1;z=29};
|
||||||
|
editShareKey={cls="edit";left=72;top=271;right=172;bottom=290;edge=1;tabstop=1;z=30};
|
||||||
|
editShareLength={cls="edit";left=72;top=297;right=172;bottom=319;edge=1;tabstop=1;z=31};
|
||||||
|
editShareSize={cls="edit";left=273;top=295;right=373;bottom=317;edge=1;tabstop=1;z=32};
|
||||||
|
editWebClientPort={cls="edit";left=74;top=136;right=174;bottom=158;edge=1;tabstop=1;z=23};
|
||||||
|
editWebPort={cls="edit";left=273;top=75;right=373;bottom=97;edge=1;tabstop=1;z=26};
|
||||||
|
groupbox={cls="groupbox";text="客户端参数";left=13;top=44;right=196;bottom=236;edge=1;z=9};
|
||||||
|
groupbox2={cls="groupbox";text="服务端参数";left=200;top=46;right=393;bottom=236;edge=1;z=8};
|
||||||
|
groupbox3={cls="groupbox";text="共享数据";left=13;top=241;right=393;bottom=332;edge=1;z=2};
|
||||||
|
static={cls="static";text="机器名";left=24;top=79;right=69;bottom=101;transparent=1;z=13};
|
||||||
|
static10={cls="static";text="web端口";left=20;top=139;right=70;bottom=164;transparent=1;z=11};
|
||||||
|
static11={cls="static";text="管理端口";left=17;top=172;right=71;bottom=194;transparent=1;z=3};
|
||||||
|
static12={cls="static";text="管理密码";left=17;top=203;right=71;bottom=225;transparent=1;z=18};
|
||||||
|
static13={cls="static";text="管理密码";left=210;top=139;right=264;bottom=161;transparent=1;z=17};
|
||||||
|
static2={cls="static";text="服务器";left=23;top=108;right=69;bottom=133;transparent=1;z=15};
|
||||||
|
static3={cls="static";text="web端口";left=213;top=79;right=267;bottom=101;transparent=1;z=7};
|
||||||
|
static4={cls="static";text="管理端口";left=210;top=109;right=264;bottom=131;transparent=1;z=5};
|
||||||
|
static5={cls="static";text="服务端口";left=210;top=172;right=266;bottom=194;transparent=1;z=1};
|
||||||
|
static7={cls="static";text="键名";left=30;top=271;right=61;bottom=293;transparent=1;z=16};
|
||||||
|
static8={cls="static";text="个数";left=28;top=301;right=58;bottom=323;transparent=1;z=10};
|
||||||
|
static9={cls="static";text="每项长度";left=208;top=299;right=266;bottom=321;transparent=1;z=12}
|
||||||
|
)
|
||||||
|
/*}}*/
|
||||||
|
|
||||||
|
import process.mutex;
|
||||||
|
mainForm.mutex = process.mutex(mainForm.text)
|
||||||
|
if( mainForm.mutex.conflict ){
|
||||||
|
import win.ui.atom;
|
||||||
|
var atom,hwndConflict = win.ui.atom.find(mainForm.text)
|
||||||
|
if( hwndConflict ) win.setForeground(hwndConflict);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainForm.serviceName = "cmonitor.sas.service";
|
||||||
|
mainForm.exeName = "cmonitor.sas.service.exe";
|
||||||
|
import dotNet;
|
||||||
|
dotNet.import("System");
|
||||||
|
var defaultConfig = {
|
||||||
|
"Client": {
|
||||||
|
"Server": "127.0.0.1:1802",
|
||||||
|
"Name":string.slice(System.Net.Dns.GetHostName(),1,12),
|
||||||
|
"GroupId": "snltty",
|
||||||
|
"ShareMemoryKey": "cmonitor/share",
|
||||||
|
"ShareMemoryCount": 100,
|
||||||
|
"ShareMemorySize": 1024,
|
||||||
|
"ApiPort": 1803,
|
||||||
|
"ApiPassword": "snltty",
|
||||||
|
"WebPort": 1804
|
||||||
|
},
|
||||||
|
"Common": {
|
||||||
|
"Modes": {"client","server"}
|
||||||
|
},
|
||||||
|
"Server": {
|
||||||
|
"WebPort": 1800,
|
||||||
|
"ApiPort": 1801,
|
||||||
|
"ServicePort": 1802,
|
||||||
|
"ApiPassword": "snltty"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
import win.image;
|
||||||
|
hIcon = win.image.loadIconFromFile("/res/favicon.ico",true);
|
||||||
|
hIcon1 = win.image.loadIconFromFile("/res/favicon1.ico",true);
|
||||||
|
mainForm.myTray = null;
|
||||||
|
mainForm.wndproc = function(hwnd,message,wParam,lParam){
|
||||||
|
//托盘菜单
|
||||||
|
if(message === 0xACCF ){
|
||||||
|
//右键
|
||||||
|
if( lParam === 0x205){
|
||||||
|
|
||||||
|
var pt = ::POINT();
|
||||||
|
::User32.GetCursorPos(pt);
|
||||||
|
win.setForeground(mainForm.hwnd)
|
||||||
|
mainForm.popmenu.popup(pt.x,pt.y,true );
|
||||||
|
|
||||||
|
}
|
||||||
|
//左键
|
||||||
|
if(lParam === 0x0202){
|
||||||
|
mainForm.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//关闭
|
||||||
|
if(message === 0x10){
|
||||||
|
mainForm.show(false);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mainForm.showPopmenu = function(){
|
||||||
|
import win.util.tray;
|
||||||
|
import win.ui.menu;
|
||||||
|
import service;
|
||||||
|
|
||||||
|
if(mainForm.myTray != null){
|
||||||
|
mainForm.myTray.delete();
|
||||||
|
mainForm.myTray = null;
|
||||||
|
}
|
||||||
|
tray = win.util.tray(mainForm);
|
||||||
|
mainForm.myTray = tray;
|
||||||
|
if(service.isRunning(mainForm.serviceName))
|
||||||
|
{
|
||||||
|
tray.icon = hIcon;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tray.icon = hIcon1;
|
||||||
|
}
|
||||||
|
tray.tip = mainForm.text;
|
||||||
|
tray.message = 0xACCF;
|
||||||
|
mainForm.popmenu=win.ui.popmenu(mainForm);
|
||||||
|
|
||||||
|
mainForm.popmenu.add(service.isRunning(mainForm.serviceName) ? '停止服务':'运行服务',function(id){mainForm.installCommand()});
|
||||||
|
mainForm.popmenu.add(service.isExist(mainForm.serviceName) ? '卸载服务':'安装服务',function(id){mainForm.installCommand()});
|
||||||
|
mainForm.popmenu.add('退出托盘',function(id){
|
||||||
|
win.quitMessage();
|
||||||
|
mainForm.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mainForm.loadConfig = function(){
|
||||||
|
import web.json;
|
||||||
|
var configJson = defaultConfig;
|
||||||
|
try{
|
||||||
|
|
||||||
|
jsonText = string.load(io.fullpath("configs/config.json"));
|
||||||
|
if(jsonText == null || string.len(jsonText) == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
configJson = web.json.parse(jsonText);
|
||||||
|
}
|
||||||
|
return configJson;
|
||||||
|
}
|
||||||
|
mainForm.saveConfig = function(){
|
||||||
|
import web.json;
|
||||||
|
import win.ui;
|
||||||
|
var result = false;
|
||||||
|
try{
|
||||||
|
mainForm.readConfigFromControll();
|
||||||
|
if(string.len(mainForm.editMachineName.text)>12)
|
||||||
|
{
|
||||||
|
win.msgbox("机器名最多12字符");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(string.len(mainForm.editApiClientPassword.text)>16)
|
||||||
|
{
|
||||||
|
win.msgbox("管理密码最多16字符");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(string.len(mainForm.editApiPassword.text)>16)
|
||||||
|
{
|
||||||
|
win.msgbox("管理密码最多16字符");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
path = io.fullpath("./configs/config.json");
|
||||||
|
string.save(path,web.json.stringify(mainForm.configJson,true));
|
||||||
|
result = true;
|
||||||
|
|
||||||
|
}catch(e){
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
mainForm.bindConfig2Controll = function(){
|
||||||
|
mainForm.cbClient.checked = table.indexOf( mainForm.configJson["Common"]["Modes"],"client") >= 1;
|
||||||
|
mainForm.cbService.checked = table.indexOf( mainForm.configJson["Common"]["Modes"],"server") >= 1;
|
||||||
|
|
||||||
|
mainForm.editMachineName.text = mainForm.configJson["Client"]["Name"] || defaultConfig["Client"]["Name"];
|
||||||
|
mainForm.editServer.text = mainForm.configJson["Client"]["Server"] || defaultConfig["Client"]["Server"];
|
||||||
|
mainForm.editWebClientPort.text = mainForm.configJson["Client"]["WebPort"] || defaultConfig["Client"]["WebPort"];
|
||||||
|
mainForm.editApiClientPort.text = mainForm.configJson["Client"]["ApiPort"] || defaultConfig["Client"]["ApiPort"];
|
||||||
|
mainForm.editApiClientPassword.text = mainForm.configJson["Client"]["ApiPassword"] || defaultConfig["Client"]["ApiPassword"];
|
||||||
|
|
||||||
|
mainForm.editShareKey.text = mainForm.configJson["Client"]["ShareMemoryKey"] || defaultConfig["Client"]["ShareMemoryKey"];
|
||||||
|
mainForm.editShareLength.text = mainForm.configJson["Client"]["ShareMemoryCount"] || defaultConfig["Client"]["ShareMemoryCount"];
|
||||||
|
mainForm.editShareSize.text = mainForm.configJson["Client"]["ShareMemorySize"] || defaultConfig["Client"]["ShareMemorySize"];
|
||||||
|
|
||||||
|
mainForm.editWebPort.text = mainForm.configJson["Server"]["WebPort"] || defaultConfig["Server"]["WebPort"];
|
||||||
|
mainForm.editApiPort.text = mainForm.configJson["Server"]["ApiPort"] || defaultConfig["Server"]["ApiPort"];
|
||||||
|
mainForm.editServicePort.text = mainForm.configJson["Server"]["ServicePort"] || defaultConfig["Server"]["ServicePort"];
|
||||||
|
mainForm.editApiPassword.text = mainForm.configJson["Server"]["ApiPassword"] || defaultConfig["Server"]["ApiPassword"];
|
||||||
|
}
|
||||||
|
mainForm.readConfigFromControll = function(){
|
||||||
|
modes = {};
|
||||||
|
if(mainForm.cbClient.checked) table.push(modes,"client");
|
||||||
|
if(mainForm.cbService.checked) table.push(modes,"server");
|
||||||
|
mainForm.configJson["Common"]["Modes"] = modes;
|
||||||
|
|
||||||
|
mainForm.configJson["Client"]["Name"] = mainForm.editMachineName.text;
|
||||||
|
mainForm.configJson["Client"]["Server"] = mainForm.editServer.text;
|
||||||
|
mainForm.configJson["Client"]["WebPort"] = tonumber(mainForm.editWebClientPort.text);
|
||||||
|
mainForm.configJson["Client"]["ApiPort"] = tonumber(mainForm.editApiClientPort.text);
|
||||||
|
mainForm.configJson["Client"]["ApiPassword"] = mainForm.editApiClientPassword.text;
|
||||||
|
|
||||||
|
mainForm.configJson["Client"]["ShareMemoryKey"] = mainForm.editShareKey.text;
|
||||||
|
mainForm.configJson["Client"]["ShareMemoryCount"] = tonumber(mainForm.editShareLength.text);
|
||||||
|
mainForm.configJson["Client"]["ShareMemorySize"] = tonumber(mainForm.editShareSize.text);
|
||||||
|
|
||||||
|
mainForm.configJson["Server"]["WebPort"] = tonumber(mainForm.editWebPort.text);
|
||||||
|
mainForm.configJson["Server"]["ApiPort"] = tonumber(mainForm.editApiPort.text);
|
||||||
|
mainForm.configJson["Server"]["ServicePort"] = tonumber(mainForm.editServicePort.text);
|
||||||
|
mainForm.configJson["Server"]["ApiPassword"] = mainForm.editApiPassword.text;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mainForm.showPassword = function(){
|
||||||
|
::SendMessageInt(mainForm.editApiClientPassword.hwnd, 0xCC/*_EM_SETPASSWORDCHAR*/, 0, 0);
|
||||||
|
::SendMessageInt(mainForm.editApiPassword.hwnd, 0xCC/*_EM_SETPASSWORDCHAR*/, 0, 0);
|
||||||
|
mainForm.editApiClientPassword.setFocus()
|
||||||
|
mainForm.editApiPassword.setFocus()
|
||||||
|
}
|
||||||
|
mainForm.hidePassword = function(){
|
||||||
|
::SendMessageInt(mainForm.editApiClientPassword.hwnd, 0xCC/*_EM_SETPASSWORDCHAR*/, '*'#, 0);
|
||||||
|
::SendMessageInt(mainForm.editApiPassword.hwnd, 0xCC/*_EM_SETPASSWORDCHAR*/, '*'#, 0);
|
||||||
|
mainForm.editApiClientPassword.setFocus()
|
||||||
|
mainForm.editApiPassword.setFocus()
|
||||||
|
}
|
||||||
|
mainForm.btnHidePassword.oncommand = function(){
|
||||||
|
mainForm.hidePassword();
|
||||||
|
}
|
||||||
|
mainForm.btnShowPassword.oncommand = function(){
|
||||||
|
mainForm.showPassword();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mainForm.checkService = function(){
|
||||||
|
import service;
|
||||||
|
mainForm.btnInstall.text = service.isExist(mainForm.serviceName) ? "卸载" : "安装";
|
||||||
|
mainForm.btnRun.text = service.isRunning(mainForm.serviceName) ? "停止" : "运行";
|
||||||
|
mainForm.showPopmenu();
|
||||||
|
}
|
||||||
|
mainForm.btnCheck.oncommand = function(id,event){
|
||||||
|
mainForm.checkService();
|
||||||
|
win.msgbox('已检查');
|
||||||
|
}
|
||||||
|
mainForm.runCommand = function(id,event){
|
||||||
|
import thread;
|
||||||
|
thread.invoke(
|
||||||
|
function(mainForm){
|
||||||
|
import service;
|
||||||
|
import win.ui;
|
||||||
|
try{
|
||||||
|
mainForm.saveConfig();
|
||||||
|
mainForm.btnRun.text = '....';
|
||||||
|
if(service.isRunning(mainForm.serviceName)){
|
||||||
|
if(service.stop(mainForm.serviceName,true)){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
win.msgbox("停止失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(service.start(mainForm.serviceName)){
|
||||||
|
}else{
|
||||||
|
win.msgbox("运行失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mainForm.checkService();
|
||||||
|
}catch(e){
|
||||||
|
}
|
||||||
|
},mainForm
|
||||||
|
);
|
||||||
|
}
|
||||||
|
mainForm.btnRun.oncommand = function(){
|
||||||
|
mainForm.runCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mainForm.installCommand = function(id,event){
|
||||||
|
import thread;
|
||||||
|
thread.invoke(
|
||||||
|
function(mainForm){
|
||||||
|
import service;
|
||||||
|
import win.ui;
|
||||||
|
try{
|
||||||
|
mainForm.saveConfig();
|
||||||
|
mainForm.btnInstall.text = '....';
|
||||||
|
if(service.isExist(mainForm.serviceName)){
|
||||||
|
if(service.delete(mainForm.serviceName)){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
win.msgbox("卸载失败");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(service.create(io.fullpath(mainForm.exeName),mainForm.serviceName,mainForm.serviceName,mainForm.serviceName)){
|
||||||
|
}else{
|
||||||
|
win.msgbox("安装失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mainForm.checkService();
|
||||||
|
}catch(e){
|
||||||
|
}
|
||||||
|
},mainForm
|
||||||
|
);
|
||||||
|
}
|
||||||
|
mainForm.btnInstall.oncommand = function(){
|
||||||
|
mainForm.installCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
mainForm.btnSaveConfig.oncommand = function(id,event){
|
||||||
|
if(mainForm.saveConfig()){
|
||||||
|
win.msgbox('已保存');
|
||||||
|
}else{
|
||||||
|
win.msgbox("保存失败~请先停止服务后重新尝试保存");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mainForm.configJson = mainForm.loadConfig();
|
||||||
|
mainForm.bindConfig2Controll();
|
||||||
|
mainForm.checkService();
|
||||||
|
mainForm.saveConfig();
|
||||||
|
mainForm.showPopmenu();
|
||||||
|
|
||||||
|
mainForm.show();
|
||||||
|
return win.loopMessage();
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
BIN
cmonitor.install.win/res/favicon1.ico
Normal file
BIN
cmonitor.install.win/res/favicon1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -17,6 +17,5 @@ namespace cmonitor.libs
|
|||||||
|
|
||||||
public void ReadArray(int position, byte[] bytes, int offset, int length);
|
public void ReadArray(int position, byte[] bytes, int offset, int length);
|
||||||
public void WriteArray(int position, byte[] data, int offset, int length);
|
public void WriteArray(int position, byte[] data, int offset, int length);
|
||||||
public void WritSpan(int position, Span<byte> span);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -347,14 +347,8 @@ namespace cmonitor.libs
|
|||||||
return Update(index, Encoding.UTF8.GetBytes(key), Encoding.UTF8.GetBytes(value), addAttri, removeAttri);
|
return Update(index, Encoding.UTF8.GetBytes(key), Encoding.UTF8.GetBytes(value), addAttri, removeAttri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool Update(int index, byte[] key, byte[] value,
|
|
||||||
ShareMemoryAttribute addAttri = ShareMemoryAttribute.None,
|
|
||||||
ShareMemoryAttribute removeAttri = ShareMemoryAttribute.None)
|
|
||||||
{
|
|
||||||
return Update(index, key, value.AsSpan(), addAttri, removeAttri);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Update(int index, byte[] key, Span<byte> value,
|
public bool Update(int index, byte[] key, byte[] value,
|
||||||
ShareMemoryAttribute addAttri = ShareMemoryAttribute.None,
|
ShareMemoryAttribute addAttri = ShareMemoryAttribute.None,
|
||||||
ShareMemoryAttribute removeAttri = ShareMemoryAttribute.None)
|
ShareMemoryAttribute removeAttri = ShareMemoryAttribute.None)
|
||||||
{
|
{
|
||||||
@@ -401,12 +395,12 @@ namespace cmonitor.libs
|
|||||||
if (accessorLocal != null)
|
if (accessorLocal != null)
|
||||||
{
|
{
|
||||||
accessorLocal.WriteInt(valIndex, vallen);
|
accessorLocal.WriteInt(valIndex, vallen);
|
||||||
accessorLocal.WritSpan(valIndex + 4, value);
|
accessorLocal.WriteArray(valIndex + 4, value,0,value.Length);
|
||||||
}
|
}
|
||||||
if (accessorGlobal != null)
|
if (accessorGlobal != null)
|
||||||
{
|
{
|
||||||
accessorGlobal.WriteInt(valIndex, vallen);
|
accessorGlobal.WriteInt(valIndex, vallen);
|
||||||
accessorGlobal.WritSpan(valIndex + 4, value);
|
accessorGlobal.WriteArray(valIndex + 4, value,0,value.Length);
|
||||||
}
|
}
|
||||||
IncrementVersion(index);
|
IncrementVersion(index);
|
||||||
if (removeAttri > 0)
|
if (removeAttri > 0)
|
||||||
|
|||||||
@@ -60,13 +60,6 @@ namespace cmonitor.libs
|
|||||||
Marshal.Copy(bytes, offset, shmPtr + position, length);
|
Marshal.Copy(bytes, offset, shmPtr + position, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public unsafe void WritSpan(int position, Span<byte> span)
|
|
||||||
{
|
|
||||||
if (shmPtr != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
span.CopyTo(new Span<byte>((void*)(shmPtr + position), span.Length));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte ReadByte(int position)
|
public byte ReadByte(int position)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,13 +60,6 @@ namespace cmonitor.libs
|
|||||||
Marshal.Copy(bytes, offset, shmPtr + position, length);
|
Marshal.Copy(bytes, offset, shmPtr + position, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public unsafe void WritSpan(int position, Span<byte> span)
|
|
||||||
{
|
|
||||||
if (shmPtr != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
span.CopyTo(new Span<byte>((void*)(shmPtr + position), span.Length));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte ReadByte(int position)
|
public byte ReadByte(int position)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,13 +57,6 @@ namespace cmonitor.libs
|
|||||||
accessorLocal.WriteArray(position, data, offset, length);
|
accessorLocal.WriteArray(position, data, offset, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void WritSpan(int position, Span<byte> span)
|
|
||||||
{
|
|
||||||
if (accessorLocal != null)
|
|
||||||
{
|
|
||||||
accessorLocal.SafeMemoryMappedViewHandle.WriteSpan<byte>((ulong)position, span);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte ReadByte(int position)
|
public byte ReadByte(int position)
|
||||||
{
|
{
|
||||||
|
|||||||
79
cmonitor.share.lib/Hook.cs
Normal file
79
cmonitor.share.lib/Hook.cs
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace cmonitor.share.lib
|
||||||
|
{
|
||||||
|
public sealed class Hook
|
||||||
|
{
|
||||||
|
private delegate int HookProc(int nCode, int wParam, IntPtr lParam);
|
||||||
|
private static int hHook = 0;
|
||||||
|
private const int WH_KEYBOARD_LL = 13;
|
||||||
|
HookProc KeyBoardHookProcedure;
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
private class KeyBoardHookStruct
|
||||||
|
{
|
||||||
|
public int vkCode;
|
||||||
|
public int scanCode;
|
||||||
|
public int flags;
|
||||||
|
public int time;
|
||||||
|
public int dwExtraInfo;
|
||||||
|
}
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
|
||||||
|
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
|
||||||
|
private static extern bool UnhookWindowsHookEx(int idHook);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int CallNextHookEx(int idHook, int nCode, int wParam, IntPtr lParam);
|
||||||
|
[DllImport("kernel32.dll")]
|
||||||
|
private static extern IntPtr GetModuleHandle(string name);
|
||||||
|
|
||||||
|
private Func<int, bool> hookAction;
|
||||||
|
public void Start(Func<int, bool> hookAction = null)
|
||||||
|
{
|
||||||
|
this.hookAction = hookAction;
|
||||||
|
// 安装键盘钩子
|
||||||
|
if (hHook != 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
KeyBoardHookProcedure = new HookProc(KeyBoardHookProc);
|
||||||
|
hHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyBoardHookProcedure, GetModuleHandle(null), 0);
|
||||||
|
//如果设置钩子失败.
|
||||||
|
if (hHook == 0)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
if (hHook != 0)
|
||||||
|
{
|
||||||
|
UnhookWindowsHookEx(hHook);
|
||||||
|
hHook = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int CurrentKeys { get; set; }
|
||||||
|
public DateTime LastDateTime { get; private set; } = DateTime.Now;
|
||||||
|
private int KeyBoardHookProc(int nCode, int wParam, IntPtr lParam)
|
||||||
|
{
|
||||||
|
if (nCode >= 0)
|
||||||
|
{
|
||||||
|
KeyBoardHookStruct kbh = (KeyBoardHookStruct)Marshal.PtrToStructure(lParam, typeof(KeyBoardHookStruct));
|
||||||
|
CurrentKeys = kbh.vkCode;
|
||||||
|
LastDateTime = DateTime.Now;
|
||||||
|
|
||||||
|
if (hookAction != null && hookAction.Invoke(nCode))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return CallNextHookEx(hHook, nCode, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
19
cmonitor.share.lib/IShareMemory.cs
Normal file
19
cmonitor.share.lib/IShareMemory.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
namespace cmonitor.share.lib
|
||||||
|
{
|
||||||
|
//1 attr + 8 version + 4 klen + key + 4 vlen + val
|
||||||
|
public interface IShareMemory
|
||||||
|
{
|
||||||
|
bool Init();
|
||||||
|
|
||||||
|
byte ReadByte(int position);
|
||||||
|
void WriteByte(int position, byte value);
|
||||||
|
int ReadInt(int position);
|
||||||
|
void WriteInt(int position, int value);
|
||||||
|
|
||||||
|
long ReadInt64(int position);
|
||||||
|
void WriteInt64(int position, long value);
|
||||||
|
|
||||||
|
void ReadArray(int position, byte[] bytes, int offset, int length);
|
||||||
|
void WriteArray(int position, byte[] data, int offset, int length);
|
||||||
|
}
|
||||||
|
}
|
||||||
36
cmonitor.share.lib/Properties/AssemblyInfo.cs
Normal file
36
cmonitor.share.lib/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("cmonitor.share.lib")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("cmonitor.share.lib")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("9a3d0eb7-b775-4be8-a5af-c2bac9e5cfd0")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
615
cmonitor.share.lib/ShareMemory.cs
Normal file
615
cmonitor.share.lib/ShareMemory.cs
Normal file
@@ -0,0 +1,615 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace cmonitor.share.lib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// InitLocal 和 InitGlobal 都可以初始化,都初始化时,需要启动 StartLoop,将InitGlobal同步数据到Local
|
||||||
|
/// AddAttributeAction 设置状态变化回调,需要启动 Loop,监听数据变化
|
||||||
|
/// </summary>
|
||||||
|
public sealed class ShareMemory
|
||||||
|
{
|
||||||
|
private const int shareMemoryAttributeIndex = 0;
|
||||||
|
private const int shareMemoryAttributeSize = 1;
|
||||||
|
private const int shareMemoryVersionSize = 8;
|
||||||
|
private const int shareMemoryVersionIndex = 1;
|
||||||
|
private const int shareMemoryHeadSize = shareMemoryAttributeSize + shareMemoryVersionSize;
|
||||||
|
|
||||||
|
private string key;
|
||||||
|
private int length;
|
||||||
|
private int itemSize;
|
||||||
|
private byte[] bytes;
|
||||||
|
private object lockObj = new object();
|
||||||
|
private long mainVersion = 0;
|
||||||
|
IShareMemory accessorLocal = null;
|
||||||
|
IShareMemory accessorGlobal = null;
|
||||||
|
|
||||||
|
private readonly ShareMemoryAttribute[] itemAttributes = Array.Empty<ShareMemoryAttribute>();
|
||||||
|
private readonly long[] itemVersions = Array.Empty<long>();
|
||||||
|
ConcurrentDictionary<int, List<Action<ShareMemoryAttribute>>> attributeActions = new ConcurrentDictionary<int, List<Action<ShareMemoryAttribute>>>();
|
||||||
|
private CancellationTokenSource cancellationTokenSource;
|
||||||
|
private ConcurrentQueue<ShareItemAttributeChanged> attributeChangeds = new ConcurrentQueue<ShareItemAttributeChanged>();
|
||||||
|
|
||||||
|
private readonly Dictionary<string, ShareItemInfo> dic = new Dictionary<string, ShareItemInfo>();
|
||||||
|
|
||||||
|
public ShareMemory(string key, int length, int itemSize)
|
||||||
|
{
|
||||||
|
this.key = key;
|
||||||
|
this.length = length;
|
||||||
|
this.itemSize = itemSize;
|
||||||
|
bytes = new byte[length * itemSize];
|
||||||
|
itemAttributes = new ShareMemoryAttribute[length];
|
||||||
|
itemVersions = new long[length];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitLocal()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (accessorLocal == null)
|
||||||
|
{
|
||||||
|
accessorLocal = ShareMemoryFactory.Create(key, length, itemSize);
|
||||||
|
|
||||||
|
if (accessorLocal.Init() == false)
|
||||||
|
{
|
||||||
|
accessorLocal = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] gloablBytes;
|
||||||
|
public void InitGlobal()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && accessorGlobal == null)
|
||||||
|
{
|
||||||
|
gloablBytes = new byte[bytes.Length];
|
||||||
|
accessorGlobal = ShareMemoryFactory.Create($"Global\\{key}", length, itemSize);
|
||||||
|
if (accessorGlobal.Init() == false)
|
||||||
|
{
|
||||||
|
accessorGlobal = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void AddAttributeAction(int index, Action<ShareMemoryAttribute> action)
|
||||||
|
{
|
||||||
|
if (attributeActions.TryGetValue(index, out List<Action<ShareMemoryAttribute>> actions) == false)
|
||||||
|
{
|
||||||
|
actions = new List<Action<ShareMemoryAttribute>>();
|
||||||
|
attributeActions.TryAdd(index, actions);
|
||||||
|
}
|
||||||
|
if (actions.Any(c => c == action) == false)
|
||||||
|
{
|
||||||
|
actions.Add(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void RemoveAttributeAction(int index, Action<ShareMemoryAttribute> action)
|
||||||
|
{
|
||||||
|
if (attributeActions.TryGetValue(index, out List<Action<ShareMemoryAttribute>> actions) == false)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
actions.Remove(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void StartLoop()
|
||||||
|
{
|
||||||
|
cancellationTokenSource?.Cancel();
|
||||||
|
cancellationTokenSource = new CancellationTokenSource();
|
||||||
|
Task.Factory.StartNew(async () =>
|
||||||
|
{
|
||||||
|
while (cancellationTokenSource.IsCancellationRequested == false)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SyncMemory();
|
||||||
|
AttributeCallback();
|
||||||
|
ReadItems();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
await Task.Delay(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, TaskCreationOptions.LongRunning);
|
||||||
|
|
||||||
|
Task.Factory.StartNew(async () =>
|
||||||
|
{
|
||||||
|
while (cancellationTokenSource.IsCancellationRequested == false)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
while (attributeChangeds.TryDequeue(out ShareItemAttributeChanged result))
|
||||||
|
{
|
||||||
|
result.Action(result.Attribute);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
await Task.Delay(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, TaskCreationOptions.LongRunning);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AttributeCallback()
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return;
|
||||||
|
|
||||||
|
bool allUpdated = false;
|
||||||
|
for (int index = 0; index < length; index++)
|
||||||
|
{
|
||||||
|
ShareMemoryAttribute attribute = ReadAttribute(accessorLocal, index);
|
||||||
|
bool updated = ReadVersionUpdated(accessorLocal, index);
|
||||||
|
allUpdated |= updated;
|
||||||
|
if (updated)
|
||||||
|
{
|
||||||
|
itemAttributes[index] &= (~ShareMemoryAttribute.Updated);
|
||||||
|
attribute |= ShareMemoryAttribute.Updated;
|
||||||
|
}
|
||||||
|
if (attribute != itemAttributes[index])
|
||||||
|
{
|
||||||
|
itemAttributes[index] = attribute;
|
||||||
|
if (attributeActions.TryGetValue(index, out List<Action<ShareMemoryAttribute>> actions) && actions.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var action in actions)
|
||||||
|
{
|
||||||
|
attributeChangeds.Enqueue(new ShareItemAttributeChanged { Action = action, Attribute = attribute });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (allUpdated)
|
||||||
|
{
|
||||||
|
mainVersion++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void SyncMemory()
|
||||||
|
{
|
||||||
|
if (accessorGlobal != null && accessorLocal != null)
|
||||||
|
{
|
||||||
|
lock (lockObj)
|
||||||
|
{
|
||||||
|
accessorGlobal.ReadArray(0, gloablBytes, 0, gloablBytes.Length);
|
||||||
|
accessorLocal.WriteArray(0, gloablBytes, 0, itemSize);
|
||||||
|
for (int index = 0; index < length; index++)
|
||||||
|
{
|
||||||
|
//检查更新状态
|
||||||
|
if (ReadVersionUpdated(accessorGlobal, index) == false)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _index = index * itemSize;
|
||||||
|
int keyLen = BitConverter.ToInt32(gloablBytes, _index + shareMemoryHeadSize);
|
||||||
|
if (keyLen > 0)
|
||||||
|
{
|
||||||
|
accessorLocal.WriteArray(_index, gloablBytes, _index, itemSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void ReadItems()
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (lockObj)
|
||||||
|
{
|
||||||
|
accessor.ReadArray(0, bytes, 0, bytes.Length);
|
||||||
|
|
||||||
|
for (int index = 0; index < length; index++)
|
||||||
|
{
|
||||||
|
ShareMemoryAttribute attribute = ReadAttribute(accessor, index);
|
||||||
|
long itemVersion = ReadVersion(accessor, index);
|
||||||
|
bool skip = (itemVersion <= itemVersions[index] || (attribute & ShareMemoryAttribute.HiddenForList) == ShareMemoryAttribute.HiddenForList);
|
||||||
|
itemVersions[index] = itemVersion;
|
||||||
|
if (skip)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//key length
|
||||||
|
int _index = index * itemSize + shareMemoryHeadSize;
|
||||||
|
int keyLen = BitConverter.ToInt32(bytes, _index);
|
||||||
|
_index += 4;
|
||||||
|
if (keyLen > 0 && keyLen + 8 + shareMemoryHeadSize < itemSize)
|
||||||
|
{
|
||||||
|
//key
|
||||||
|
string key = Encoding.UTF8.GetString(bytes, _index, keyLen);
|
||||||
|
_index += keyLen;
|
||||||
|
|
||||||
|
//val length
|
||||||
|
string val = string.Empty;
|
||||||
|
int valLen = BitConverter.ToInt32(bytes, _index);
|
||||||
|
_index += 4;
|
||||||
|
//value
|
||||||
|
if (keyLen + 8 + shareMemoryHeadSize + valLen <= itemSize)
|
||||||
|
{
|
||||||
|
val = Encoding.UTF8.GetString(bytes, _index, valLen);
|
||||||
|
}
|
||||||
|
|
||||||
|
dic[key] = new ShareItemInfo
|
||||||
|
{
|
||||||
|
Index = index,
|
||||||
|
Value = val
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, ShareItemInfo> ReadItems(out long version)
|
||||||
|
{
|
||||||
|
version = mainVersion;
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
public string ReadValueString(int index)
|
||||||
|
{
|
||||||
|
byte[] bytes = ReadValueArray(index);
|
||||||
|
if (bytes.Length == 0) return string.Empty;
|
||||||
|
|
||||||
|
return Encoding.UTF8.GetString(bytes);
|
||||||
|
}
|
||||||
|
public long ReadValueInt64(int index)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null || index >= length) return 0;
|
||||||
|
index = index * itemSize + shareMemoryHeadSize;
|
||||||
|
|
||||||
|
int keylen = accessor.ReadInt(index);
|
||||||
|
index += 4 + keylen;
|
||||||
|
if (keylen == 0) return 0;
|
||||||
|
|
||||||
|
int vallen = accessor.ReadInt(index);
|
||||||
|
index += 4;
|
||||||
|
if (vallen == 0 || keylen + 8 + shareMemoryHeadSize + vallen > itemSize) return 0;
|
||||||
|
|
||||||
|
return accessor.ReadInt64(index);
|
||||||
|
}
|
||||||
|
public byte[] ReadValueArray(int index)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null || index >= length) return Array.Empty<byte>();
|
||||||
|
index = index * itemSize + shareMemoryHeadSize;
|
||||||
|
|
||||||
|
int keylen = accessor.ReadInt(index);
|
||||||
|
index += 4 + keylen;
|
||||||
|
|
||||||
|
int vallen = accessor.ReadInt(index);
|
||||||
|
index += 4;
|
||||||
|
if (vallen == 0 || keylen + 8 + shareMemoryHeadSize + vallen > itemSize) return Array.Empty<byte>();
|
||||||
|
|
||||||
|
byte[] bytes = new byte[vallen];
|
||||||
|
accessor.ReadArray(index, bytes, 0, bytes.Length);
|
||||||
|
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
public int ReadValueArray(int index, byte[] bytes)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null || index >= length) return 0;
|
||||||
|
index = index * itemSize + shareMemoryHeadSize;
|
||||||
|
|
||||||
|
int keylen = accessor.ReadInt(index);
|
||||||
|
index += 4 + keylen;
|
||||||
|
|
||||||
|
int vallen = accessor.ReadInt(index);
|
||||||
|
index += 4;
|
||||||
|
if (vallen == 0 || keylen + 8 + shareMemoryHeadSize + vallen > itemSize) return 0;
|
||||||
|
|
||||||
|
accessor.ReadArray(index, bytes, 0, bytes.Length);
|
||||||
|
|
||||||
|
return vallen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Update(int index, string key, string value,
|
||||||
|
ShareMemoryAttribute addAttri = ShareMemoryAttribute.None,
|
||||||
|
ShareMemoryAttribute removeAttri = ShareMemoryAttribute.None)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(key))
|
||||||
|
{
|
||||||
|
return Update(index, Array.Empty<byte>(), Encoding.UTF8.GetBytes(value), addAttri, removeAttri);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Update(index, Encoding.UTF8.GetBytes(key), Encoding.UTF8.GetBytes(value), addAttri, removeAttri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Update(int index, byte[] key, byte[] value,
|
||||||
|
ShareMemoryAttribute addAttri = ShareMemoryAttribute.None,
|
||||||
|
ShareMemoryAttribute removeAttri = ShareMemoryAttribute.None)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (accessorLocal == null && accessorGlobal == null) return false;
|
||||||
|
if (index > length) return false;
|
||||||
|
if (key.Length + 8 + shareMemoryHeadSize + value.Length > itemSize) return false;
|
||||||
|
|
||||||
|
lock (lockObj)
|
||||||
|
{
|
||||||
|
int valIndex = index * itemSize + shareMemoryHeadSize;
|
||||||
|
int startIndex = valIndex;
|
||||||
|
int keylen = key.Length;
|
||||||
|
int vallen = value.Length;
|
||||||
|
if (key.Length > 0)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.WriteInt(valIndex, keylen);
|
||||||
|
accessorLocal.WriteArray(valIndex + 4, key, 0, key.Length);
|
||||||
|
}
|
||||||
|
if (accessorGlobal != null)
|
||||||
|
{
|
||||||
|
accessorGlobal.WriteInt(valIndex, keylen);
|
||||||
|
accessorGlobal.WriteArray(valIndex + 4, key, 0, key.Length);
|
||||||
|
}
|
||||||
|
valIndex += 4 + key.Length;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int keyLen = 0;
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
keyLen = accessorLocal.ReadInt(valIndex);
|
||||||
|
}
|
||||||
|
if (keyLen == 0 && accessorGlobal != null)
|
||||||
|
{
|
||||||
|
keyLen = accessorGlobal.ReadInt(valIndex);
|
||||||
|
}
|
||||||
|
valIndex += 4 + keyLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.WriteInt(valIndex, vallen);
|
||||||
|
accessorLocal.WriteArray(valIndex + 4, value, 0, value.Length);
|
||||||
|
}
|
||||||
|
if (accessorGlobal != null)
|
||||||
|
{
|
||||||
|
accessorGlobal.WriteInt(valIndex, vallen);
|
||||||
|
accessorGlobal.WriteArray(valIndex + 4, value, 0, value.Length);
|
||||||
|
}
|
||||||
|
IncrementVersion(index);
|
||||||
|
if (removeAttri > 0)
|
||||||
|
{
|
||||||
|
RemoveAttribute(index, removeAttri);
|
||||||
|
}
|
||||||
|
if (addAttri > 0)
|
||||||
|
{
|
||||||
|
AddAttribute(index, addAttri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ShareMemoryAttribute ReadAttribute(IShareMemory accessor, int index)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return ShareMemoryAttribute.None;
|
||||||
|
|
||||||
|
ShareMemoryAttribute stateByte = (ShareMemoryAttribute)accessor.ReadByte(index * itemSize + shareMemoryAttributeIndex);
|
||||||
|
return stateByte;
|
||||||
|
}
|
||||||
|
private bool ReadAttributeEqual(IShareMemory accessor, int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return false;
|
||||||
|
|
||||||
|
ShareMemoryAttribute attributeByte = (ShareMemoryAttribute)accessor.ReadByte(index * itemSize + shareMemoryAttributeIndex);
|
||||||
|
return (attributeByte & attribute) == attribute;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddAttribute(IShareMemory accessor, int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return;
|
||||||
|
byte attributeValue = accessor.ReadByte(index * itemSize + shareMemoryAttributeIndex);
|
||||||
|
byte attributeByte = (byte)attribute;
|
||||||
|
attributeValue |= attributeByte;
|
||||||
|
accessor.WriteByte(index * itemSize + shareMemoryAttributeIndex, attributeValue);
|
||||||
|
|
||||||
|
IncrementVersion(accessor, index);
|
||||||
|
}
|
||||||
|
private void RemoveAttribute(IShareMemory accessor, int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return;
|
||||||
|
byte attributeValue = accessor.ReadByte(index * itemSize + shareMemoryAttributeIndex);
|
||||||
|
byte attributeByte = (byte)attribute;
|
||||||
|
attributeValue &= (byte)(~attributeByte);
|
||||||
|
accessor.WriteByte(index * itemSize + shareMemoryAttributeIndex, attributeValue);
|
||||||
|
|
||||||
|
IncrementVersion(accessor, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DateTime startTime = new DateTime(1970, 1, 1);
|
||||||
|
private void IncrementVersion(IShareMemory accessor, int index)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return;
|
||||||
|
|
||||||
|
long version = (long)(DateTime.UtcNow.Subtract(startTime)).TotalMilliseconds;
|
||||||
|
accessor.WriteInt64(index * itemSize + shareMemoryVersionIndex, version);
|
||||||
|
}
|
||||||
|
private long ReadVersion(IShareMemory accessor, int index)
|
||||||
|
{
|
||||||
|
if (accessor == null || index >= length) return 0;
|
||||||
|
long version = accessor.ReadInt64(index * itemSize + shareMemoryVersionIndex);
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
private bool ReadVersionUpdated(IShareMemory accessor, int index)
|
||||||
|
{
|
||||||
|
long version = ReadVersion(accessor, index);
|
||||||
|
return version > itemVersions[index];
|
||||||
|
}
|
||||||
|
private bool ReadVersionUpdated(IShareMemory accessor, int index, ref long version)
|
||||||
|
{
|
||||||
|
long _version = ReadVersion(accessor, index);
|
||||||
|
bool res = _version > version;
|
||||||
|
version = _version;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShareMemoryAttribute ReadAttribute(int index)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return ShareMemoryAttribute.None;
|
||||||
|
|
||||||
|
return ReadAttribute(accessor, index);
|
||||||
|
}
|
||||||
|
public bool ReadAttributeEqual(int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return false;
|
||||||
|
|
||||||
|
return ReadAttributeEqual(accessor, index, attribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAttribute(int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
AddAttribute(accessorLocal, index, attribute);
|
||||||
|
AddAttribute(accessorGlobal, index, attribute);
|
||||||
|
}
|
||||||
|
public void RemoveAttribute(int index, ShareMemoryAttribute attribute)
|
||||||
|
{
|
||||||
|
RemoveAttribute(accessorLocal, index, attribute);
|
||||||
|
RemoveAttribute(accessorGlobal, index, attribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void IncrementVersion(int index)
|
||||||
|
{
|
||||||
|
IncrementVersion(accessorLocal, index);
|
||||||
|
IncrementVersion(accessorGlobal, index);
|
||||||
|
}
|
||||||
|
public long ReadVersion(int index)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return 0;
|
||||||
|
|
||||||
|
return ReadVersion(accessor, index);
|
||||||
|
}
|
||||||
|
public bool ReadVersionUpdated(int index)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return false;
|
||||||
|
|
||||||
|
return ReadVersionUpdated(accessor, index);
|
||||||
|
}
|
||||||
|
public bool ReadVersionUpdated(int index, ref long version)
|
||||||
|
{
|
||||||
|
IShareMemory accessor = accessorLocal ?? accessorGlobal;
|
||||||
|
if (accessor == null) return false;
|
||||||
|
|
||||||
|
return ReadVersionUpdated(accessor, index, ref version);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ListenClose(int shareIndex)
|
||||||
|
{
|
||||||
|
Task.Run(async () =>
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (ReadAttributeEqual(shareIndex, ShareMemoryAttribute.Closed))
|
||||||
|
{
|
||||||
|
RemoveAttribute(shareIndex, ShareMemoryAttribute.Running);
|
||||||
|
RemoveAttribute(shareIndex, ShareMemoryAttribute.Running);
|
||||||
|
Environment.Exit(0);
|
||||||
|
Process.GetCurrentProcess().Kill();
|
||||||
|
}
|
||||||
|
await Task.Delay(30);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ShareMemoryAttribute : byte
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Updated = 0b0000_0001,
|
||||||
|
Closed = 0b0000_0010,
|
||||||
|
Running = 0b0000_0100,
|
||||||
|
HiddenForList = 0b0000_1000,
|
||||||
|
Error = 0b0001_0000,
|
||||||
|
All = 0b1111_1111
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
|
public struct ShareItem
|
||||||
|
{
|
||||||
|
public byte Attr;
|
||||||
|
|
||||||
|
public ulong Version;
|
||||||
|
|
||||||
|
public ulong Time;
|
||||||
|
|
||||||
|
public byte KeyLength;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 255长度
|
||||||
|
/// </summary>
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)]
|
||||||
|
public byte[] Key;
|
||||||
|
|
||||||
|
public byte ValLength;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 9966长度
|
||||||
|
/// </summary>
|
||||||
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 9966)]
|
||||||
|
public byte[] Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class ShareItemAttributeChanged
|
||||||
|
{
|
||||||
|
public Action<ShareMemoryAttribute> Action { get; set; }
|
||||||
|
public ShareMemoryAttribute Attribute { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed partial class ShareItemInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 内存下标
|
||||||
|
/// </summary>
|
||||||
|
public int Index { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 内存值
|
||||||
|
/// </summary>
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
17
cmonitor.share.lib/ShareMemoryFactory.cs
Normal file
17
cmonitor.share.lib/ShareMemoryFactory.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace cmonitor.share.lib
|
||||||
|
{
|
||||||
|
public static class ShareMemoryFactory
|
||||||
|
{
|
||||||
|
public static IShareMemory Create(string key, int length, int itemSize)
|
||||||
|
{
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
return new ShareMemoryWindows(key, length, itemSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ShareMemoryWindows(key, length, itemSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
113
cmonitor.share.lib/ShareMemoryWindows.cs
Normal file
113
cmonitor.share.lib/ShareMemoryWindows.cs
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.MemoryMappedFiles;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace cmonitor.share.lib
|
||||||
|
{
|
||||||
|
public sealed class ShareMemoryWindows : IShareMemory
|
||||||
|
{
|
||||||
|
private string key;
|
||||||
|
private int length;
|
||||||
|
private int itemSize;
|
||||||
|
MemoryMappedFile mmfLocal = null;
|
||||||
|
MemoryMappedViewAccessor accessorLocal = null;
|
||||||
|
|
||||||
|
public ShareMemoryWindows(string key, int length, int itemSize)
|
||||||
|
{
|
||||||
|
this.key = key;
|
||||||
|
this.length = length;
|
||||||
|
this.itemSize = itemSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Init()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (accessorLocal == null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
mmfLocal = MemoryMappedFile.CreateOrOpen($"{key}", length * itemSize, MemoryMappedFileAccess.ReadWriteExecute, MemoryMappedFileOptions.None, HandleInheritability.None);
|
||||||
|
|
||||||
|
SetSecurityInfoByHandle(mmfLocal.SafeMemoryMappedFileHandle, 1, 4, null, null, null, null);
|
||||||
|
|
||||||
|
accessorLocal = mmfLocal.CreateViewAccessor();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("advapi32.dll", EntryPoint = "SetSecurityInfo", CallingConvention = CallingConvention.Winapi, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)]
|
||||||
|
static extern uint SetSecurityInfoByHandle(SafeHandle handle, uint objectType, uint securityInformation, byte[] owner, byte[] group, byte[] dacl, byte[] sacl);
|
||||||
|
|
||||||
|
public void ReadArray(int position, byte[] bytes, int offset, int length)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.ReadArray(position, bytes, offset, bytes.Length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void WriteArray(int position, byte[] data, int offset, int length)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.WriteArray(position, data, offset, length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte ReadByte(int position)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
return accessorLocal.ReadByte(position);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public void WriteByte(int position, byte value)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.Write(position, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ReadInt(int position)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
return accessorLocal.ReadInt32(position);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public void WriteInt(int position, int value)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.Write(position, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public long ReadInt64(int position)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
return accessorLocal.ReadInt64(position);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
public void WriteInt64(int position, long value)
|
||||||
|
{
|
||||||
|
if (accessorLocal != null)
|
||||||
|
{
|
||||||
|
accessorLocal.Write(position, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
52
cmonitor.share.lib/cmonitor.share.lib.csproj
Normal file
52
cmonitor.share.lib/cmonitor.share.lib.csproj
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>cmonitor.share.lib</RootNamespace>
|
||||||
|
<AssemblyName>cmonitor.share.lib</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Hook.cs" />
|
||||||
|
<Compile Include="IShareMemory.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="ShareMemory.cs" />
|
||||||
|
<Compile Include="ShareMemoryFactory.cs" />
|
||||||
|
<Compile Include="ShareMemoryWindows.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
16
cmonitor.sln
16
cmonitor.sln
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.sas.service", "cmo
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.libs", "cmonitor.libs\cmonitor.libs.csproj", "{9080618D-367F-474E-AACA-A3C2F294448F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.libs", "cmonitor.libs\cmonitor.libs.csproj", "{9080618D-367F-474E-AACA-A3C2F294448F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.install.win", "cmonitor.install.win\cmonitor.install.win.csproj", "{4EB9FFB0-B05C-4C4E-BD44-796715E47585}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.install.win1", "cmonitor.install.win1\cmonitor.install.win1.csproj", "{4EB9FFB0-B05C-4C4E-BD44-796715E47585}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.llock.win", "cmonitor.llock.win\cmonitor.llock.win.csproj", "{6F2602B3-221D-475D-B643-D54987605644}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.llock.win", "cmonitor.llock.win\cmonitor.llock.win.csproj", "{6F2602B3-221D-475D-B643-D54987605644}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -29,6 +29,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmonitor.killer", "cmonitor
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.tests", "cmonitor.tests\cmonitor.tests.csproj", "{04AA3054-5350-4D8B-97F6-31495AE0609D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.tests", "cmonitor.tests\cmonitor.tests.csproj", "{04AA3054-5350-4D8B-97F6-31495AE0609D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cmonitor.share.lib", "cmonitor.share.lib\cmonitor.share.lib.csproj", "{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -195,6 +197,18 @@ Global
|
|||||||
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x64.Build.0 = Release|Any CPU
|
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x86.ActiveCfg = Release|Any CPU
|
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x86.Build.0 = Release|Any CPU
|
{04AA3054-5350-4D8B-97F6-31495AE0609D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{9A3D0EB7-B775-4BE8-A5AF-C2BAC9E5CFD0}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project ver="10" name="cmonitor.viewer.client.win" libEmbed="true" icon="C:\Users\snltty\Desktop\cmonitor\cmonitor\favicon.ico" ui="win" output="cmonitor.viewer.client.win.exe" CompanyName="snltty" FileDescription="cmonitor.viewer.client.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="cmonitor.viewer.client.win" InternalName="cmonitor.viewer.client.win" FileVersion="0.0.0.43" ProductVersion="0.0.0.43" publishDir="/dist/" dstrip="false">
|
<project ver="10" name="cmonitor.viewer.client.win" libEmbed="true" icon="..\cmonitor\favicon.ico" ui="win" output="cmonitor.viewer.client.win.exe" CompanyName="snltty" FileDescription="cmonitor.viewer.client.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="cmonitor.viewer.client.win" InternalName="cmonitor.viewer.client.win" FileVersion="0.0.0.44" ProductVersion="0.0.0.44" publishDir="/dist/" dstrip="false">
|
||||||
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
|
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
|
||||||
<folder name="资源文件" path="res" embed="true"/>
|
<folder name="资源文件" path="res" embed="true" local="false" ignored="false"/>
|
||||||
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/>
|
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Binary file not shown.
@@ -46,7 +46,7 @@ namespace cmonitor.viewer.server.win
|
|||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
this.WindowState = FormWindowState.Minimized;
|
this.WindowState = FormWindowState.Minimized;
|
||||||
this.Visible = false;
|
this.Visible = false;
|
||||||
FireWallHelper.Write(Path.GetFileNameWithoutExtension(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName));
|
FireWallHelper.Write(Path.GetFileNameWithoutExtension(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName),"./plugins/viewer/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CheckRunning();
|
CheckRunning();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { computed, onMounted, reactive, watch } from 'vue';
|
import { computed, onMounted, reactive, watch } from 'vue';
|
||||||
import { initWebsocket, subWebsocketState } from '../apis/request'
|
import { initWebsocket, subWebsocketState,closeWebsocket } from '../apis/request'
|
||||||
import { getConfig,getSignInfo } from '../apis/signin'
|
import { getConfig,getSignInfo } from '../apis/signin'
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { injectGlobalData } from '../provide';
|
import { injectGlobalData } from '../provide';
|
||||||
@@ -47,11 +47,11 @@ export default {
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const queryCache = JSON.parse(localStorage.getItem('api-cache') || JSON.stringify({api:`${window.location.hostname}:1805`,psd:'snltty',groupid:'snltty'}));
|
const queryCache = JSON.parse(localStorage.getItem('api-cache') || JSON.stringify({api:`${window.location.hostname}:1804`,psd:'snltty',groupid:'snltty'}));
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
api:queryCache.api,
|
api:queryCache.api,
|
||||||
psd:queryCache.psd,
|
psd:queryCache.psd,
|
||||||
groupid: queryCache.groupid,
|
groupid:globalData.value.groupid || queryCache.groupid,
|
||||||
showPort: false
|
showPort: false
|
||||||
});
|
});
|
||||||
const showPort = computed(() => globalData.value.connected == false && state.showPort);
|
const showPort = computed(() => globalData.value.connected == false && state.showPort);
|
||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
queryCache.psd = state.psd;
|
queryCache.psd = state.psd;
|
||||||
queryCache.groupid = state.groupid;
|
queryCache.groupid = state.groupid;
|
||||||
localStorage.setItem('api-cache',JSON.stringify(queryCache));
|
localStorage.setItem('api-cache',JSON.stringify(queryCache));
|
||||||
|
closeWebsocket();
|
||||||
initWebsocket(`ws://${state.api}`,state.psd);
|
initWebsocket(`ws://${state.api}`,state.psd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
cmonitor.web/public/favicon1.ico
Normal file
BIN
cmonitor.web/public/favicon1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
cmonitor.web/src/assets/logo1.png
Normal file
BIN
cmonitor.web/src/assets/logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -19,7 +19,7 @@
|
|||||||
接口 : <el-input v-model="state.api" style="width:70%"></el-input>
|
接口 : <el-input v-model="state.api" style="width:70%"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top:1rem ;">
|
<div style="padding-top:1rem ;">
|
||||||
秘钥 : <el-input type="password" v-model="state.apipsd" style="width:70%"></el-input>
|
秘钥 : <el-input type="password" v-model="state.psd" style="width:70%"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top:1rem ;">
|
<div style="padding-top:1rem ;">
|
||||||
分组 : <el-input v-model="state.groupid" style="width:70%"></el-input>
|
分组 : <el-input v-model="state.groupid" style="width:70%"></el-input>
|
||||||
@@ -37,27 +37,24 @@ import { computed, onMounted, reactive, watch } from 'vue';
|
|||||||
import { initWebsocket, subWebsocketState,closeWebsocket } from '../apis/request'
|
import { initWebsocket, subWebsocketState,closeWebsocket } from '../apis/request'
|
||||||
import { getRules, addName } from '../apis/rule'
|
import { getRules, addName } from '../apis/rule'
|
||||||
import { getConfig } from '../apis/signin'
|
import { getConfig } from '../apis/signin'
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { injectGlobalData } from './provide';
|
import { injectGlobalData } from './provide';
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const globalData = injectGlobalData();
|
const globalData = injectGlobalData();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const queryCache = JSON.parse(localStorage.getItem('api-cache') || JSON.stringify({username:'',api:`${window.location.hostname}:1801`,psd:'snltty',groupid:'snltty'}));
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
api: route.query.api ? `${window.location.hostname}:${route.query.api}` : (localStorage.getItem('api') || `${window.location.hostname}:1801`),
|
api:queryCache.api,
|
||||||
apipsd: route.query.apipsd ? `${route.query.apipsd}` : (localStorage.getItem('apipsd') || `snltty`),
|
psd:queryCache.psd,
|
||||||
groupid: route.query.groupid ? `${route.query.groupid}` : (localStorage.getItem('groupid') || `snltty`),
|
groupid: globalData.value.groupid || queryCache.groupid,
|
||||||
usernames: [],
|
usernames: [],
|
||||||
username: globalData.value.username || localStorage.getItem('username') || '',
|
username: globalData.value.username || queryCache.username,
|
||||||
showPort: false
|
showPort: false
|
||||||
});
|
});
|
||||||
localStorage.setItem('api', state.api);
|
|
||||||
localStorage.setItem('apipsd', state.apipsd);
|
|
||||||
localStorage.setItem('groupid', state.groupid);
|
|
||||||
globalData.value.username = state.username;
|
|
||||||
globalData.value.groupid = state.groupid;
|
|
||||||
|
|
||||||
const showSelectUsername = computed(() => !!!globalData.value.username && globalData.value.connected);
|
const showSelectUsername = computed(() => !!!globalData.value.username && globalData.value.connected);
|
||||||
const showPort = computed(() => globalData.value.connected == false && state.showPort);
|
const showPort = computed(() => globalData.value.connected == false && state.showPort);
|
||||||
@@ -89,20 +86,22 @@ export default {
|
|||||||
state.usernames = Object.keys(res.Data);
|
state.usernames = Object.keys(res.Data);
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const saveCache = ()=>{
|
||||||
|
globalData.value.username = state.username;
|
||||||
|
globalData.value.groupid = state.groupid;
|
||||||
|
queryCache.api = state.api;
|
||||||
|
queryCache.psd = state.psd;
|
||||||
|
queryCache.groupid = state.groupid;
|
||||||
|
}
|
||||||
const handleConnect = () => {
|
const handleConnect = () => {
|
||||||
|
saveCache();
|
||||||
closeWebsocket();
|
closeWebsocket();
|
||||||
//initWebsocket(`ws://hk.cmonitor.snltty.com:1801`,state.apipsd);
|
//initWebsocket(`ws://hk.cmonitor.snltty.com:1801`,state.psd);
|
||||||
initWebsocket(`ws://${state.api}`,state.apipsd);
|
initWebsocket(`ws://${state.api}`,state.psd);
|
||||||
localStorage.setItem('api', state.api);
|
|
||||||
localStorage.setItem('apipsd', state.apipsd);
|
|
||||||
localStorage.setItem('groupid', state.groupid);
|
|
||||||
}
|
}
|
||||||
const handleUsername = () => {
|
const handleUsername = () => {
|
||||||
globalData.value.username = state.username || '';
|
saveCache();
|
||||||
globalData.value.groupid = state.groupid || '';
|
|
||||||
localStorage.setItem('username', globalData.value.username);
|
|
||||||
//localStorage.setItem('groupid', globalData.value.groupid);
|
|
||||||
//localStorage.setItem('apipsd', globalData.value.apipsd);
|
|
||||||
document.title = `班长-${globalData.value.username}`
|
document.title = `班长-${globalData.value.username}`
|
||||||
}
|
}
|
||||||
const handleChange = (value) => {
|
const handleChange = (value) => {
|
||||||
@@ -114,8 +113,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
handleUsername();
|
|
||||||
handleConnect();
|
|
||||||
_getRules();
|
_getRules();
|
||||||
|
|
||||||
_getConfig();
|
_getConfig();
|
||||||
@@ -123,6 +121,15 @@ export default {
|
|||||||
setTimeout(() => { state.showPort = true; }, 100);
|
setTimeout(() => { state.showPort = true; }, 100);
|
||||||
|
|
||||||
subWebsocketState((state) => { if (state) globalData.value.updateRuleFlag = Date.now(); });
|
subWebsocketState((state) => { if (state) globalData.value.updateRuleFlag = Date.now(); });
|
||||||
|
|
||||||
|
router.isReady().then(()=>{
|
||||||
|
state.api = route.query.api ?`${window.location.hostname}:${route.query.api}` : state.api;
|
||||||
|
state.psd = route.query.psd || state.psd;
|
||||||
|
state.groupid = route.query.groupid || state.groupid;
|
||||||
|
state.username = route.query.username || state.username;
|
||||||
|
handleUsername();
|
||||||
|
handleConnect();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ namespace cmonitor.config
|
|||||||
public int ShareMemoryCount { get; set; } = 100;
|
public int ShareMemoryCount { get; set; } = 100;
|
||||||
public int ShareMemorySize { get; set; } = 1024;
|
public int ShareMemorySize { get; set; } = 1024;
|
||||||
|
|
||||||
public int ApiPort { get; set; } = 1805;
|
public int ApiPort { get; set; } = 1803;
|
||||||
public string ApiPassword { get; set; } = "snltty";
|
public string ApiPassword { get; set; } = "snltty";
|
||||||
|
|
||||||
public int WebPort { get; set; } = 1806;
|
public int WebPort { get; set; } = 1804;
|
||||||
public string WebRoot { get; set; } = "./web-client/";
|
public string WebRoot { get; set; } = "./web-client/";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="favicon.ico" />
|
<Content Include="favicon.ico" />
|
||||||
|
<Content Include="plugins\wallpaper\bg.jpg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="favicon.ico" />
|
<EmbeddedResource Include="favicon.ico" />
|
||||||
@@ -60,6 +63,9 @@
|
|||||||
<EmbeddedResource Remove="Properties\**" />
|
<EmbeddedResource Remove="Properties\**" />
|
||||||
<None Remove="Properties\**" />
|
<None Remove="Properties\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="plugins\wallpaper\bg.jpg" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ManagedNativeWifi" Version="2.5.0" />
|
<PackageReference Include="ManagedNativeWifi" Version="2.5.0" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using cmonitor.plugins.tunnel.messenger;
|
using cmonitor.plugins.tunnel.messenger;
|
||||||
using cmonitor.plugins.tunnel.server;
|
|
||||||
using cmonitor.server;
|
using cmonitor.server;
|
||||||
using common.libs.extends;
|
using common.libs.extends;
|
||||||
using MemoryPack;
|
using MemoryPack;
|
||||||
@@ -42,21 +41,28 @@ namespace cmonitor.plugins.tunnel.compact
|
|||||||
|
|
||||||
public async Task<TunnelCompactIPEndPoint> GetUdpExternalIPAsync(IPEndPoint server)
|
public async Task<TunnelCompactIPEndPoint> GetUdpExternalIPAsync(IPEndPoint server)
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
/*
|
|
||||||
using UdpClient udpClient = new UdpClient();
|
using UdpClient udpClient = new UdpClient();
|
||||||
udpClient.Client.Reuse(true);
|
udpClient.Client.Reuse(true);
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
await udpClient.SendAsync(new byte[1] { 0 }, server);
|
await udpClient.SendAsync(new byte[1] { 0 }, server);
|
||||||
var result = await udpClient.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(5));
|
UdpReceiveResult result = await udpClient.ReceiveAsync().WaitAsync(TimeSpan.FromSeconds(500));
|
||||||
if (result.Buffer.Length == 0)
|
if (result.Buffer.Length == 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
IPEndPoint remoteEP = IPEndPoint.Parse(result.Buffer.AsSpan().GetString());
|
||||||
|
|
||||||
TunnelExternalIPInfo tunnelExternalIPInfo = MemoryPackSerializer.Deserialize<TunnelExternalIPInfo>(result.Buffer);
|
return new TunnelCompactIPEndPoint { Local = udpClient.Client.LocalEndPoint as IPEndPoint, Remote = remoteEP };
|
||||||
|
}
|
||||||
return new TunnelCompactIPEndPoint { Local = udpClient.Client.LocalEndPoint as IPEndPoint, Remote = tunnelExternalIPInfo.ExternalIP };
|
catch (Exception)
|
||||||
*/
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
public Action<object, Socket> OnTcpConnected { get; set; } = (state, socket) => { };
|
public Action<object, Socket> OnTcpConnected { get; set; } = (state, socket) => { };
|
||||||
public Action<object, UdpClient> OnUdpConnected { get; set; } = (state, udpClient) => { };
|
public Action<object, UdpClient> OnUdpConnected { get; set; } = (state, udpClient) => { };
|
||||||
|
|
||||||
private ConcurrentDictionary<int, SocketAsyncEventArgs> acceptBinds = new ConcurrentDictionary<int, SocketAsyncEventArgs>();
|
private ConcurrentDictionary<int, AsyncUserToken> acceptBinds = new ConcurrentDictionary<int, AsyncUserToken>();
|
||||||
|
|
||||||
public void Bind(IPEndPoint local, object state)
|
public void Bind(IPEndPoint local, object state)
|
||||||
{
|
{
|
||||||
@@ -36,7 +36,7 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
SocketFlags = SocketFlags.None,
|
SocketFlags = SocketFlags.None,
|
||||||
};
|
};
|
||||||
token.Saea = acceptEventArg;
|
token.Saea = acceptEventArg;
|
||||||
acceptBinds.AddOrUpdate(local.Port, acceptEventArg, (a, b) => acceptEventArg);
|
acceptBinds.AddOrUpdate(local.Port, token, (a, b) => token);
|
||||||
|
|
||||||
acceptEventArg.Completed += IO_Completed;
|
acceptEventArg.Completed += IO_Completed;
|
||||||
StartAccept(acceptEventArg);
|
StartAccept(acceptEventArg);
|
||||||
@@ -44,7 +44,7 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
|
|
||||||
socketUdp = new UdpClient();
|
socketUdp = new UdpClient();
|
||||||
socketUdp.Client.ReuseBind(new IPEndPoint(IPAddress.Any, local.Port));
|
socketUdp.Client.ReuseBind(new IPEndPoint(IPAddress.Any, local.Port));
|
||||||
socketUdp.Client.EnableBroadcast = true;
|
//socketUdp.Client.EnableBroadcast = true;
|
||||||
socketUdp.Client.WindowsUdpBug();
|
socketUdp.Client.WindowsUdpBug();
|
||||||
IAsyncResult result = socketUdp.BeginReceive(ReceiveCallbackUdp, state);
|
IAsyncResult result = socketUdp.BeginReceive(ReceiveCallbackUdp, state);
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
}
|
}
|
||||||
public void RemoveBind(int localPort)
|
public void RemoveBind(int localPort)
|
||||||
{
|
{
|
||||||
if (acceptBinds.TryRemove(localPort, out SocketAsyncEventArgs saea))
|
if (acceptBinds.TryRemove(localPort, out AsyncUserToken saea))
|
||||||
{
|
{
|
||||||
CloseClientSocket(saea);
|
CloseClientSocket(saea);
|
||||||
}
|
}
|
||||||
@@ -115,26 +115,21 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CloseClientSocket(SocketAsyncEventArgs e)
|
private void CloseClientSocket(AsyncUserToken token)
|
||||||
{
|
{
|
||||||
if (e == null || e.UserToken == null) return;
|
if (token == null) return;
|
||||||
|
|
||||||
AsyncUserToken token = e.UserToken as AsyncUserToken;
|
|
||||||
Socket socket = token.SourceSocket;
|
Socket socket = token.SourceSocket;
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
token.Clear();
|
token.Clear();
|
||||||
e.Dispose();
|
if (acceptBinds.TryRemove(token.LocalPort, out AsyncUserToken tk))
|
||||||
if (acceptBinds.TryRemove(token.LocalPort, out SocketAsyncEventArgs saea1))
|
|
||||||
{
|
{
|
||||||
CloseClientSocket(saea1);
|
CloseClientSocket(tk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public delegate Task OnTunnelData(AsyncUserToken token, Memory<byte> data);
|
|
||||||
public delegate Task OnTunnelUdpData(AsyncUserUdpToken token, IPEndPoint remote, Memory<byte> data);
|
|
||||||
public sealed class AsyncUserToken
|
public sealed class AsyncUserToken
|
||||||
{
|
{
|
||||||
public Socket SourceSocket { get; set; }
|
public Socket SourceSocket { get; set; }
|
||||||
@@ -147,20 +142,7 @@ namespace cmonitor.plugins.tunnel.server
|
|||||||
SourceSocket?.SafeClose();
|
SourceSocket?.SafeClose();
|
||||||
SourceSocket = null;
|
SourceSocket = null;
|
||||||
|
|
||||||
GC.Collect();
|
Saea?.Dispose();
|
||||||
}
|
|
||||||
}
|
|
||||||
public sealed class AsyncUserUdpToken
|
|
||||||
{
|
|
||||||
public UdpClient SourceSocket { get; set; }
|
|
||||||
public object State { get; set; }
|
|
||||||
public OnTunnelUdpData OnData { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
SourceSocket?.Close();
|
|
||||||
SourceSocket = null;
|
|
||||||
|
|
||||||
GC.Collect();
|
GC.Collect();
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
cmonitor/plugins/wallpaper/bg.jpg
Normal file
BIN
cmonitor/plugins/wallpaper/bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 515 KiB |
@@ -14,6 +14,13 @@ namespace cmonitor.plugins.wallpaper.report
|
|||||||
{
|
{
|
||||||
if (info.Open)
|
if (info.Open)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
string filename = Process.GetCurrentProcess().MainModule.FileName;
|
||||||
|
string dir = Path.GetDirectoryName(filename);
|
||||||
|
string file = Path.Combine(dir, "./plugins/wallpaper/bg.jpg");
|
||||||
|
User32.SystemParametersInfo(User32.SPI_SETDESKWALLPAPER, 0, file, User32.SPIF_UPDATEINIFILE | User32.SPIF_SENDCHANGE);
|
||||||
|
*/
|
||||||
|
|
||||||
CommandHelper.Windows(string.Empty, new string[] {
|
CommandHelper.Windows(string.Empty, new string[] {
|
||||||
$"start ./plugins/wallpaper/cmonitor.wallpaper.win.exe \"{info.ImgUrl}\" {config.Data.Client.ShareMemoryKey} {config.Data.Client.ShareMemoryCount} {config.Data.Client.ShareMemorySize} {(int)ShareMemoryIndexs.Keyboard} {(int)ShareMemoryIndexs.Wallpaper}"
|
$"start ./plugins/wallpaper/cmonitor.wallpaper.win.exe \"{info.ImgUrl}\" {config.Data.Client.ShareMemoryKey} {config.Data.Client.ShareMemoryCount} {config.Data.Client.ShareMemorySize} {(int)ShareMemoryIndexs.Keyboard} {(int)ShareMemoryIndexs.Wallpaper}"
|
||||||
},false);
|
},false);
|
||||||
|
|||||||
@@ -70,21 +70,7 @@ namespace cmonitor.server
|
|||||||
byte[] bytes = socketUdp.EndReceive(result, ref endPoint);
|
byte[] bytes = socketUdp.EndReceive(result, ref endPoint);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IPHostEntry entry = Dns.GetHostEntry(Dns.GetHostName());
|
await socketUdp.SendAsync(endPoint.ToString().ToBytes(), endPoint);
|
||||||
|
|
||||||
List<IPAddress> ips = entry.AddressList.Where(c => c.AddressFamily == AddressFamily.InterNetwork).Distinct().ToList();
|
|
||||||
Dictionary<IPAddress, BroadcastEndpointInfo> dic = new Dictionary<IPAddress, BroadcastEndpointInfo>();
|
|
||||||
foreach (var item in ips)
|
|
||||||
{
|
|
||||||
dic.Add(item, new BroadcastEndpointInfo
|
|
||||||
{
|
|
||||||
Web = config.Data.Server.WebPort,
|
|
||||||
Api = config.Data.Server.ApiPort,
|
|
||||||
Service = config.Data.Server.ServicePort
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
await socketUdp.SendAsync(dic.ToJson().ToBytes(), endPoint);
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace common.libs
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Windows(string fileName,string distPatth)
|
private static void Windows(string fileName,string distPath)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -52,11 +52,11 @@ cmd /c netsh advfirewall firewall add rule name=""{fileName}"" dir=in action=all
|
|||||||
cmd /c netsh advfirewall firewall add rule name=""{fileName}"" dir=in action=allow program=""%CD%\{fileName}.exe"" protocol=tcp enable=yes profile=private
|
cmd /c netsh advfirewall firewall add rule name=""{fileName}"" dir=in action=allow program=""%CD%\{fileName}.exe"" protocol=tcp enable=yes profile=private
|
||||||
cmd /c netsh advfirewall firewall add rule name=""{fileName}"" dir=in action=allow program=""%CD%\{fileName}.exe"" protocol=udp enable=yes profile=private
|
cmd /c netsh advfirewall firewall add rule name=""{fileName}"" dir=in action=allow program=""%CD%\{fileName}.exe"" protocol=udp enable=yes profile=private
|
||||||
:end";
|
:end";
|
||||||
if(Directory.Exists(distPatth) == false)
|
if(Directory.Exists(distPath) == false)
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(distPatth);
|
Directory.CreateDirectory(distPath);
|
||||||
}
|
}
|
||||||
string firewall = Path.Join(distPatth, "firewall.bat");
|
string firewall = Path.Join(distPath, "firewall.bat");
|
||||||
|
|
||||||
System.IO.File.WriteAllText(firewall, content);
|
System.IO.File.WriteAllText(firewall, content);
|
||||||
CommandHelper.Execute(firewall, string.Empty, new string[0]);
|
CommandHelper.Execute(firewall, string.Empty, new string[0]);
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ call npm run build
|
|||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
dotnet publish ./cmonitor.sas.service -c release -f net8.0 -o public/extends/ -r win-x64 -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true -p:TieredPGO=true -p:DebugType=none -p:DebugSymbols=false -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:DebuggerSupport=false -p:EnableUnsafeBinaryFormatterSerialization=false -p:EnableUnsafeUTF7Encoding=false -p:HttpActivityPropagationSupport=false -p:InvariantGlobalization=true -p:MetadataUpdaterSupport=false -p:UseSystemResourceKeys=true
|
dotnet publish ./cmonitor.sas.service -c release -f net8.0 -o public/extends/ -r win-x64 -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true -p:TieredPGO=true -p:DebugType=none -p:DebugSymbols=false -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:DebuggerSupport=false -p:EnableUnsafeBinaryFormatterSerialization=false -p:EnableUnsafeUTF7Encoding=false -p:HttpActivityPropagationSupport=false -p:InvariantGlobalization=true -p:MetadataUpdaterSupport=false -p:UseSystemResourceKeys=true
|
||||||
dotnet publish ./cmonitor.install.win -c release -f net8.0-windows -r win-x64 -o public/extends/ -p:PublishSingleFile=true --self-contained false
|
|
||||||
dotnet publish ./cmonitor.snatch.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/snatch -p:PublishSingleFile=true --self-contained false
|
dotnet publish ./cmonitor.snatch.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/snatch -p:PublishSingleFile=true --self-contained false
|
||||||
dotnet publish ./cmonitor.llock.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/llock -p:PublishSingleFile=true --self-contained false
|
dotnet publish ./cmonitor.llock.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/llock -p:PublishSingleFile=true --self-contained false
|
||||||
dotnet publish ./cmonitor.message.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/message -p:PublishSingleFile=true --self-contained false
|
dotnet publish ./cmonitor.message.win -c release -f net8.0-windows -r win-x64 -o public/extends/plugins/message -p:PublishSingleFile=true --self-contained false
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ dotnet publish ./cmonitor -c release -f net8.0 -r linux-x64 -o ./public/publish/
|
|||||||
for %%r in (win-x64,win-x64-any) do (
|
for %%r in (win-x64,win-x64-any) do (
|
||||||
echo F|xcopy "public\\extends\\*" "public\\publish\\%%r\\*" /s /f /h /y
|
echo F|xcopy "public\\extends\\*" "public\\publish\\%%r\\*" /s /f /h /y
|
||||||
echo F|xcopy "cmonitor.viewer.client.win\\dist\\*" "public\\publish\\%%r\\plugins\\viewer\\*" /s /f /h /y
|
echo F|xcopy "cmonitor.viewer.client.win\\dist\\*" "public\\publish\\%%r\\plugins\\viewer\\*" /s /f /h /y
|
||||||
|
echo F|xcopy "cmonitor.install.win\\dist\\*" "public\\publish\\%%r\\*" /s /f /h /y
|
||||||
)
|
)
|
||||||
|
|
||||||
for %%r in (linux-x64,linux-x64-any) do (
|
for %%r in (linux-x64,linux-x64-any) do (
|
||||||
|
|||||||
Reference in New Issue
Block a user