├── DivoomPCMonitorTool.zip ├── DivoomPCMonitorTool ├── WindowsFormsApplication1.sln ├── WindowsFormsApplication1.v12.suo ├── WindowsFormsApplication1 │ ├── DivoomPCDataTool.csproj │ ├── DivoomPCMonitorTool.csproj │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── bin │ │ ├── Debug │ │ │ ├── DivoomPCDataTool.exe │ │ │ ├── DivoomPCDataTool.pdb │ │ │ ├── DivoomPCDataTool.vshost.exe │ │ │ ├── DivoomPCMonitorTool.vshost.exe │ │ │ ├── OpenHardwareMonitorLib.dll │ │ │ └── WindowsFormsApplication1.vshost.exe.manifest │ │ └── Release │ │ │ ├── DivoomPCDataTool.exe │ │ │ ├── DivoomPCDataTool.pdb │ │ │ ├── DivoomPCDataTool.vshost.exe │ │ │ ├── DivoomPCDataTool.vshost.exe.manifest │ │ │ ├── DivoomPCMonitorTool.vshost.exe │ │ │ └── DivoomPCMonitorTool.vshost.exe.manifest │ ├── obj │ │ ├── Debug │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── DivoomPCDataTool.Properties.Resources.resources │ │ │ ├── DivoomPCDataTool.exe │ │ │ ├── DivoomPCDataTool.pdb │ │ │ ├── TempPE │ │ │ │ └── Properties.Resources.Designer.cs.dll │ │ │ ├── WindowsFormsApplication1.DivoomDevicePostItem.resources │ │ │ ├── WindowsFormsApplication1.csproj.FileListAbsolute.txt │ │ │ └── WindowsFormsApplication1.csproj.GenerateResource.Cache │ │ └── Release │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ └── TempPE │ │ │ └── Properties.Resources.Designer.cs.dll │ └── packages.config └── packages │ ├── Newtonsoft.Json.9.0.1 │ ├── Newtonsoft.Json.9.0.1.nupkg │ ├── lib │ │ ├── net20 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net35 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net40 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net45 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── netstandard1.0 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ └── portable-net45+wp80+win8+wpa81 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ └── tools │ │ └── install.ps1 │ └── repositories.config ├── DivoomPCMonitorTool_debug.zip └── README.md /DivoomPCMonitorTool.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool.zip -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DivoomPCMonitorTool", "WindowsFormsApplication1\DivoomPCMonitorTool.csproj", "{2B41C74A-956D-48E5-B424-8F839B211C8A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2B41C74A-956D-48E5-B424-8F839B211C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2B41C74A-956D-48E5-B424-8F839B211C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2B41C74A-956D-48E5-B424-8F839B211C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2B41C74A-956D-48E5-B424-8F839B211C8A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1.v12.suo -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/DivoomPCDataTool.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2B41C74A-956D-48E5-B424-8F839B211C8A} 8 | WinExe 9 | Properties 10 | DivoomPCDataTool 11 | DivoomPCMonitorTool 12 | v4.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll 37 | 38 | 39 | False 40 | bin\Debug\OpenHardwareMonitorLib.dll 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Form 56 | 57 | 58 | Form1.cs 59 | 60 | 61 | 62 | 63 | Form1.cs 64 | 65 | 66 | ResXFileCodeGenerator 67 | Resources.Designer.cs 68 | Designer 69 | 70 | 71 | True 72 | Resources.resx 73 | True 74 | 75 | 76 | 77 | SettingsSingleFileGenerator 78 | Settings.Designer.cs 79 | 80 | 81 | True 82 | Settings.settings 83 | True 84 | 85 | 86 | 87 | 94 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/DivoomPCMonitorTool.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2B41C74A-956D-48E5-B424-8F839B211C8A} 8 | WinExe 9 | Properties 10 | DivoomPCMonitorTool 11 | DivoomPCMonitorTool 12 | v4.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll 37 | 38 | 39 | False 40 | bin\Debug\OpenHardwareMonitorLib.dll 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Form 56 | 57 | 58 | Form1.cs 59 | 60 | 61 | 62 | 63 | Form1.cs 64 | 65 | 66 | ResXFileCodeGenerator 67 | Resources.Designer.cs 68 | Designer 69 | 70 | 71 | True 72 | Resources.resx 73 | True 74 | 75 | 76 | 77 | SettingsSingleFileGenerator 78 | Settings.Designer.cs 79 | 80 | 81 | True 82 | Settings.settings 83 | True 84 | 85 | 86 | 87 | 94 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace WindowsFormsApplication1 2 | { 3 | public class DivoomDeviceInfo 4 | { 5 | public int DeviceId { get; set; } 6 | 7 | public int Hardware { get; set; } 8 | 9 | public string DeviceName { get; set; } 10 | public string DevicePrivateIP { get; set; } 11 | public string DeviceMac { get; set; } 12 | 13 | } 14 | public class DivoomDeviceList 15 | { 16 | 17 | public DivoomDeviceInfo[] DeviceList { get; set; } 18 | 19 | } 20 | partial class Form1 21 | { 22 | /// 23 | /// 必需的设计器变量。 24 | /// 25 | private System.ComponentModel.IContainer components = null; 26 | 27 | /// 28 | /// 清理所有正在使用的资源。 29 | /// 30 | /// 如果应释放托管资源,为 true;否则为 false。 31 | protected override void Dispose(bool disposing) 32 | { 33 | if (disposing && (components != null)) 34 | { 35 | components.Dispose(); 36 | } 37 | base.Dispose(disposing); 38 | } 39 | 40 | #region Windows 窗体设计器生成的代码 41 | 42 | /// 43 | /// 设计器支持所需的方法 - 不要 44 | /// 使用代码编辑器修改此方法的内容。 45 | /// 46 | private void InitializeComponent() 47 | { 48 | this.refreshList = new System.Windows.Forms.Button(); 49 | this.CpuUse = new System.Windows.Forms.TextBox(); 50 | this.CpuTemp = new System.Windows.Forms.TextBox(); 51 | this.GpuUse = new System.Windows.Forms.TextBox(); 52 | this.GpuTemp = new System.Windows.Forms.TextBox(); 53 | this.DispUse = new System.Windows.Forms.TextBox(); 54 | this.HddUse = new System.Windows.Forms.TextBox(); 55 | this.divoomList = new System.Windows.Forms.ListBox(); 56 | this.LCDList = new System.Windows.Forms.ListBox(); 57 | this.LCDMsg = new System.Windows.Forms.Label(); 58 | this.DeviceListMsg = new System.Windows.Forms.Label(); 59 | this.HardwareInfo = new System.Windows.Forms.Label(); 60 | this.SuspendLayout(); 61 | 62 | // 63 | // DeviceListMsg 64 | // 65 | this.DeviceListMsg.Location = new System.Drawing.Point(100, 10); 66 | this.DeviceListMsg.Name = "DeviceListMsg"; 67 | this.DeviceListMsg.Size = new System.Drawing.Size(100, 20); 68 | this.DeviceListMsg.Text = "Device list"; 69 | // 70 | // listbox 71 | // 72 | this.divoomList.Location = new System.Drawing.Point(100, 30); 73 | this.divoomList.Name = "DeviceList"; 74 | this.divoomList.Size = new System.Drawing.Size(100, 230); 75 | this.divoomList.TabIndex = 2;//CheckedListBoxes 76 | this.divoomList.SelectedIndexChanged += new System.EventHandler(this.divoomList_SelectedIndexChanged); 77 | // 78 | // refresh list 79 | // 80 | this.refreshList.Location = new System.Drawing.Point(100, 260); 81 | this.refreshList.Name = "refresh list"; 82 | this.refreshList.Size = new System.Drawing.Size(100, 23); 83 | this.refreshList.TabIndex = 0; 84 | this.refreshList.Text = "refresh list"; 85 | this.refreshList.UseVisualStyleBackColor = true; 86 | this.refreshList.Click += new System.EventHandler(this.refreshList_Click); 87 | 88 | // 89 | // LCDMsg 90 | // 91 | this.LCDMsg.Location = new System.Drawing.Point(20, 10); 92 | this.LCDMsg.Name = "DeviceListMsg"; 93 | this.LCDMsg.Size = new System.Drawing.Size(80, 20); 94 | this.LCDMsg.Text = "Select LCD"; 95 | // LCDList 96 | // 97 | this.LCDList.Location = new System.Drawing.Point(20, 30); 98 | this.LCDList.Name = "LCDList"; 99 | this.LCDList.Size = new System.Drawing.Size(20, 100); 100 | this.LCDList.TabIndex = 2;//CheckedListBoxes 101 | this.LCDList.SelectedIndexChanged += new System.EventHandler(this.LCDList_SelectedIndexChanged); 102 | this.LCDList.Items.Add("1"); 103 | this.LCDList.Items.Add("2"); 104 | this.LCDList.Items.Add("3"); 105 | this.LCDList.Items.Add("4"); 106 | this.LCDList.Items.Add("5"); 107 | this.LCDList.SetSelected(0, true); 108 | 109 | 110 | // 111 | // HardwareInfo 112 | // 113 | this.HardwareInfo.Location = new System.Drawing.Point(220, 10); 114 | this.HardwareInfo.Name = "HardwareInfo"; 115 | this.HardwareInfo.Size = new System.Drawing.Size(180, 20); 116 | this.HardwareInfo.Text = "Hardware information"; 117 | 118 | // 119 | // CpuUse 120 | // 121 | this.CpuUse.Location = new System.Drawing.Point(220, 30); 122 | this.CpuUse.Name = "PCUser"; 123 | this.CpuUse.Size = new System.Drawing.Size(100, 20); 124 | this.CpuUse.TabIndex = 1; 125 | // 126 | 127 | // CpuTemp 128 | // 129 | this.CpuTemp.Location = new System.Drawing.Point(220, 60); 130 | this.CpuTemp.Name = "textBox1"; 131 | this.CpuTemp.Size = new System.Drawing.Size(100, 20); 132 | this.CpuTemp.TabIndex = 1; 133 | 134 | // 135 | // CpuUse 136 | // 137 | this.GpuUse.Location = new System.Drawing.Point(220, 90); 138 | this.GpuUse.Name = "PCUser"; 139 | this.GpuUse.Size = new System.Drawing.Size(100, 20); 140 | this.GpuUse.TabIndex = 1; 141 | // 142 | 143 | // CpuTemp 144 | // 145 | this.GpuTemp.Location = new System.Drawing.Point(220, 120); 146 | this.GpuTemp.Name = "textBox1"; 147 | this.GpuTemp.Size = new System.Drawing.Size(100, 20); 148 | this.GpuTemp.TabIndex = 1; 149 | 150 | 151 | // CpuTemp 152 | // 153 | this.DispUse.Location = new System.Drawing.Point(220, 150); 154 | this.DispUse.Name = "textBox1"; 155 | this.DispUse.Size = new System.Drawing.Size(100, 20); 156 | this.DispUse.TabIndex = 1; 157 | 158 | 159 | // CpuTemp 160 | // 161 | this.HddUse.Location = new System.Drawing.Point(220, 180); 162 | this.HddUse.Name = "textBox1"; 163 | this.HddUse.Size = new System.Drawing.Size(100, 20); 164 | this.HddUse.TabIndex = 1; 165 | 166 | // Form1 167 | // 168 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 169 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 170 | this.ClientSize = new System.Drawing.Size(400, 300); 171 | this.Controls.Add(this.CpuUse); 172 | this.Controls.Add(this.CpuTemp); 173 | this.Controls.Add(this.GpuUse); 174 | this.Controls.Add(this.GpuTemp); 175 | this.Controls.Add(this.DispUse); 176 | this.Controls.Add(this.HddUse); 177 | this.Controls.Add(this.refreshList); 178 | this.Controls.Add(this.divoomList); 179 | this.Controls.Add(this.LCDList); 180 | this.Controls.Add(this.LCDMsg); 181 | this.Controls.Add(this.DeviceListMsg); 182 | this.Controls.Add(this.HardwareInfo); 183 | System.AppDomain.CurrentDomain.ProcessExit += new System.EventHandler(CurrentDomain_ProcessExit); 184 | this.Name = "DivoomPcTool"; 185 | this.Text = "DivoomPcTool"; 186 | this.SelectLCDID = 0; 187 | this.DeviceIPAddr = ""; 188 | 189 | this.updateVisitor = new UpdateVisitor(); 190 | this.computer = new OpenHardwareMonitor.Hardware.Computer(); 191 | this.computer.HDDEnabled = true; 192 | this.computer.Open(); 193 | System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();//创建定时器 194 | timer.Tick += new System.EventHandler(DivoomSendHttpInfo);//事件处理 195 | timer.Enabled = true;//设置启用定时器 196 | timer.Interval = 2000;//执行时间 197 | timer.Start();//开启定时器 198 | this.ResumeLayout(false); 199 | this.PerformLayout(); 200 | 201 | } 202 | 203 | #endregion 204 | 205 | private System.Windows.Forms.ListBox divoomList; 206 | private System.Windows.Forms.ListBox LCDList; 207 | private System.Windows.Forms.Button refreshList; 208 | private System.Windows.Forms.TextBox CpuUse; 209 | private System.Windows.Forms.TextBox CpuTemp; 210 | private System.Windows.Forms.TextBox GpuUse; 211 | private System.Windows.Forms.TextBox GpuTemp; 212 | private System.Windows.Forms.TextBox DispUse; 213 | private System.Windows.Forms.TextBox HddUse; 214 | private System.Windows.Forms.Label LCDMsg; 215 | private System.Windows.Forms.Label DeviceListMsg; 216 | private System.Windows.Forms.Label HardwareInfo; 217 | private DivoomDeviceList LocalList; 218 | private int SelectLCDID; 219 | private System.Windows.Forms.Timer timer; 220 | private string DeviceIPAddr; 221 | private int LcdIndependence; 222 | 223 | UpdateVisitor updateVisitor; 224 | OpenHardwareMonitor.Hardware.Computer computer; 225 | 226 | } 227 | } 228 | 229 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using OpenHardwareMonitor.Hardware; 10 | using System.Threading; 11 | using System.Net; 12 | using System.IO; 13 | using System.Web; 14 | using Newtonsoft.Json; 15 | using System.Diagnostics; 16 | using System.Management; 17 | using System.Runtime.InteropServices; 18 | 19 | 20 | namespace WindowsFormsApplication1 21 | { 22 | 23 | 24 | public partial class Form1 : Form 25 | { 26 | public Form1() 27 | { 28 | InitializeComponent(); 29 | this.LCDMsg.Visible = false; 30 | this.LCDList.Visible = false; 31 | this.DivoomUpdateDeviceList(); 32 | } 33 | public static int HttpPost(string url, string sendData, out string reslut) 34 | { 35 | reslut = ""; 36 | try 37 | { 38 | byte[] data = System.Text.Encoding.UTF8.GetBytes(sendData); 39 | HttpWebRequest wbRequest = (HttpWebRequest)WebRequest.Create(url); // 制备web请求 40 | wbRequest.Proxy = null; //现场测试注释掉也可以上传 41 | wbRequest.Method = "POST"; 42 | wbRequest.ContentType = "application/json"; 43 | wbRequest.ContentLength = data.Length; 44 | wbRequest.Timeout = 1000; 45 | 46 | //#region //【1】获得请求流,OK 47 | //Stream newStream = wbRequest.GetRequestStream(); 48 | //newStream.Write(data, 0, data.Length); 49 | //newStream.Close();//关闭流 50 | //newStream.Dispose();//释放流所占用的资源 51 | //#endregion 52 | 53 | #region // 54 | using (Stream wStream = wbRequest.GetRequestStream()) //using(){}作为语句,用于定义一个范围,在此范围的末尾将释放对象。 55 | { 56 | wStream.Write(data, 0, data.Length); 57 | } 58 | #endregion 59 | 60 | //获取响应 61 | HttpWebResponse wbResponse = (HttpWebResponse)wbRequest.GetResponse(); 62 | using (Stream responseStream = wbResponse.GetResponseStream()) 63 | { 64 | using (StreamReader sReader = new StreamReader(responseStream, Encoding.UTF8)) //using(){}作为语句,用于定义一个范围,在此范围的末尾将释放对象。 65 | { 66 | reslut = sReader.ReadToEnd(); 67 | } 68 | } 69 | } 70 | catch (Exception e) 71 | { 72 | reslut = e.Message; //输出捕获到的异常,用OUT关键字输出 73 | return -1; //出现异常,函数的返回值为-1 74 | } 75 | return 0; 76 | } 77 | 78 | public static string HttpPost2(string Url, string postDataStr) 79 | { 80 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); 81 | request.Method = "POST"; 82 | request.ContentType = "application/x-www-form-urlencoded"; 83 | Encoding encoding = Encoding.UTF8; 84 | byte[] postData = encoding.GetBytes(postDataStr); 85 | request.ContentLength = postData.Length; 86 | Stream myRequestStream = request.GetRequestStream(); 87 | myRequestStream.Write(postData, 0, postData.Length); 88 | myRequestStream.Close(); 89 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); 90 | Stream myResponseStream = response.GetResponseStream(); 91 | StreamReader myStreamReader = new StreamReader(myResponseStream, encoding); 92 | string retString = myStreamReader.ReadToEnd(); 93 | myStreamReader.Close(); 94 | myResponseStream.Close(); 95 | 96 | return retString; 97 | } 98 | //GET方法 99 | public static string HttpGet(string Url, string postDataStr) 100 | { 101 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); 102 | request.Method = "GET"; 103 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); 104 | Stream myResponseStream = response.GetResponseStream(); 105 | StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8")); 106 | string retString = myStreamReader.ReadToEnd(); 107 | myStreamReader.Close(); 108 | myResponseStream.Close(); 109 | return retString; 110 | } 111 | 112 | private void DivoomSendHttpInfo(object sender, EventArgs e) 113 | { 114 | if (this.DeviceIPAddr == null || this.LocalList == null || this.LocalList.DeviceList == null || this.LocalList.DeviceList.Length == 0) 115 | { 116 | return; 117 | 118 | } 119 | string CpuTemp_value = "--", CpuUse_value = "--", GpuTemp_value = "--", GpuUse_value = "--", DispUse_value = "--", HardDiskUse_value = "--"; 120 | 121 | DivoomDevicePostList PostInfo = new DivoomDevicePostList(); 122 | DivoomDevicePostItem PostItem = new DivoomDevicePostItem(); 123 | PostInfo.Command = "Device/UpdatePCParaInfo"; 124 | PostInfo.ScreenList = new DivoomDevicePostItem[1]; 125 | PostItem.DispData = new string[6]; 126 | 127 | if (DeviceIPAddr.Length > 0) 128 | { 129 | PostItem.LcdId = this.SelectLCDID; 130 | computer.Accept(updateVisitor); 131 | for (int i = 0; i < computer.Hardware.Length; i++) 132 | { 133 | //查找硬件类型为CPU 134 | if (computer.Hardware[i].HardwareType == HardwareType.CPU) 135 | { 136 | for (int j = 0; j < computer.Hardware[i].Sensors.Length; j++) 137 | { 138 | //找到温度传感器 139 | if (computer.Hardware[i].Sensors[j].SensorType == SensorType.Temperature) 140 | { 141 | CpuTemp_value = computer.Hardware[i].Sensors[j].Value.ToString(); 142 | CpuTemp_value += "C"; 143 | } 144 | else if (computer.Hardware[i].Sensors[j].SensorType == SensorType.Load) 145 | { 146 | CpuUse_value = computer.Hardware[i].Sensors[j].Value.ToString(); 147 | if (CpuUse_value.Length > 2) 148 | { 149 | CpuUse_value = CpuUse_value.Substring(0, 2); 150 | } 151 | CpuUse_value += "%"; 152 | } 153 | } 154 | } 155 | else if (computer.Hardware[i].HardwareType == HardwareType.GpuNvidia || 156 | computer.Hardware[i].HardwareType == HardwareType.GpuAti) 157 | { 158 | for (int j = 0; j < computer.Hardware[i].Sensors.Length; j++) 159 | { 160 | //找到温度传感器 161 | if (computer.Hardware[i].Sensors[j].SensorType == SensorType.Temperature) 162 | { 163 | GpuTemp_value = computer.Hardware[i].Sensors[j].Value.ToString(); 164 | GpuTemp_value += "C"; 165 | } 166 | else if (computer.Hardware[i].Sensors[j].SensorType == SensorType.Load) 167 | { 168 | GpuUse_value = computer.Hardware[i].Sensors[j].Value.ToString(); 169 | if (GpuUse_value.Length > 2) 170 | { 171 | GpuUse_value = GpuUse_value.Substring(0, 2); 172 | } 173 | GpuUse_value += "%"; 174 | } 175 | } 176 | } 177 | else if (computer.Hardware[i].HardwareType == HardwareType.HDD) 178 | { 179 | for (int j = 0; j < computer.Hardware[i].Sensors.Length; j++) 180 | { 181 | //HDD TEMP 182 | if (computer.Hardware[i].Sensors[j].SensorType == SensorType.Temperature) 183 | { 184 | HardDiskUse_value = computer.Hardware[i].Sensors[j].Value.ToString(); 185 | HardDiskUse_value += "C"; 186 | break; 187 | } 188 | } 189 | } 190 | } 191 | 192 | MEMORYSTATUSEX memInfo = new MEMORYSTATUSEX(); 193 | memInfo.dwLength = (uint)Marshal.SizeOf(typeof(MEMORYSTATUSEX)); 194 | 195 | GlobalMemoryStatusEx(ref memInfo); 196 | 197 | DispUse_value = ((memInfo.ullTotalPhys - memInfo.ullAvailPhys) * 100 / memInfo.ullTotalPhys).ToString().Substring(0, 2) + "%"; 198 | PostItem.DispData[2] = CpuTemp_value; 199 | PostItem.DispData[0] = CpuUse_value; 200 | PostItem.DispData[3] = GpuTemp_value; 201 | PostItem.DispData[1] = GpuUse_value; 202 | PostItem.DispData[5] = HardDiskUse_value; 203 | PostItem.DispData[4] = DispUse_value; 204 | PostInfo.ScreenList[0] = PostItem; 205 | this.CpuTemp.Text = "CpuTemp:" + CpuTemp_value; 206 | this.CpuUse.Text = "CpuUse:" + CpuUse_value; 207 | this.GpuTemp.Text = "GpuTemp:" + GpuTemp_value; 208 | this.GpuUse.Text = "GpuUse:" + GpuUse_value; 209 | this.HddUse.Text = "HddUse:" + HardDiskUse_value; 210 | this.DispUse.Text = "DispUse:" + DispUse_value; 211 | /* 212 | * 213 | // 获取硬盘使用情况 214 | foreach (DriveInfo drive in DriveInfo.GetDrives()) 215 | { 216 | if (drive.IsReady) 217 | { 218 | Console.WriteLine("{0} 硬盘使用情况:", drive.Name); 219 | Console.WriteLine("总容量:{0} GB", drive.TotalSize / 1024 / 1024 / 1024); 220 | Console.WriteLine("已使用容量:{0} GB", (drive.TotalSize - drive.AvailableFreeSpace) / 1024 / 1024 / 1024); 221 | Console.WriteLine("可用容量:{0} GB", drive.AvailableFreeSpace / 1024 / 1024 / 1024); 222 | } 223 | } 224 | 225 | * */ 226 | string para_info = JsonConvert.SerializeObject(PostInfo); 227 | Console.WriteLine("request info:" + para_info); 228 | string response_info; 229 | HttpPost("http://" + DeviceIPAddr + ":80/post", para_info, out response_info); 230 | Console.WriteLine("get info:" + response_info); 231 | } 232 | } 233 | private void DivoomUpdateDeviceList() 234 | { 235 | int i; 236 | string url_info = "http://app.divoom-gz.com/Device/ReturnSameLANDevice"; 237 | string device_list = HttpGet(url_info, ""); 238 | // Console.WriteLine(device_list); 239 | this.LocalList = JsonConvert.DeserializeObject(device_list); 240 | this.divoomList.Items.Clear(); 241 | for (i = 0; this.LocalList.DeviceList != null && i < this.LocalList.DeviceList.Length; i++) 242 | { 243 | this.divoomList.Items.Add(this.LocalList.DeviceList[i].DeviceName); 244 | } 245 | 246 | } 247 | private void refreshList_Click(object sender, EventArgs e) 248 | { 249 | this.DivoomUpdateDeviceList(); 250 | } 251 | 252 | [StructLayout(LayoutKind.Sequential)] 253 | public struct MEMORYSTATUSEX 254 | { 255 | public uint dwLength; 256 | public uint dwMemoryLoad; 257 | public ulong ullTotalPhys; 258 | public ulong ullAvailPhys; //可用物理内存 259 | public ulong ullTotalPageFile; 260 | public ulong ullAvailPageFile; 261 | public ulong ullTotalVirtual; 262 | public ulong ullAvailVirtual; 263 | public ulong ullAvailExtendedVirtual; 264 | } 265 | 266 | [DllImport("kernel32.dll")] 267 | public static extern void GlobalMemoryStatusEx(ref MEMORYSTATUSEX stat); 268 | private void DivoomSendSelectClock() 269 | { 270 | DeviceIPAddr = this.LocalList.DeviceList[this.divoomList.SelectedIndex].DevicePrivateIP; 271 | Console.WriteLine("selece items:" + DeviceIPAddr); 272 | 273 | if (this.LocalList.DeviceList[this.divoomList.SelectedIndex].Hardware == 400) 274 | { 275 | //get the Independence index of timegate 276 | string url_info = "http://app.divoom-gz.com/Channel/Get5LcdInfoV2?DeviceType=LCD&DeviceId=" + this.LocalList.DeviceList[this.divoomList.SelectedIndex].DeviceId; 277 | string IndependenceStr = HttpGet(url_info, ""); 278 | if (IndependenceStr != null && IndependenceStr.Length > 0) 279 | { 280 | DivoomTimeGateIndependenceInfo IndependenceInfo = JsonConvert.DeserializeObject(IndependenceStr); 281 | 282 | this.LcdIndependence = IndependenceInfo.LcdIndependence; 283 | 284 | } 285 | this.LCDMsg.Visible = true; 286 | this.LCDList.Visible = true; 287 | 288 | } 289 | else 290 | { 291 | this.LCDMsg.Visible = false; 292 | this.LCDList.Visible = false; 293 | } 294 | 295 | DivoomDeviceSelectClockInfo PostInfo = new DivoomDeviceSelectClockInfo(); 296 | 297 | PostInfo.LcdIndependence = this.LcdIndependence; 298 | PostInfo.Command = "Channel/SetClockSelectId"; 299 | PostInfo.LcdIndex = this.LCDList.SelectedIndex; 300 | PostInfo.ClockId = 625; 301 | string para_info = JsonConvert.SerializeObject(PostInfo); 302 | Console.WriteLine("request info:" + para_info); 303 | string response_info; 304 | HttpPost("http://" + DeviceIPAddr + ":80/post", para_info, out response_info); 305 | 306 | } 307 | private void divoomList_SelectedIndexChanged(object sender, EventArgs e) 308 | { 309 | this.DivoomSendSelectClock(); 310 | 311 | 312 | 313 | } 314 | private void LCDList_SelectedIndexChanged(object sender, EventArgs e) 315 | { 316 | string raw_value = this.LCDList.SelectedItems[0].ToString(); 317 | this.SelectLCDID = Convert.ToInt32(raw_value) - 1; 318 | 319 | if(this.LocalList != null && this.LocalList.DeviceList!=null && this.LocalList.DeviceList.Count() > 0) 320 | { 321 | if (this.divoomList.SelectedIndex > 0 && this.divoomList.SelectedIndex < this.LocalList.DeviceList.Count()) 322 | { 323 | this.DivoomSendSelectClock(); 324 | } 325 | 326 | } 327 | 328 | 329 | } 330 | public void CurrentDomain_ProcessExit(object sender, EventArgs e) 331 | { 332 | Console.WriteLine("exit"); 333 | } 334 | } 335 | 336 | public class DivoomDeviceSelectClockInfo 337 | { 338 | public int LcdIndependence { get; set; } 339 | public int DeviceId { get; set; } 340 | public int LcdIndex { get; set; } 341 | public int ClockId { get; set; } 342 | public string Command { get; set; } 343 | } 344 | public class DivoomTimeGateIndependenceInfo 345 | { 346 | public int LcdIndependence { get; set; } 347 | public int ChannelType { get; set; } 348 | public int ClockId { get; set; } 349 | } 350 | 351 | 352 | public class DivoomDevicePostItem 353 | { 354 | public int LcdId { get; set; } 355 | 356 | 357 | public string[] DispData { get; set; } 358 | 359 | } 360 | public class DivoomDevicePostList 361 | { 362 | public string Command { get; set; } 363 | public DivoomDevicePostItem[] ScreenList { get; set; } 364 | 365 | } 366 | public class UpdateVisitor : IVisitor 367 | { 368 | public void VisitComputer(IComputer computer) 369 | { 370 | computer.Traverse(this); 371 | } 372 | 373 | public void VisitHardware(IHardware hardware) 374 | { 375 | hardware.Update(); 376 | foreach (IHardware subHardware in hardware.SubHardware) 377 | subHardware.Accept(this); 378 | } 379 | 380 | public void VisitSensor(ISensor sensor) { } 381 | 382 | public void VisitParameter(IParameter parameter) { } 383 | } 384 | 385 | } 386 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace WindowsFormsApplication1 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// 应用程序的主入口点。 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new Form1()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("WindowsFormsApplication1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WindowsFormsApplication1")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("d6ad2c6b-be40-4889-9784-5e6111f7fc61")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DivoomPCMonitorTool.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DivoomPCMonitorTool.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 使用此强类型资源类,为所有资源查找 51 | /// 重写当前线程的 CurrentUICulture 属性。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DivoomPCMonitorTool.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.pdb -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCDataTool.vshost.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCMonitorTool.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/DivoomPCMonitorTool.vshost.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/OpenHardwareMonitorLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/OpenHardwareMonitorLib.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Debug/WindowsFormsApplication1.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.pdb -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.vshost.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCDataTool.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCMonitorTool.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCMonitorTool.vshost.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/bin/Release/DivoomPCMonitorTool.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.Properties.Resources.resources -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.exe -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/DivoomPCDataTool.pdb -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/WindowsFormsApplication1.DivoomDevicePostItem.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/WindowsFormsApplication1.DivoomDevicePostItem.resources -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/WindowsFormsApplication1.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe 2 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb 3 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache 4 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources 5 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache 6 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe 7 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb 8 | c:\users\administrator\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.UpdateVisitor.resources 9 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache 10 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Newtonsoft.Json.dll 11 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Newtonsoft.Json.xml 12 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.DivoomDevicePostItem.resources 13 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DivoomPCDataTool.exe 14 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DivoomPCDataTool.pdb 15 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DivoomPCDataTool.Properties.Resources.resources 16 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DivoomPCDataTool.exe 17 | D:\work\divoom_product\timebox\branch\pc_hardwaremonitor\OpenHardware源码+实例\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DivoomPCDataTool.pdb 18 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/WindowsFormsApplication1.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Debug/WindowsFormsApplication1.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/obj/Release/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/WindowsFormsApplication1/obj/Release/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/WindowsFormsApplication1/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/netstandard1.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/netstandard1.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/Newtonsoft.Json.9.0.1/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | 50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 51 | [System.Reflection.BindingFlags]::NonPublic) 52 | 53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 54 | 55 | $instance = $instanceField.GetValue($null) 56 | 57 | if ($instance -eq $null) { return } 58 | 59 | $consoleProvider = $consoleField.GetValue($instance) 60 | if ($consoleProvider -eq $null) { return } 61 | 62 | $console = $consoleProvider.CreateOutputConsole($false) 63 | 64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 65 | [System.Reflection.BindingFlags]::NonPublic) 66 | if ($messagesField -eq $null) { return } 67 | 68 | $messages = $messagesField.GetValue($console) 69 | if ($messages -eq $null) { return } 70 | 71 | $operations = $messages -split "==============================" 72 | 73 | $lastOperation = $operations | select -last 1 74 | 75 | if ($lastOperation) 76 | { 77 | $lastOperation = $lastOperation.ToLower() 78 | 79 | $lines = $lastOperation -split "`r`n" 80 | 81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 82 | 83 | if ($installMatch) 84 | { 85 | $dte2.ItemOperations.Navigate($url) | Out-Null 86 | } 87 | } 88 | } 89 | } 90 | catch 91 | { 92 | try 93 | { 94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 95 | 96 | $selection = $pmPane.TextDocument.Selection 97 | $selection.StartOfDocument($false) 98 | $selection.EndOfDocument($true) 99 | 100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'")) 101 | { 102 | # don't show on upgrade 103 | if (!$selection.Text.Contains("Removed package")) 104 | { 105 | $dte2.ItemOperations.Navigate($url) | Out-Null 106 | } 107 | } 108 | } 109 | catch 110 | { 111 | # stop potential errors from bubbling up 112 | # worst case the splash page won't open 113 | } 114 | } 115 | 116 | # still yolo -------------------------------------------------------------------------------- /DivoomPCMonitorTool/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /DivoomPCMonitorTool_debug.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DivoomDevelop/DivoomPCMonitorTool/8ae95a69bcf0a78badbd837f30ab0b4969a69aeb/DivoomPCMonitorTool_debug.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DivoomPCMonitorTool 2 | it runs at PC and send data to the "PC Monitor Clock" of Pixoo64 and TimeGate 3 | 4 | The file 'DivoomPCMonitorTool. zip' is an executable file, 5 | 6 | The directory 'DivoomPCMonitorTool' is the source code 7 | --------------------------------------------------------------------------------