diff --git a/.gitignore b/.gitignore index a5fbb0cd..0d512725 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ node_modules /public/* /cmonitor.volume/x64/* /cmonitor.killer/x64/* -/x64/* +/x64/* \ No newline at end of file diff --git a/README.md b/README.md index a02812d8..5460a016 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ - [x] 发送命令,执行cmd命令,等等 ###### 互动 - [x] 互动答题 **winform** -- [x] 屏幕共享,以某一设备为主机,向其它设备共享屏幕,用于演示 **sharpDX** **第一次成功连接服务端后自动恢复** +- [x] 屏幕共享,以某一设备为主机,向其它设备共享屏幕,用于演示 **RDPSession+RDPViewer** **第一次成功连接服务端后自动恢复** ###### 壁纸 - [x] 壁纸程序,为所有设备设置统一壁纸,以程序的方式 **winform** **第一次成功连接服务端后自动恢复** - [x] 键盘按键,显示键盘按键(当前键盘按键由壁纸程序提供) **win api** @@ -97,7 +97,7 @@ 1. **【--server】** 服务器ip **192.168.1.18** 2. **【--service】** 服务端口 **1802** 3. **【--share-key】** 自定数据共享 **cmonitor/share** -4. **【--share-len】** 数量 **10**,默认10项位置,0保留,1键盘、2壁纸、3锁屏,4 SendSAS +4. **【--share-len】** 数量 **100**,默认100项位置,0保留,1键盘、2壁纸、3锁屏,4 SendSAS, 5 抢答问题, 6 抢答答案, 7 屏幕共享, 8 剪贴板 4. **【--share-item-len】** 每项数据长度 **1024**,attr(1)+version(8)+klen(4)+key(klen)+vlen(4)+value(vallen) ###### 服务端 diff --git a/cmonitor.clipboard.win/MainForm.Designer.cs b/cmonitor.clipboard.win/MainForm.Designer.cs new file mode 100644 index 00000000..fe0b3ecc --- /dev/null +++ b/cmonitor.clipboard.win/MainForm.Designer.cs @@ -0,0 +1,60 @@ +namespace cmonitor.clipboard.win +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + textBox1 = new TextBox(); + SuspendLayout(); + // + // textBox1 + // + textBox1.Location = new Point(12, 12); + textBox1.Multiline = true; + textBox1.Name = "textBox1"; + textBox1.Size = new Size(261, 287); + textBox1.TabIndex = 0; + // + // MainForm + // + AutoScaleDimensions = new SizeF(7F, 17F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(285, 450); + Controls.Add(textBox1); + Icon = (Icon)resources.GetObject("$this.Icon"); + Name = "MainForm"; + Text = "剪贴板"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private TextBox textBox1; + } +} diff --git a/cmonitor.clipboard.win/MainForm.cs b/cmonitor.clipboard.win/MainForm.cs new file mode 100644 index 00000000..db23c46d --- /dev/null +++ b/cmonitor.clipboard.win/MainForm.cs @@ -0,0 +1,138 @@ +using System.Runtime.InteropServices; + +namespace cmonitor.clipboard.win +{ + public partial class MainForm : Form + { + protected override CreateParams CreateParams + { + get + { + const int WS_EX_APPWINDOW = 0x40000; + const int WS_EX_TOOLWINDOW = 0x80; + CreateParams cp = base.CreateParams; + cp.ExStyle &= (~WS_EX_APPWINDOW); + cp.ExStyle |= WS_EX_TOOLWINDOW; + return cp; + } + } + + private IntPtr nextClipboardViewer; + const int WM_DRAWCLIPBOARD = 0x0308; + const uint CF_TEXT = 1; + const uint CF_HDROP = 15; + public MainForm() + { + StartPosition = FormStartPosition.CenterScreen; + MaximizeBox = false; + MinimizeBox = false; + + InitializeComponent(); + nextClipboardViewer = SetClipboardViewer(this.Handle); + } + + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + + if (m.Msg == WM_DRAWCLIPBOARD) + { + OnClipboardChanged(); + } + } + private void OnClipboardChanged() + { + if (OpenClipboard(IntPtr.Zero)) + { + uint format = 0; + while ((format = EnumClipboardFormats(format)) != 0) + { + switch (format) + { + case CF_TEXT: + HandleTextData(); + break; + case CF_HDROP: + HandleFileListData(); + break; + } + } + CloseClipboard(); + } + } + private void HandleTextData() + { + IntPtr clipboardData = GetClipboardData(CF_TEXT); + if (clipboardData != IntPtr.Zero) + { + string text = Marshal.PtrToStringAnsi(clipboardData); + this.Invoke(() => + { + textBox1.Text = text; + }); + } + } + private void HandleFileListData() + { + IntPtr clipboardData = GetClipboardData(CF_HDROP); + if (clipboardData != IntPtr.Zero) + { + IntPtr fileDropHandle = Marshal.ReadIntPtr(clipboardData); + uint fileCount = DragQueryFile(fileDropHandle, 0xFFFFFFFF, null, 0); + + List fileList = new List(); + for (uint i = 0; i < fileCount; i++) + { + uint bufferSize = DragQueryFile(fileDropHandle, i, null, 0) + 1; + char[] fileName = new char[bufferSize]; + + DragQueryFile(fileDropHandle, i, fileName, bufferSize); + string filePath = new string(fileName); + + fileList.Add(filePath); + } + + DragFinish(fileDropHandle); + + this.Invoke(() => + { + textBox1.Text = string.Join("\r\n", fileList); + }); + } + } + + + + [DllImport("user32.dll", SetLastError = true)] + static extern IntPtr SetClipboardViewer(IntPtr hWndNewViewer); + + [DllImport("user32.dll", SetLastError = true)] + static extern bool ChangeClipboardChain(IntPtr hWndRemove, IntPtr hWndNewNext); + + [DllImport("user32.dll", SetLastError = true)] + static extern IntPtr GetClipboardData(uint uFormat); + + [DllImport("user32.dll", SetLastError = true)] + static extern bool IsClipboardFormatAvailable(uint format); + [DllImport("user32.dll", SetLastError = true)] + static extern uint EnumClipboardFormats(uint format); + [DllImport("shell32.dll")] + static extern uint DragQueryFile(IntPtr hDrop, uint iFile, char[] lpszFile, uint cch); + + [DllImport("shell32.dll")] + static extern void DragFinish(IntPtr hDrop); + + [DllImport("user32.dll", SetLastError = true)] + static extern bool OpenClipboard(IntPtr hWndNewOwner); + + [DllImport("user32.dll", SetLastError = true)] + static extern bool CloseClipboard(); + + [DllImport("kernel32.dll")] + static extern IntPtr GlobalLock(IntPtr hMem); + + [DllImport("kernel32.dll")] + static extern bool GlobalUnlock(IntPtr hMem); + + } +} diff --git a/cmonitor.share.win/MainForm.resx b/cmonitor.clipboard.win/MainForm.resx similarity index 100% rename from cmonitor.share.win/MainForm.resx rename to cmonitor.clipboard.win/MainForm.resx diff --git a/cmonitor.clipboard.win/Program.cs b/cmonitor.clipboard.win/Program.cs new file mode 100644 index 00000000..33b81f43 --- /dev/null +++ b/cmonitor.clipboard.win/Program.cs @@ -0,0 +1,17 @@ +namespace cmonitor.clipboard.win +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new MainForm()); + } + } +} \ No newline at end of file diff --git a/cmonitor.share.win/app.manifest b/cmonitor.clipboard.win/app.manifest similarity index 100% rename from cmonitor.share.win/app.manifest rename to cmonitor.clipboard.win/app.manifest diff --git a/cmonitor.clipboard.win/cmonitor.clipboard.win.csproj b/cmonitor.clipboard.win/cmonitor.clipboard.win.csproj new file mode 100644 index 00000000..ceb9624d --- /dev/null +++ b/cmonitor.clipboard.win/cmonitor.clipboard.win.csproj @@ -0,0 +1,17 @@ + + + + WinExe + net7.0-windows;net8.0-windows + disable + true + enable + favicon.ico + app.manifest + + + + + + + \ No newline at end of file diff --git a/cmonitor.share.win/cmonitor.share.win.csproj.user b/cmonitor.clipboard.win/cmonitor.clipboard.win.csproj.user similarity index 100% rename from cmonitor.share.win/cmonitor.share.win.csproj.user rename to cmonitor.clipboard.win/cmonitor.clipboard.win.csproj.user diff --git a/cmonitor.share.win/favicon.ico b/cmonitor.clipboard.win/favicon.ico similarity index 100% rename from cmonitor.share.win/favicon.ico rename to cmonitor.clipboard.win/favicon.ico diff --git a/cmonitor.install.win/MainForm.Designer.cs b/cmonitor.install.win/MainForm.Designer.cs index de0c48af..2d0a8094 100644 --- a/cmonitor.install.win/MainForm.Designer.cs +++ b/cmonitor.install.win/MainForm.Designer.cs @@ -43,14 +43,6 @@ shareLen = new TextBox(); label6 = new Label(); shareKey = new TextBox(); - label7 = new Label(); - wallpaperIndex = new TextBox(); - label8 = new Label(); - keyboardIndex = new TextBox(); - label9 = new Label(); - llockIndex = new TextBox(); - label10 = new Label(); - sasIndex = new TextBox(); label11 = new Label(); machineName = new TextBox(); label12 = new Label(); @@ -60,7 +52,6 @@ label14 = new Label(); screenScale = new TextBox(); installBtn = new Button(); - label15 = new Label(); runBtn = new Button(); checkStateBtn = new Button(); label16 = new Label(); @@ -139,46 +130,6 @@ resources.ApplyResources(shareKey, "shareKey"); shareKey.Name = "shareKey"; // - // label7 - // - resources.ApplyResources(label7, "label7"); - label7.Name = "label7"; - // - // wallpaperIndex - // - resources.ApplyResources(wallpaperIndex, "wallpaperIndex"); - wallpaperIndex.Name = "wallpaperIndex"; - // - // label8 - // - resources.ApplyResources(label8, "label8"); - label8.Name = "label8"; - // - // keyboardIndex - // - resources.ApplyResources(keyboardIndex, "keyboardIndex"); - keyboardIndex.Name = "keyboardIndex"; - // - // label9 - // - resources.ApplyResources(label9, "label9"); - label9.Name = "label9"; - // - // llockIndex - // - resources.ApplyResources(llockIndex, "llockIndex"); - llockIndex.Name = "llockIndex"; - // - // label10 - // - resources.ApplyResources(label10, "label10"); - label10.Name = "label10"; - // - // sasIndex - // - resources.ApplyResources(sasIndex, "sasIndex"); - sasIndex.Name = "sasIndex"; - // // label11 // resources.ApplyResources(label11, "label11"); @@ -226,11 +177,6 @@ installBtn.UseVisualStyleBackColor = true; installBtn.Click += OnInstallClick; // - // label15 - // - resources.ApplyResources(label15, "label15"); - label15.Name = "label15"; - // // runBtn // resources.ApplyResources(runBtn, "runBtn"); @@ -263,7 +209,6 @@ Controls.Add(shareItemLen); Controls.Add(checkStateBtn); Controls.Add(runBtn); - Controls.Add(label15); Controls.Add(installBtn); Controls.Add(label14); Controls.Add(screenScale); @@ -273,14 +218,6 @@ Controls.Add(reportDelay); Controls.Add(label11); Controls.Add(machineName); - Controls.Add(label10); - Controls.Add(sasIndex); - Controls.Add(label9); - Controls.Add(llockIndex); - Controls.Add(label7); - Controls.Add(wallpaperIndex); - Controls.Add(label8); - Controls.Add(keyboardIndex); Controls.Add(label5); Controls.Add(shareLen); Controls.Add(label6); @@ -315,14 +252,6 @@ private System.Windows.Forms.TextBox shareLen; private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox shareKey; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox wallpaperIndex; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TextBox keyboardIndex; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox llockIndex; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox sasIndex; private System.Windows.Forms.Label label11; private System.Windows.Forms.TextBox machineName; private System.Windows.Forms.Label label12; @@ -332,7 +261,6 @@ private System.Windows.Forms.Label label14; private System.Windows.Forms.TextBox screenScale; private System.Windows.Forms.Button installBtn; - private System.Windows.Forms.Label label15; private System.Windows.Forms.Button runBtn; private System.Windows.Forms.Button checkStateBtn; diff --git a/cmonitor.install.win/MainForm.cs b/cmonitor.install.win/MainForm.cs index cb337e9a..52b1b6d6 100644 --- a/cmonitor.install.win/MainForm.cs +++ b/cmonitor.install.win/MainForm.cs @@ -1,8 +1,8 @@ using common.libs; +using common.libs.extends; using Microsoft.Win32; using System.Diagnostics; using System.Net; -using System.Text; namespace cmonitor.install.win { @@ -18,11 +18,6 @@ namespace cmonitor.install.win private void OnLoad(object sender, EventArgs e) { - keyboardIndex.ReadOnly = true; - wallpaperIndex.ReadOnly = true; - llockIndex.ReadOnly = true; - sasIndex.ReadOnly = true; - LoadConfig(); SaveConfig(); @@ -33,61 +28,50 @@ namespace cmonitor.install.win private void SaveConfig() { RegistryKey key = CheckRegistryKey(); - key.SetValue("modeClient", modeClient.Checked ? "1" : "0"); - key.SetValue("modeServer", modeServer.Checked ? "1" : "0"); - - key.SetValue("machineName", machineName.Text); - - key.SetValue("serverIP", serverIP.Text); - key.SetValue("serverPort", serverPort.Text); - key.SetValue("apiPort", apiPort.Text); - key.SetValue("webPort", webPort.Text); - - key.SetValue("reportDelay", reportDelay.Text); - key.SetValue("screenDelay", screenDelay.Text); - key.SetValue("screenScale", screenScale.Text); - - key.SetValue("shareKey", shareKey.Text); - key.SetValue("shareLen", shareLen.Text); - key.SetValue("shareItemLen", shareItemLen.Text); - - key.SetValue("keyboardIndex", keyboardIndex.Text); - key.SetValue("wallpaperIndex", wallpaperIndex.Text); - key.SetValue("llockIndex", llockIndex.Text); - key.SetValue("sasIndex", sasIndex.Text); - + key.SetValue("installParams", new ConfigInfo + { + Client = modeClient.Checked, + Server = modeServer.Checked, + MachineName = machineName.Text, + ServerEndpoint = new IPEndPoint(IPAddress.Parse(serverIP.Text), int.Parse(serverPort.Text)).ToString(), + ApiPort = int.Parse(apiPort.Text), + WebPort = int.Parse(webPort.Text), + ReportDelay = int.Parse(reportDelay.Text), + ScreenDelay = int.Parse(screenDelay.Text), + ScreenScale = double.Parse(screenScale.Text), + ShareKey = shareKey.Text, + ShareLen = int.Parse(shareLen.Text), + ShareSize = int.Parse(shareItemLen.Text), + }.ToJson()); } private void LoadConfig() { RegistryKey key = CheckRegistryKey(); - string hostname = Dns.GetHostName(); - modeClient.Checked = key.GetValue("modeClient", "0").ToString() == "1"; - modeServer.Checked = key.GetValue("modeServer", "0").ToString() == "1"; + ConfigInfo config = key.GetValue("installParams", "{}").ToString().DeJson(); - machineName.Text = key.GetValue("machineName", hostname).ToString(); + modeClient.Checked = config.Client; + modeServer.Checked = config.Server; - serverIP.Text = key.GetValue("serverIP", "127.0.0.1").ToString(); - serverPort.Text = key.GetValue("serverPort", "1802").ToString(); - apiPort.Text = key.GetValue("apiPort", "1801").ToString(); - webPort.Text = key.GetValue("webPort", "1800").ToString(); + machineName.Text = config.MachineName; - reportDelay.Text = key.GetValue("reportDelay", "30").ToString(); - screenDelay.Text = key.GetValue("screenDelay", "200").ToString(); - screenScale.Text = key.GetValue("screenScale", "0.2").ToString(); + IPEndPoint ep = IPEndPoint.Parse(config.ServerEndpoint); + serverIP.Text = ep.Address.ToString(); + serverPort.Text = ep.Port.ToString(); + apiPort.Text = config.ApiPort.ToString(); + webPort.Text = config.WebPort.ToString(); - shareKey.Text = key.GetValue("shareKey", "cmonitor/share").ToString(); - shareLen.Text = key.GetValue("shareLen", "10").ToString(); - shareItemLen.Text = key.GetValue("shareItemLen", "1024").ToString(); + reportDelay.Text = config.ReportDelay.ToString(); + screenDelay.Text = config.ScreenDelay.ToString(); + screenScale.Text = config.ScreenScale.ToString(); + + shareKey.Text = config.ShareKey; + shareLen.Text = config.ShareLen.ToString(); + shareItemLen.Text = config.ShareSize.ToString(); - keyboardIndex.Text = "1"; - wallpaperIndex.Text = "2"; - llockIndex.Text = "3"; - sasIndex.Text = "4"; } - private RegistryKey CheckRegistryKey() { Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\cmonitor", "test", 1); @@ -129,7 +113,7 @@ namespace cmonitor.install.win string dir = Path.GetDirectoryName(filename); string sasPath = Path.Combine(dir, exeName); - string sasIndexStr = sasIndex.Text; + string sasIndexStr = "4"; string shareKeyStr = shareKey.Text; string shareLenStr = shareLen.Text; @@ -255,26 +239,7 @@ namespace cmonitor.install.win MessageBox.Show("共享每项数据长度必填"); return false; } - if (string.IsNullOrWhiteSpace(keyboardIndex.Text)) - { - MessageBox.Show("键盘键下标必填"); - return false; - } - if (string.IsNullOrWhiteSpace(wallpaperIndex.Text)) - { - MessageBox.Show("壁纸键下标必填"); - return false; - } - if (string.IsNullOrWhiteSpace(llockIndex.Text)) - { - MessageBox.Show("锁屏键下标必填"); - return false; - } - if (string.IsNullOrWhiteSpace(sasIndex.Text)) - { - MessageBox.Show("sas键下标必填"); - return false; - } + installParams.Add($"--share-key {shareKey.Text}"); installParams.Add($"--share-len {shareLen.Text}"); installParams.Add($"--share-item-len {shareItemLen.Text}"); @@ -392,5 +357,22 @@ namespace cmonitor.install.win CheckInstall(); CheckRunning(); } + + public sealed class ConfigInfo + { + public bool Client { get; set; } + public bool Server { get; set; } + public string MachineName { get; set; } = Dns.GetHostName(); + public string ServerEndpoint { get; set; } = new IPEndPoint(IPAddress.Loopback, 1802).ToString(); + public int ApiPort { get; set; } = 1801; + public int WebPort { get; set; } = 1800; + public int ReportDelay { get; set; } = 30; + public int ScreenDelay { get; set; } = 200; + public double ScreenScale { get; set; } = 0.2; + public string ShareKey { get; set; } = "cmonitor/share"; + public int ShareLen { get; set; } = 100; + public int ShareSize { get; set; } = 1024; + + } } } diff --git a/cmonitor.install.win/MainForm.resx b/cmonitor.install.win/MainForm.resx index bedebe2b..f11cce8e 100644 --- a/cmonitor.install.win/MainForm.resx +++ b/cmonitor.install.win/MainForm.resx @@ -117,425 +117,284 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - - - - 18 - - - 检查状态 - - - 23 - - - True - - - - 63, 21 - - - 25 - - - $this - - - 7 - - - 27, 226 - - - serverIP - - - 34 - - - $this - - - 29 - - - 机器名 - - - 36, 53 - - - True - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - shareItemLen - - - 键盘键下标 - - - 9 - - - apiPort - - - 331, 378 - - - 32, 80 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - label6 - - - 27 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - label13 - - - 73, 17 - - - 8 - - - $this - - - 100, 23 - - - 7, 17 - - - 100, 23 - - - True - - - 4 - - - 63, 21 - - - 68, 17 - - - 223, 80 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 73, 17 - - - 36 - - - 35 - - - 100, 23 - - - label16 - - - 数据数量 - - - webPort - - - 11 - - - 294, 302 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 截屏间隔ms - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 共享数据键 - - - machineName - - - label11 - - - 68, 17 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 100, 23 - - - $this - - - $this - - - 壁纸键下标 - - - 100, 23 - - - 11 - - - $this - - - 0 - - - label5 - - - 56, 17 - - - 80, 17 - - - System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - 294, 102 - - - True - - - 服务端端口 - - - 219, 22 - - - 32 - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17 - - - 5 - - - 14 - - - 27, 307 - - - 294, 276 - - - 0 - - - $this - - - label14 - - - 15 - - - checkStateBtn - - - reportDelay - - - True - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 100, 23 - - - 100, 23 - - - SAS键下标 - - - sasIndex - - - 3 - - - $this - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + 22 - - 100, 23 - - - 294, 150 - - - 21 - - - 100, 23 - - - shareLen - - - 100, 23 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 201, 372 - - - label2 - - - 27 - - - 106, 102 - - - 16 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 372, 23 - - - label1 - - - 12 - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 服务端IP + + + 100, 23 - - label7 - - - 报告间隔ms - - + $this - - 30 - - - True + + 22, 337 + 23 - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label4 - - 106, 222 + + True - - 23, 106 + + 3 - - runBtn + + 20 - + + 8 + + + 219, 22 + + + 15 + + + 21 + + 100, 23 - - 114, 372 + + 213, 333 - - 32 + + 56, 17 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 7 + + + web端口 + + + machineName + + + 壁纸键下标 + + + label17 + + + 27, 154 + + + label5 + + + 36, 53 + + + 19 + + + True + + + 24 + + + $this + + + 331, 378 + + + label14 + + + $this + + + 锁屏键下标 + + + 80, 17 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label2 + + + 停止运行 + + + $this + + + 22 + + + 3 + + + $this + + + $this True - + + 19 + + + label10 + + + 156, 21 + + + 372, 23 + + + 21 + + + 15, 334 + + + 220, 154 + + + SAS键下标 + + + 3 + + + 4 + + + 106, 49 + + + 294, 102 + + + 100, 23 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + reportDelay + + $this + + label9 + + + 25 + + + $this + + + 39 + + + 16 + + + $this + + + 106, 222 + + + 68, 17 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 40 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + cmonitor安装工具 + + + wallpaperIndex + + + $this + + + 294, 76 + + + 32, 80 + + + 34 + + + 6 + + + $this + + + 201, 372 + + + $this + + + label15 + + + $this + + + 66, 17 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + 服务端IP + AAABAAEAAAAAAAEAIABdQAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAQCRJ @@ -815,476 +674,695 @@ lbj4VzZ7T6Ce2eKyfeTF92Tj/y+1yov7XH58jUaj0Wg0Gk2v5P8D5M/bzdE8cNIAAAAASUVORK5CYII= - - 81, 35 - - - keyboardIndex - - - 9 - - - 管理接口端口 - - - 20 - - - $this - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - 1 - - - 80, 17 - - - 106, 276 - - - 安装自启动 + + 63, 21 55, 17 - - 33 + + 56, 17 + + + 41, 253 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + $this + + + modeClient + + + 106, 177 + + + $this + + + 2 + + + $this + + + 22 + + + runBtn + + + 截屏间隔ms + + + 100, 23 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 26 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 100, 23 + + + 20, 181 + + + $this + + + $this + + + 106, 76 installBtn - - screenDelay + + 100, 23 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + keyboardIndex + + + 0 $this - - True + + 管理接口端口 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 21 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 232, 106 + + + 客户端 + + + serverIP + + + 294, 276 19 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 156, 21 - - - 服务端 + + 10 75, 23 - + + 4 + + + 共享数据键 + + + 27, 226 + + $this - - 68, 17 + + 106, 249 - - label3 + + 7, 17 - - 18 + + 服务端端口 - - 227, 306 + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 13 + + 24 - + $this - + + 23 + + + sasIndex + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + apiPort + + + 80, 17 + + + modeServer + + + 0 + + + 8 + + + 106, 331 + + + 5 + + + 100, 23 + + + serverPort + + + label1 + + + 13 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + llockIndex + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 29 - - 17 + + label3 - - label15 + + 294, 330 - - modeClient - - + $this - + + 211, 253 + + + 11 + + + MiddleCenter + + + 每项255长度,0项保留不可用 + + + True + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 44, 17 + + + 14 + + + True + + + 100, 23 + + + label7 + + + MainForm + + + 2 + + + 25 + + + 18 + + + 17 + + + True + + + 机器名 + + + shareLen + + + $this + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this + + + checkStateBtn + + + label11 + + + 安装自启动 + + + 检查状态 + + + 100, 23 + + + 服务端 + + + $this + + + 30 + True - - 25 + + 15 - + $this - - 3 + + 17 - - 16 + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 20 + + 18 - - 2 + + True - - 8 + + 294, 249 - - 68, 17 + + $this - - 20, 181 + + 81, 35 - - 106, 177 + + 63, 21 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 18 $this - + + 294, 302 + + True + + 33 + + + 5 + + + True + + + 81, 35 + + + 23 + + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + + + 223, 80 + 截屏缩放比例 - - 106, 76 + + 80, 17 - - 68, 17 + + 100, 23 - + + questionIndex + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 每项数据长度 + + 26 - + + 13 + + + 7 + + 6 31 - - $this - - - 每项255长度,0项保留不可用 - - - 客户端 - - - 35 - - - True - - - 106, 49 - - - 232, 106 - - - web端口 - - - 28 - - - cmonitor安装工具 - - - 211, 253 - - - $this - - - 1 - - - 21 - - - 34 - - - label10 - - - 4 - - - 106, 249 - - - 5 - - - label4 - - - 22 - - - 24 - - - True - - - 12 - - - 22, 337 - - - modeServer - - - 停止运行 - - - $this - - - 26 - - - 33 - - - 294, 249 - - - 28 - - - $this - - + 100, 23 - - 80, 17 + + 27 - + + System.Windows.Forms.CheckBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - $this + + 106, 102 - - $this + + 20 - - $this + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label12 + + 68, 17 - - 10 + + 14 - - 30 - - - 27, 154 - - - 41, 253 + + 1 27, 280 - - wallpaperIndex + + True + + + 100, 23 + + + 报告间隔ms + + + $this + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 73, 17 + + + 16 + + + 11 + + + 106, 276 + + + 100, 23 + + + 68, 17 + + + shareKey System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + 68, 17 - - 7 + + 418, 420 - - 44, 17 + + answerIndex - - 锁屏键下标 + + 73, 17 - - 14 + + 23, 106 - - llockIndex - - - 2 - - - $this - - - 100, 23 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - serverPort - - - True - - + 100, 23 225, 280 - - $this + + 20 - - 66, 17 + + 1 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label6 - - $this + + 28 - - label8 + + shareItemLen - - 24 + + True - - $this - - - screenScale - - - 418, 420 - - - MainForm - - - 81, 35 - - - $this - - - 106, 303 - - - 26 - - - 19 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 100, 23 System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label9 + + 27, 307 + + + $this 106, 150 - - $this + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + + + 106, 303 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 键盘键下标 + + + screenDelay + + + 294, 150 + + + 1 + + + label8 + + + 114, 372 + + + 25 + + + webPort + + + label16 + + + 38 + + + label18 + + + 2 + + + 37 + + + 8 System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - MiddleCenter + + screenScale - - System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 32 - + $this - - 220, 154 + + 数据数量 - - 15 + + $this - + + label13 + + 100, 23 - - shareKey + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + 68, 17 + + + 36 + + + $this + + + $this + + + 每项数据长度 + + + label12 + + + $this + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - - 13 + + 35 - - 6 + + $this - - 56, 17 + + $this - - 294, 76 + + 24 - - 31 + + 9 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 227, 306 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 100, 23 + + + 9 True diff --git a/cmonitor.install.win/MainForm.zh-Hans.resx b/cmonitor.install.win/MainForm.zh-Hans.resx index f19539c4..b44e218a 100644 --- a/cmonitor.install.win/MainForm.zh-Hans.resx +++ b/cmonitor.install.win/MainForm.zh-Hans.resx @@ -117,10 +117,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 每项1024长度,0项保留不可用 - + + 193, 290 + + + 106, 290 + + + 323, 296 + + + 418, 334 + AAABAAEAAAAAAAEAIABdQAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAQCRJ diff --git a/cmonitor.libs/IShareMemory.cs b/cmonitor.libs/IShareMemory.cs index 37ce7d9b..94a9fc5a 100644 --- a/cmonitor.libs/IShareMemory.cs +++ b/cmonitor.libs/IShareMemory.cs @@ -2,6 +2,7 @@ namespace cmonitor.libs { + //1 attr + 8 version + 4 klen + key + 4 vlen + val internal interface IShareMemory { public bool Init(); diff --git a/cmonitor.libs/ShareMemory.cs b/cmonitor.libs/ShareMemory.cs index 7752d249..d15e2a4f 100644 --- a/cmonitor.libs/ShareMemory.cs +++ b/cmonitor.libs/ShareMemory.cs @@ -2,6 +2,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -71,7 +72,7 @@ namespace cmonitor.libs { try { - if (OperatingSystem.IsWindows() && accessorGlobal == null) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && accessorGlobal == null) { gloablBytes = new byte[bytes.Length]; accessorGlobal = ShareMemoryFactory.Create($"Global\\{key}", length, itemSize); @@ -462,11 +463,13 @@ namespace cmonitor.libs 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 = accessor.ReadInt64(index * itemSize + shareMemoryVersionIndex); - accessor.WriteInt64(index * itemSize + shareMemoryVersionIndex, version + 1); + + long version = (long)(DateTime.UtcNow.Subtract(startTime)).TotalMilliseconds; + accessor.WriteInt64(index * itemSize + shareMemoryVersionIndex, version); } private long ReadVersion(IShareMemory accessor, int index) { @@ -548,9 +551,36 @@ namespace cmonitor.libs 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; + + /// + /// 255长度 + /// + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)] + public byte[] Key; + + public byte ValLength; + + /// + /// 9966长度 + /// + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9966)] + public byte[] Value; + } + public sealed class ShareItemAttributeChanged { public Action Action { get; set; } diff --git a/cmonitor.libs/ShareMemoryFactory.cs b/cmonitor.libs/ShareMemoryFactory.cs index 852aafb3..0f4205e0 100644 --- a/cmonitor.libs/ShareMemoryFactory.cs +++ b/cmonitor.libs/ShareMemoryFactory.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.InteropServices; namespace cmonitor.libs { @@ -6,15 +7,15 @@ namespace cmonitor.libs { public static IShareMemory Create(string key, int length, int itemSize) { - if (OperatingSystem.IsWindows()) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return new ShareMemoryWindows(key, length, itemSize); } - else if (OperatingSystem.IsLinux()) + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { return new ShareMemoryLinux(key, length, itemSize); } - else if (OperatingSystem.IsMacOS()) + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return new ShareMemoryMacOS(key, length, itemSize); } diff --git a/cmonitor.libs/ShareMemoryWindows.cs b/cmonitor.libs/ShareMemoryWindows.cs index 0c9ab521..623bce8c 100644 --- a/cmonitor.libs/ShareMemoryWindows.cs +++ b/cmonitor.libs/ShareMemoryWindows.cs @@ -2,7 +2,6 @@ using System.IO; using System.IO.MemoryMappedFiles; using System.Runtime.InteropServices; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace cmonitor.libs { @@ -25,7 +24,7 @@ namespace cmonitor.libs { try { - if (accessorLocal == null && OperatingSystem.IsWindows()) + if (accessorLocal == null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { mmfLocal = MemoryMappedFile.CreateOrOpen($"{key}", length * itemSize, MemoryMappedFileAccess.ReadWriteExecute, MemoryMappedFileOptions.None, HandleInheritability.None); diff --git a/cmonitor.libs/cmonitor.libs.csproj b/cmonitor.libs/cmonitor.libs.csproj index b832ba5f..6cabcf5f 100644 --- a/cmonitor.libs/cmonitor.libs.csproj +++ b/cmonitor.libs/cmonitor.libs.csproj @@ -2,7 +2,7 @@ Library - net7.0;net8.0 + net7;net8 false true Debug;Release diff --git a/cmonitor.llock.win/Hook.cs b/cmonitor.llock.win/Hook.cs deleted file mode 100644 index fed51672..00000000 --- a/cmonitor.llock.win/Hook.cs +++ /dev/null @@ -1,175 +0,0 @@ -using common.libs; -using Microsoft.Win32; -using System.Runtime.InteropServices; - -namespace cmonitor.llock.win -{ - internal class Hook : IDisposable - { - 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); - - public void Start() - { - // 安装键盘钩子 - if (hHook == 0) - { - KeyBoardHookProcedure = new HookProc(KeyBoardHookProc); - hHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyBoardHookProcedure, GetModuleHandle(null), 0); - //如果设置钩子失败. - if (hHook == 0) - Close(); - else - { - try - { - foreach (string user in Registry.Users.GetSubKeyNames()) - { - RegistryKey key = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key == null) - key = Registry.Users.OpenSubKey(user, true).CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); - - RegistryKey key1 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key1 == null) - key1 = Registry.LocalMachine.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); - - //任务管理器 - key.SetValue("DisableTaskMgr", 1, RegistryValueKind.DWord); - key1.SetValue("DisableTaskMgr", 1, RegistryValueKind.DWord); - //锁定 - key.SetValue("DisableLockWorkstation", 1, RegistryValueKind.DWord); - key1.SetValue("DisableLockWorkstation", 1, RegistryValueKind.DWord); - //切换用户 - key.SetValue("HideFastUserSwitching", 1, RegistryValueKind.DWord); - key1.SetValue("HideFastUserSwitching", 1, RegistryValueKind.DWord); - //修改密码 - key.SetValue("DisableChangePassword", 1, RegistryValueKind.DWord); - key1.SetValue("DisableChangePassword", 1, RegistryValueKind.DWord); - //关机 - key.SetValue("ShutdownWithoutLogon", 0, RegistryValueKind.DWord); - key1.SetValue("ShutdownWithoutLogon", 0, RegistryValueKind.DWord); - //注销 - key.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - key1.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - - - - key.Close(); - key1.Close(); - - //注销 - RegistryKey zxKey = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); - if (zxKey == null) - zxKey = Registry.Users.OpenSubKey(user, true).CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"); - zxKey.SetValue("NoLogOff", 1, RegistryValueKind.DWord); - zxKey.SetValue("NoClose", 1, RegistryValueKind.DWord); - zxKey.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - zxKey.Close(); - } - } - catch (Exception) - { - } - Task.Run(() => - { - CommandHelper.Windows(string.Empty, new string[] { "gpupdate /force" }); - }); - } - } - } - public void Close() - { - if (hHook != 0) - { - UnhookWindowsHookEx(hHook); - hHook = 0; - } - try - { - foreach (string user in Registry.Users.GetSubKeyNames()) - { - RegistryKey key = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - RegistryKey key1 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key != null) - { - key.DeleteValue("DisableTaskMgr", false); - key1.DeleteValue("DisableTaskMgr", false); - key.DeleteValue("DisableLockWorkstation", false); - key1.DeleteValue("DisableLockWorkstation", false); - key.DeleteValue("HideFastUserSwitching", false); - key1.DeleteValue("HideFastUserSwitching", false); - key.DeleteValue("DisableChangePassword", false); - key1.DeleteValue("DisableChangePassword", false); - key.DeleteValue("ShutdownWithoutLogon", false); - key1.DeleteValue("ShutdownWithoutLogon", false); - key.DeleteValue("StartMenuLogoff", false); - key1.DeleteValue("StartMenuLogoff", false); - - - key.Close(); - key1.Close(); - } - - RegistryKey zxKey = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); - if (zxKey != null) - { - zxKey.DeleteValue("NoLogOff", false); - zxKey.DeleteValue("NoClose", false); - zxKey.DeleteValue("StartMenuLogoff", false); - zxKey.Close(); - } - } - } - catch (Exception) - { - } - CommandHelper.Windows(string.Empty, new string[] { "gpupdate /force" }, false); - } - private int KeyBoardHookProc(int nCode, int wParam, IntPtr lParam) - { - if (nCode >= 0) - { - return 1; - } - return CallNextHookEx(hHook, nCode, wParam, lParam); - } - - #region IDisposable 成员 - public void Dispose() - { - Close(); - } - - private struct tagMSG - { - public int hwnd; - public uint message; - public int wParam; - public long lParam; - public uint time; - public int pt; - } - [DllImport("user32.dll")] - private static extern int GetMessage(ref tagMSG lpMsg, int a, int hwnd, int wMsgFilterMax); - #endregion - } -} diff --git a/cmonitor.llock.win/MainForm.cs b/cmonitor.llock.win/MainForm.cs index d53cfa73..6e025bd0 100644 --- a/cmonitor.llock.win/MainForm.cs +++ b/cmonitor.llock.win/MainForm.cs @@ -1,4 +1,5 @@ using cmonitor.libs; +using common.libs; using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; @@ -24,7 +25,7 @@ namespace cmonitor.llock.win return cp; } } - + public MainForm(string shareMkey, int shareMLength, int shareItemMLength, int shareIndex) { this.shareIndex = shareIndex; @@ -61,7 +62,7 @@ namespace cmonitor.llock.win private void OnLoad(object sender, EventArgs e) { - hook.Start(); + hook.Start((code) => { return true; }); #if RELEASE this.WindowState = FormWindowState.Maximized; #endif @@ -119,7 +120,6 @@ namespace cmonitor.llock.win private void CloseClear() { shareMemory.RemoveAttribute(shareIndex, ShareMemoryAttribute.Running); - shareMemory.Update(this.shareIndex, keyBytes, BitConverter.GetBytes((long)0)); cancellationTokenSource.Cancel(); hook.Close(); @@ -132,14 +132,13 @@ namespace cmonitor.llock.win } private DateTime startTime = new DateTime(1970, 1, 1); - private byte[] keyBytes = Encoding.UTF8.GetBytes("LLock"); private long lastTime = 0; private void WriteLLock() { long time = (long)(DateTime.UtcNow.Subtract(startTime)).TotalMilliseconds; if (time - lastTime >= 800) { - shareMemory.Update(this.shareIndex, keyBytes, BitConverter.GetBytes(time)); + shareMemory.IncrementVersion(shareIndex); lastTime = time; } } diff --git a/cmonitor.llock.win/Program.cs b/cmonitor.llock.win/Program.cs index 248140eb..11901b89 100644 --- a/cmonitor.llock.win/Program.cs +++ b/cmonitor.llock.win/Program.cs @@ -1,3 +1,8 @@ +using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Security.AccessControl; + namespace cmonitor.llock.win { internal static class Program @@ -13,15 +18,16 @@ namespace cmonitor.llock.win { Environment.Exit(1); } + //ProcessProtection.ProtectProcess(); AppDomain.CurrentDomain.UnhandledException += (a, b) => { }; - string shareMkey = arg[0]; - int shareMLength = int.Parse(arg[1]); - int shareItemMLength = int.Parse(arg[2]); - int shareIndex = int.Parse(arg[3]); + string shareMkey = "cmonitor/share"; + int shareMLength = 100; + int shareItemMLength = 10240; + int shareIndex = 3; if (arg.Length > 0) { @@ -36,4 +42,82 @@ namespace cmonitor.llock.win Application.Run(new MainForm(shareMkey, shareMLength, shareItemMLength, shareIndex)); } } + + class ProcessProtection + { + [DllImport("ntdll.dll", SetLastError = true)] + private static extern int NtSetInformationProcess(IntPtr hProcess, int processInformationClass, ref int processInformation, int processInformationLength); + + [DllImport("ntdll.dll", SetLastError = true)] + private static extern IntPtr RtlAdjustPrivilege(int Privilege, bool bEnablePrivilege, bool IsThreadPrivilege, out bool PreviousValue); + + [DllImport("ntdll.dll")] + private static extern uint NtRaiseHardError( + uint ErrorStatus, + uint NumberOfParameters, + uint UnicodeStringParameterMask, + IntPtr Parameters, + uint ValidResponseOption, + out uint Response + ); + + private static bool IsDebugMode = false; + + public static void ProtectProcess() + { + int isCritical = 1; + int BreakOnTermination = 0x1D; + if (!IsDebugMode) + { + Process.EnterDebugMode(); + IsDebugMode = true; + } + NtSetInformationProcess(Process.GetCurrentProcess().Handle, BreakOnTermination, ref isCritical, sizeof(int)); + } + + public static void ProtectProcess(Process target) + { + int isCritical = 1; + int BreakOnTermination = 0x1D; + if (!IsDebugMode) + { + Process.EnterDebugMode(); + IsDebugMode = true; + } + NtSetInformationProcess(target.Handle, BreakOnTermination, ref isCritical, sizeof(int)); + } + + public static void UnprotectProcess() + { + int isCritical = 0; + int BreakOnTermination = 0x1D; + if (!IsDebugMode) + { + Process.EnterDebugMode(); + IsDebugMode = true; + } + NtSetInformationProcess(Process.GetCurrentProcess().Handle, BreakOnTermination, ref isCritical, sizeof(int)); + } + + public static void UnprotectProcess(Process target) + { + int isCritical = 0; + int BreakOnTermination = 0x1D; + if (!IsDebugMode) + { + Process.EnterDebugMode(); + IsDebugMode = true; + } + NtSetInformationProcess(target.Handle, BreakOnTermination, ref isCritical, sizeof(int)); + } + + public static void BSOD() + { + bool b; + uint response; + uint STATUS_ASSERTION_FAILURE = 0xC0000420; + RtlAdjustPrivilege(19, true, false, out b); + NtRaiseHardError(STATUS_ASSERTION_FAILURE, 0, 0, IntPtr.Zero, 6, out response); + } + } } \ No newline at end of file diff --git a/cmonitor.share.win/Hook.cs b/cmonitor.share.win/Hook.cs deleted file mode 100644 index d3aa6b29..00000000 --- a/cmonitor.share.win/Hook.cs +++ /dev/null @@ -1,175 +0,0 @@ -using common.libs; -using Microsoft.Win32; -using System.Runtime.InteropServices; - -namespace cmonitor.share.win -{ - internal class Hook : IDisposable - { - 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); - - public void Start() - { - // 安装键盘钩子 - if (hHook == 0) - { - KeyBoardHookProcedure = new HookProc(KeyBoardHookProc); - hHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyBoardHookProcedure, GetModuleHandle(null), 0); - //如果设置钩子失败. - if (hHook == 0) - Close(); - else - { - try - { - foreach (string user in Registry.Users.GetSubKeyNames()) - { - RegistryKey key = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key == null) - key = Registry.Users.OpenSubKey(user, true).CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); - - RegistryKey key1 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key1 == null) - key1 = Registry.LocalMachine.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); - - //任务管理器 - key.SetValue("DisableTaskMgr", 1, RegistryValueKind.DWord); - key1.SetValue("DisableTaskMgr", 1, RegistryValueKind.DWord); - //锁定 - key.SetValue("DisableLockWorkstation", 1, RegistryValueKind.DWord); - key1.SetValue("DisableLockWorkstation", 1, RegistryValueKind.DWord); - //切换用户 - key.SetValue("HideFastUserSwitching", 1, RegistryValueKind.DWord); - key1.SetValue("HideFastUserSwitching", 1, RegistryValueKind.DWord); - //修改密码 - key.SetValue("DisableChangePassword", 1, RegistryValueKind.DWord); - key1.SetValue("DisableChangePassword", 1, RegistryValueKind.DWord); - //关机 - key.SetValue("ShutdownWithoutLogon", 0, RegistryValueKind.DWord); - key1.SetValue("ShutdownWithoutLogon", 0, RegistryValueKind.DWord); - //注销 - key.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - key1.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - - - - key.Close(); - key1.Close(); - - //注销 - RegistryKey zxKey = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); - if (zxKey == null) - zxKey = Registry.Users.OpenSubKey(user, true).CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"); - zxKey.SetValue("NoLogOff", 1, RegistryValueKind.DWord); - zxKey.SetValue("NoClose", 1, RegistryValueKind.DWord); - zxKey.SetValue("StartMenuLogOff", 1, RegistryValueKind.DWord); - zxKey.Close(); - } - } - catch (Exception) - { - } - Task.Run(() => - { - CommandHelper.Windows(string.Empty, new string[] { "gpupdate /force" }); - }); - } - } - } - public void Close() - { - if (hHook != 0) - { - UnhookWindowsHookEx(hHook); - hHook = 0; - } - try - { - foreach (string user in Registry.Users.GetSubKeyNames()) - { - RegistryKey key = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - RegistryKey key1 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true); - if (key != null) - { - key.DeleteValue("DisableTaskMgr", false); - key1.DeleteValue("DisableTaskMgr", false); - key.DeleteValue("DisableLockWorkstation", false); - key1.DeleteValue("DisableLockWorkstation", false); - key.DeleteValue("HideFastUserSwitching", false); - key1.DeleteValue("HideFastUserSwitching", false); - key.DeleteValue("DisableChangePassword", false); - key1.DeleteValue("DisableChangePassword", false); - key.DeleteValue("ShutdownWithoutLogon", false); - key1.DeleteValue("ShutdownWithoutLogon", false); - key.DeleteValue("StartMenuLogoff", false); - key1.DeleteValue("StartMenuLogoff", false); - - - key.Close(); - key1.Close(); - } - - RegistryKey zxKey = Registry.Users.OpenSubKey(user, true).OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); - if (zxKey != null) - { - zxKey.DeleteValue("NoLogOff", false); - zxKey.DeleteValue("NoClose", false); - zxKey.DeleteValue("StartMenuLogoff", false); - zxKey.Close(); - } - } - } - catch (Exception) - { - } - CommandHelper.Windows(string.Empty, new string[] { "gpupdate /force" }, false); - } - private int KeyBoardHookProc(int nCode, int wParam, IntPtr lParam) - { - if (nCode >= 0) - { - return 1; - } - return CallNextHookEx(hHook, nCode, wParam, lParam); - } - - #region IDisposable 成员 - public void Dispose() - { - Close(); - } - - private struct tagMSG - { - public int hwnd; - public uint message; - public int wParam; - public long lParam; - public uint time; - public int pt; - } - [DllImport("user32.dll")] - private static extern int GetMessage(ref tagMSG lpMsg, int a, int hwnd, int wMsgFilterMax); - #endregion - } -} diff --git a/cmonitor.share.win/Interop.RDPCOMAPILib.dll b/cmonitor.share.win/Interop.RDPCOMAPILib.dll deleted file mode 100644 index da44ee70..00000000 Binary files a/cmonitor.share.win/Interop.RDPCOMAPILib.dll and /dev/null differ diff --git a/cmonitor.share.win/MainForm.cs b/cmonitor.share.win/MainForm.cs deleted file mode 100644 index 4b7df77b..00000000 --- a/cmonitor.share.win/MainForm.cs +++ /dev/null @@ -1,100 +0,0 @@ -using cmonitor.libs; -using RDPCOMAPILib; -using System.Diagnostics; - -namespace cmonitor.share.win -{ - public partial class MainForm : Form - { - protected override CreateParams CreateParams - { - get - { - const int WS_EX_APPWINDOW = 0x40000; - const int WS_EX_TOOLWINDOW = 0x80; - CreateParams cp = base.CreateParams; - cp.ExStyle &= (~WS_EX_APPWINDOW); - cp.ExStyle |= WS_EX_TOOLWINDOW; - return cp; - } - } - - private readonly Hook hook = new Hook(); - private readonly ShareMemory shareMemory; - private readonly byte[] bytes; - private long version = 0; - public MainForm(string key, int size) - { - InitializeComponent(); - - bytes = new byte[size]; - shareMemory = new ShareMemory(key, 1, size); - shareMemory.InitLocal(); - } - - private void OnLoad(object sender, EventArgs e) - { -#if RELEASE - this.FormBorderStyle = FormBorderStyle.None; - this.ShowInTaskbar = false; - this.WindowState = FormWindowState.Maximized; -#endif - TopMost = true; - CheckRunning(); - } - - private void CheckRunning() - { - hook.Start(); - shareMemory.AddAttribute(0, ShareMemoryAttribute.Running); - Task.Run(async () => - { - while (true) - { - try - { - if (shareMemory.ReadAttributeEqual(0, ShareMemoryAttribute.Closed)) - { - shareMemory.RemoveAttribute(0, ShareMemoryAttribute.Running); - hook.Close(); - Application.ExitThread(); - Application.Exit(); - Process.GetCurrentProcess().Kill(); - } - } - catch (Exception) - { - } - await Task.Delay(1000); - } - - }); - } - - private void OpenShareDesktop() - { - RDPSession session = new RDPSession(); - session.OnAttendeeConnected += Session_OnAttendeeConnected; - // 湲 - session.Open(); - - IRDPSRAPIInvitation invitation = session.Invitations.CreateInvitation("Ȩ", "ҵĹỰ", "123", 1024); - string invitationString = invitation.ConnectionString; - - Console.WriteLine("뽫ַṩԶ̿ͻˣ"); - Console.WriteLine(invitationString); - - // ȴرմ - Console.WriteLine("ر..."); - Console.ReadKey(); - - session.Close(); - } - private void Session_OnAttendeeConnected(object pAttendee) - { - IRDPSRAPIAttendee attendee = (IRDPSRAPIAttendee)pAttendee; - // ÿͻ˷ȨΪ ViewOnly - attendee.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_VIEW; - } - } -} diff --git a/cmonitor.sln b/cmonitor.sln index d97db013..de5e85cc 100644 --- a/cmonitor.sln +++ b/cmonitor.sln @@ -23,10 +23,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.message.win", "cmo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.snatch.win", "cmonitor.snatch.win\cmonitor.snatch.win.csproj", "{5267B401-6818-407C-8323-E6C8A3CC01D6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.share.win", "cmonitor.share.win\cmonitor.share.win.csproj", "{AB10024E-9307-4231-872E-3564A57BA035}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.viewer.server.win", "cmonitor.viewer.server.win\cmonitor.viewer.server.win.csproj", "{AB10024E-9307-4231-872E-3564A57BA035}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmonitor.killer", "cmonitor.killer\cmonitor.killer.vcxproj", "{E19B86AC-AC42-417A-8536-C2FFF1FB7FDC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cmonitor.clipboard.win", "cmonitor.clipboard.win\cmonitor.clipboard.win.csproj", "{2A23EA37-3EAC-4B60-8576-84607ADB0256}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -181,6 +183,18 @@ Global {E19B86AC-AC42-417A-8536-C2FFF1FB7FDC}.Release|x64.Build.0 = Release|x64 {E19B86AC-AC42-417A-8536-C2FFF1FB7FDC}.Release|x86.ActiveCfg = Release|Win32 {E19B86AC-AC42-417A-8536-C2FFF1FB7FDC}.Release|x86.Build.0 = Release|Win32 + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|x64.ActiveCfg = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|x64.Build.0 = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Debug|x86.Build.0 = Debug|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|Any CPU.Build.0 = Release|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|x64.ActiveCfg = Release|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|x64.Build.0 = Release|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|x86.ActiveCfg = Release|Any CPU + {2A23EA37-3EAC-4B60-8576-84607ADB0256}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/cmonitor.viewer.client.win/.build/default.Manifest.xml b/cmonitor.viewer.client.win/.build/default.Manifest.xml new file mode 100644 index 00000000..3c8a7348 --- /dev/null +++ b/cmonitor.viewer.client.win/.build/default.Manifest.xml @@ -0,0 +1,61 @@ + + + + cmonitor.share.screen.client.win + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True/PM + PerMonitorV2, PerMonitor + + + \ No newline at end of file diff --git a/cmonitor.viewer.client.win/.build/default.init.aardio b/cmonitor.viewer.client.win/.build/default.init.aardio new file mode 100644 index 00000000..11c61af2 --- /dev/null +++ b/cmonitor.viewer.client.win/.build/default.init.aardio @@ -0,0 +1,2 @@ +//发布前触发 +import ide; \ No newline at end of file diff --git a/cmonitor.viewer.client.win/.build/default.main.aardio b/cmonitor.viewer.client.win/.build/default.main.aardio new file mode 100644 index 00000000..f2f1b0a7 --- /dev/null +++ b/cmonitor.viewer.client.win/.build/default.main.aardio @@ -0,0 +1,6 @@ +//此触发器在生成EXE以后执行 +import ide; +import fsys; + +//获取生成的EXE文件路径 +var publishFile = ide.getPublishPath(); \ No newline at end of file diff --git a/cmonitor.viewer.client.win/default.aproj b/cmonitor.viewer.client.win/default.aproj new file mode 100644 index 00000000..0b86a998 --- /dev/null +++ b/cmonitor.viewer.client.win/default.aproj @@ -0,0 +1,6 @@ + + + + + + diff --git a/cmonitor.viewer.client.win/dist/cmonitor.viewer.client.win.exe b/cmonitor.viewer.client.win/dist/cmonitor.viewer.client.win.exe new file mode 100644 index 00000000..39f49f74 Binary files /dev/null and b/cmonitor.viewer.client.win/dist/cmonitor.viewer.client.win.exe differ diff --git a/cmonitor.viewer.client.win/lib/config.aardio b/cmonitor.viewer.client.win/lib/config.aardio new file mode 100644 index 00000000..5da06a0a --- /dev/null +++ b/cmonitor.viewer.client.win/lib/config.aardio @@ -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**/ \ No newline at end of file diff --git a/cmonitor.viewer.client.win/main.aardio b/cmonitor.viewer.client.win/main.aardio new file mode 100644 index 00000000..b9dad40c --- /dev/null +++ b/cmonitor.viewer.client.win/main.aardio @@ -0,0 +1,63 @@ +import win.ui; +/*DSG{{*/ +mainForm = win.form(text="cmonitor.viewer.client.win";right=757;bottom=467;border="thin";max=false;min=false;mode="popup";sysmenu=false;title=false) +mainForm.add() +/*}}*/ + +import win.ui.atom; +var atom,hwndConflict = mainForm.atom("C71CEE67-B4CA-4759-8608-8B2B917B0D54"); +if(!atom){ + win.quitMessage(); return; +}; + +mainForm.connecting = false; + +import com.lite; +import thread; +var dll = com.lite("rdpviewerax.dll"); +mainForm.tsc = dll.createEmbedEx(mainForm,"{32be5ed2-5c86-480f-a914-0ff8885a1b3f}"); +mainForm.tsc.SmartSizing = true; +mainForm.tsc.DisconnectedText = "正在连接至共享桌面...."; + +mainForm.tsc.OnConnectionFailed = function(){ + mainForm.connecting = false; +} +mainForm.tsc.OnConnectionTerminated = function(){ + mainForm.connecting = false; +} +mainForm.connect = function(){ + import win.reg; + import console; + if(mainForm.connecting === false){ + try{ + var reg = win.reg("HKEY_CURRENT_USER\Software\Cmonitor"); + mainForm.connecting = true; + var invitationString = reg.queryValue("viewerConnectStr"); + if(string.len(invitationString)>0) + { + mainForm.tsc.Connect(invitationString,"snltty","snltty"); + }else{ + mainForm.connecting = false; + } + }catch(e){ + console.log(e); + } + } + +} + +mainForm.show(); +if(!_STUDIO_INVOKED) +{ + mainForm.fullscreen(); + mainForm.modifyStyleEx(0x40000/*_WS_EX_APPWINDOW*/,0x80/*_WS_EX_TOOLWINDOW*/); + ::SetWindowPos(mainForm.hwnd,-1/*_HWND_TOPMOST*/,0,0,0,0,0x2/*_SWP_NOMOVE*/ + 0x1/*_SWP_NOSIZE*/); +} + +mainForm.setInterval( + function(){ + mainForm.connect(); + },1000 +); + +return win.loopMessage(); \ No newline at end of file diff --git a/cmonitor.share.win/MainForm.Designer.cs b/cmonitor.viewer.server.win/MainForm.Designer.cs similarity index 97% rename from cmonitor.share.win/MainForm.Designer.cs rename to cmonitor.viewer.server.win/MainForm.Designer.cs index 5c888520..a29b532e 100644 --- a/cmonitor.share.win/MainForm.Designer.cs +++ b/cmonitor.viewer.server.win/MainForm.Designer.cs @@ -1,4 +1,4 @@ -namespace cmonitor.share.win +namespace cmonitor.viewer.server.win { partial class MainForm { @@ -44,5 +44,7 @@ } #endregion + + } } diff --git a/cmonitor.viewer.server.win/MainForm.cs b/cmonitor.viewer.server.win/MainForm.cs new file mode 100644 index 00000000..c04368cd --- /dev/null +++ b/cmonitor.viewer.server.win/MainForm.cs @@ -0,0 +1,192 @@ +using cmonitor.libs; +using cmonitor.viewer.server.win.Properties; +using common.libs; +using Microsoft.Win32; +using RDPCOMAPILib; +using System.Diagnostics; +using System.Resources; +using System.Text; +using System.Windows.Forms; + +namespace cmonitor.viewer.server.win +{ + public partial class MainForm : Form + { + protected override CreateParams CreateParams + { + get + { + const int WS_EX_APPWINDOW = 0x40000; + const int WS_EX_TOOLWINDOW = 0x80; + CreateParams cp = base.CreateParams; + cp.ExStyle &= (~WS_EX_APPWINDOW); + cp.ExStyle |= WS_EX_TOOLWINDOW; + return cp; + } + } + + private readonly Hook hook = new Hook(); + private readonly ShareMemory shareMemory; + private int shareIndex = 0; + private Mode shareMode = Mode.Client; + private const string shareClientExe = "cmonitor.viewer.client.win"; + private byte[] shareKeyBytes = Encoding.UTF8.GetBytes(shareClientExe); + + public MainForm(string key, int length, int size, int index, Mode mode) + { + InitializeComponent(); + + shareMode = mode; + shareIndex = index; + shareMemory = new ShareMemory(key, length, size); + shareMemory.InitLocal(); + } + + private void OnLoad(object sender, EventArgs e) + { +#if RELEASE + this.FormBorderStyle = FormBorderStyle.None; + this.ShowInTaskbar = false; + this.WindowState = FormWindowState.Minimized; + this.Visible = false; +#endif + + CheckRunning(); + + if (shareMode == Mode.Client) + { + OpenShareClient(); + } + else + { + OpenShareDesktop(); + } + } + private void CheckRunning() + { + hook.Close(); + shareMemory.AddAttribute(shareIndex, ShareMemoryAttribute.Running); + shareMemory.RemoveAttribute(shareIndex, ShareMemoryAttribute.Closed); + Task.Run(async () => + { + while (true) + { + try + { + if (shareMemory.ReadAttributeEqual(shareIndex, ShareMemoryAttribute.Closed)) + { + CloseServer(); + } + else + { + shareMemory.IncrementVersion(shareIndex); + } + if (Process.GetProcessesByName(shareClientExe).Length == 0) + { + shareMemory.AddAttribute(shareIndex, ShareMemoryAttribute.Error); + } + } + catch (Exception) + { + } + await Task.Delay(30); + } + + }); + } + private void CloseServer() + { + shareMemory.RemoveAttribute(shareIndex, ShareMemoryAttribute.Running); + CloseShareClient(); + CloseShareDesktop(); + Application.ExitThread(); + Application.Exit(); + Process.GetCurrentProcess().Kill(); + } + + private void OpenShareClient() + { + hook.Start((code) => { return true; }); + + CommandHelper.Windows(string.Empty, new string[] { $"start {shareClientExe}.exe" },false); + } + private void CloseShareClient() + { + hook.Close(); + CommandHelper.Windows(string.Empty, new string[] { $"taskkill /f /im {shareClientExe}.exe" }); + } + + + RDPSession session; + private NotifyIcon notifyIcon; + private void OpenShareDesktop() + { + notifyIcon = new NotifyIcon(); + notifyIcon.Visible = true; + notifyIcon.ContextMenuStrip = new ContextMenuStrip(); + notifyIcon.ContextMenuStrip.Items.Add("ˢ¹"); + notifyIcon.ContextMenuStrip.Items.Add("˳"); + notifyIcon.ContextMenuStrip.ItemClicked += (object sender, ToolStripItemClickedEventArgs e) => + { + if (e.ClickedItem.Text == "˳") + { + CloseServer(); + } + else if (e.ClickedItem.Text == "ˢ¹") + { + NewShare(); + } + }; + NewShare(); + } + private void NewShare() + { + Task.Run(() => + { + try + { + CloseShareDesktop(); + session = new RDPSession(); + session.OnAttendeeConnected += Session_OnAttendeeConnected; + session.Open(); + IRDPSRAPIInvitation invitation = session.Invitations.CreateInvitation(Guid.NewGuid().ToString(), "snltty", "snltty", 1024); + string invitationString = invitation.ConnectionString; + + Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\Cmonitor", "viewerConnectStr", invitationString); + + notifyIcon.Icon = Icon.FromHandle(Resources.logo_share_green.GetHicon()); + notifyIcon.Text = "ڹ"; + } + catch (Exception) + { + notifyIcon.Icon = Icon.FromHandle(Resources.logo_share_gray.GetHicon()); + notifyIcon.Text = "ʧ"; + } + }); + } + + + private void Session_OnAttendeeConnected(object pAttendee) + { + IRDPSRAPIAttendee attendee = (IRDPSRAPIAttendee)pAttendee; + attendee.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_VIEW; + } + private void CloseShareDesktop() + { + try + { + session?.Close(); + Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\Cmonitor", "viewerConnectStr", string.Empty); + } + catch (Exception) + { + } + } + } + + public enum Mode : byte + { + Client = 0, + Server = 1, + } +} diff --git a/cmonitor.viewer.server.win/MainForm.resx b/cmonitor.viewer.server.win/MainForm.resx new file mode 100644 index 00000000..5a23e01d --- /dev/null +++ b/cmonitor.viewer.server.win/MainForm.resx @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + 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 + lADFwHkExUiKMVGMoAIn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DYc02G70/ZNuNCqypb7aVASeA4wiOIylAeeSVoISB + Wz/dewYtAAJJNqC+AwtmrEhi8ZCMIBlJMqpicjJKWMSj8iA2bXEoISG4ZG8QzTZ/IJttoOblEjWoy4GK + ZlsZakAXA+cRFCMpxkQxUIEbJwIXNBbJ1gQELQCCmWdR35Cb0MbphI1LmoENtRSZgMqIFN64hbV4HYZK + nGpF2SCsLTZQJasdqLm3s/Gvo3GzowZ4XePW/HUVglIk1ainfNOTvgETDZixI4EnA30jNd7QAqCvkX3x + lbj4VzZ7T6Ce2eKyfeTF92Tj/y+1yov7XH58jUaj0Wg0Gk2v5P8D5M/bzdE8cNIAAAAASUVORK5CYII= + + + \ No newline at end of file diff --git a/cmonitor.share.win/Program.cs b/cmonitor.viewer.server.win/Program.cs similarity index 54% rename from cmonitor.share.win/Program.cs rename to cmonitor.viewer.server.win/Program.cs index be7c3b88..c540f7d3 100644 --- a/cmonitor.share.win/Program.cs +++ b/cmonitor.viewer.server.win/Program.cs @@ -1,4 +1,4 @@ -namespace cmonitor.share.win +namespace cmonitor.viewer.server.win { internal static class Program { @@ -16,18 +16,25 @@ namespace cmonitor.share.win AppDomain.CurrentDomain.UnhandledException += (a, b) => { + MessageBox.Show(b.ExceptionObject.ToString()); }; - string shareMkey = "cmonitor/share/screen"; - int shareItemMLength = 2 * 1024 * 1024; + string shareMkey = "cmonitor/share"; + int shareMLength = 10; + int shareItemMLength = 1024; + int shareIndex = 5; + Mode mode = Mode.Server; if (arg.Length > 0) { shareMkey = arg[0]; - shareItemMLength = int.Parse(arg[1]); + shareMLength = int.Parse(arg[1]); + shareItemMLength = int.Parse(arg[2]); + shareIndex = int.Parse(arg[3]); + mode = (Mode)byte.Parse(arg[4]); } ApplicationConfiguration.Initialize(); - Application.Run(new MainForm(shareMkey, shareItemMLength)); + Application.Run(new MainForm(shareMkey, shareMLength, shareItemMLength, shareIndex, mode)); } } } \ No newline at end of file diff --git a/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml b/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..de010932 --- /dev/null +++ b/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + bin\Release\net7.0-windows\publish\win-x86\ + FileSystem + <_TargetId>Folder + net7.0-windows + win-x86 + false + true + false + + \ No newline at end of file diff --git a/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml.user b/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 00000000..56618814 --- /dev/null +++ b/cmonitor.viewer.server.win/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,10 @@ + + + + + True|2024-03-21T01:26:40.1376911Z;True|2024-03-21T09:24:13.2312644+08:00;True|2024-03-21T09:22:59.0517639+08:00; + + + \ No newline at end of file diff --git a/cmonitor.viewer.server.win/Properties/Resources.Designer.cs b/cmonitor.viewer.server.win/Properties/Resources.Designer.cs new file mode 100644 index 00000000..0b1834b2 --- /dev/null +++ b/cmonitor.viewer.server.win/Properties/Resources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace cmonitor.viewer.server.win.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cmonitor.viewer.server.win.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap logo_share_gray { + get { + object obj = ResourceManager.GetObject("logo-share-gray", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap logo_share_green { + get { + object obj = ResourceManager.GetObject("logo-share-green", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/cmonitor.viewer.server.win/Properties/Resources.resx b/cmonitor.viewer.server.win/Properties/Resources.resx new file mode 100644 index 00000000..7ed1022e --- /dev/null +++ b/cmonitor.viewer.server.win/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\logo-share-gray.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\logo-share-green.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/cmonitor.viewer.server.win/app.manifest b/cmonitor.viewer.server.win/app.manifest new file mode 100644 index 00000000..75867c29 --- /dev/null +++ b/cmonitor.viewer.server.win/app.manifest @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmonitor.share.win/cmonitor.share.win.csproj b/cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj similarity index 60% rename from cmonitor.share.win/cmonitor.share.win.csproj rename to cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj index fe48a877..e4e5929a 100644 --- a/cmonitor.share.win/cmonitor.share.win.csproj +++ b/cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj @@ -26,13 +26,25 @@ embedded + + + tlbimp + 0 + 1 + cc802d05-ae07-4c15-b496-db9d22aa0a84 + 0 + false + true + + + - - + + @@ -41,9 +53,18 @@ - - Interop.RDPCOMAPILib.dll - + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + \ No newline at end of file diff --git a/cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj.user b/cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj.user new file mode 100644 index 00000000..67d5f3df --- /dev/null +++ b/cmonitor.viewer.server.win/cmonitor.viewer.server.win.csproj.user @@ -0,0 +1,11 @@ + + + + <_LastSelectedProfileId>D:\desktop\cmonitor\cmonitor.share.win\Properties\PublishProfiles\FolderProfile.pubxml + + + + Form + + + \ No newline at end of file diff --git a/cmonitor.viewer.server.win/favicon.ico b/cmonitor.viewer.server.win/favicon.ico new file mode 100644 index 00000000..91b5da80 Binary files /dev/null and b/cmonitor.viewer.server.win/favicon.ico differ diff --git a/cmonitor.viewer.server.win/logo-share-gray.ico b/cmonitor.viewer.server.win/logo-share-gray.ico new file mode 100644 index 00000000..a0668ecc Binary files /dev/null and b/cmonitor.viewer.server.win/logo-share-gray.ico differ diff --git a/cmonitor.viewer.server.win/logo-share-gray.png b/cmonitor.viewer.server.win/logo-share-gray.png new file mode 100644 index 00000000..4856dbb2 Binary files /dev/null and b/cmonitor.viewer.server.win/logo-share-gray.png differ diff --git a/cmonitor.viewer.server.win/logo-share-green.ico b/cmonitor.viewer.server.win/logo-share-green.ico new file mode 100644 index 00000000..738f4359 Binary files /dev/null and b/cmonitor.viewer.server.win/logo-share-green.ico differ diff --git a/cmonitor.viewer.server.win/logo-share-green.png b/cmonitor.viewer.server.win/logo-share-green.png new file mode 100644 index 00000000..d995fbd4 Binary files /dev/null and b/cmonitor.viewer.server.win/logo-share-green.png differ diff --git a/cmonitor.wallpaper.win/MainForm.cs b/cmonitor.wallpaper.win/MainForm.cs index f390f54e..664c17be 100644 --- a/cmonitor.wallpaper.win/MainForm.cs +++ b/cmonitor.wallpaper.win/MainForm.cs @@ -1,4 +1,5 @@ using cmonitor.libs; +using common.libs; using System.Diagnostics; using System.Text; @@ -129,7 +130,8 @@ namespace cmonitor.wallpaper.win { try { - if (hook.CurrentKeys == Keys.None) + Keys currentKeys = (Keys)hook.CurrentKeys; + if (currentKeys == Keys.None) { if (lastKey != Keys.None) { @@ -151,11 +153,11 @@ namespace cmonitor.wallpaper.win { sb.Append("Alt+"); } - sb.Append(hook.CurrentKeys.ToString()); + sb.Append(currentKeys.ToString()); shareMemory.Update(shareKeyBoardIndex, keyBytes, Encoding.UTF8.GetBytes(sb.ToString())); } - lastKey = hook.CurrentKeys; + lastKey = currentKeys; WriteWallpaper(); } catch (Exception) @@ -165,13 +167,26 @@ namespace cmonitor.wallpaper.win await Task.Delay(30); } }); + + Task.Run(async () => + { + while (cancellationTokenSource.Token.IsCancellationRequested == false) + { + if ((DateTime.Now - hook.LastDateTime).TotalMilliseconds > 1000) + { + hook.CurrentKeys = 0; + } + + await Task.Delay(1000); + } + }); } private void WriteWallpaper() { long time = (long)(DateTime.UtcNow.Subtract(startTime)).TotalMilliseconds; if (time - lastTime >= 800) { - shareMemory.Update(shareWallpaperIndex, wallpaperBytes, BitConverter.GetBytes(time)); + shareMemory.IncrementVersion(shareWallpaperIndex); lastTime = time; } if (shareMemory.ReadAttributeEqual(shareWallpaperIndex, ShareMemoryAttribute.Closed)) diff --git a/cmonitor.wallpaper.win/cmonitor.wallpaper.win.csproj b/cmonitor.wallpaper.win/cmonitor.wallpaper.win.csproj index 0c9461d3..614ee815 100644 --- a/cmonitor.wallpaper.win/cmonitor.wallpaper.win.csproj +++ b/cmonitor.wallpaper.win/cmonitor.wallpaper.win.csproj @@ -39,6 +39,7 @@ + \ No newline at end of file diff --git a/cmonitor.web/src/apis/display.js b/cmonitor.web/src/apis/display.js new file mode 100644 index 00000000..d81330a5 --- /dev/null +++ b/cmonitor.web/src/apis/display.js @@ -0,0 +1,7 @@ +import { sendWebsocketMsg } from './request' + +export const screenDisplay = (names, state) => { + return sendWebsocketMsg('display/update', { + names, state + }, false, 1000); +} \ No newline at end of file diff --git a/cmonitor.web/src/apis/screen.js b/cmonitor.web/src/apis/screen.js index 66f6d648..445d5659 100644 --- a/cmonitor.web/src/apis/screen.js +++ b/cmonitor.web/src/apis/screen.js @@ -14,9 +14,3 @@ export const screenClip = (name, data) => { clip: data }, false, 1000); } - -export const screenDisplay = (names, state) => { - return sendWebsocketMsg('screen/display', { - names, state - }, false, 1000); -} \ No newline at end of file diff --git a/cmonitor.web/src/apis/viewer.js b/cmonitor.web/src/apis/viewer.js new file mode 100644 index 00000000..580bded5 --- /dev/null +++ b/cmonitor.web/src/apis/viewer.js @@ -0,0 +1,5 @@ +import { sendWebsocketMsg } from './request' + +export const viewerUpdate = (data) => { + return sendWebsocketMsg('viewer/update', data); +} \ No newline at end of file diff --git a/cmonitor.web/src/views/device/boxs/CheckBoxWrap.vue b/cmonitor.web/src/views/device/boxs/CheckBoxWrap.vue index dc8bb20c..f77ac9d3 100644 --- a/cmonitor.web/src/views/device/boxs/CheckBoxWrap.vue +++ b/cmonitor.web/src/views/device/boxs/CheckBoxWrap.vue @@ -1,14 +1,14 @@