private void uiButton2_Click(object sender, EventArgs e) { RemoteOverclock remoteOverclock = new RemoteOverclock(); remoteOverclock.function = "overclock"; GPUOverClock gPUOverClock = new GPUOverClock(); remoteOverclock.OVData = gPUOverClock; remoteOverclock.OVData.Name = selectGPU.Text; remoteOverclock.OVData.Power = "0"; remoteOverclock.OVData.TempLimit = "0"; remoteOverclock.OVData.CoreClock = "0"; remoteOverclock.OVData.MemoryClock = "0"; if (selectGPU.Text.Contains("NVIDIA")) { remoteOverclock.OVData.CV = "N/A"; remoteOverclock.OVData.MV = "N/A"; } else { remoteOverclock.OVData.CV = "0"; remoteOverclock.OVData.MV = "0"; } remoteOverclock.OVData.Fan = "0"; string msg = JsonConvert.SerializeObject(remoteOverclock); for (int i = 0; i < remoteMinerStatusList.Count; i++) { UDPHelper.Send(msg, remoteMinerStatusList[i].IP); } UIMessageBox.Show("设置完成", "提示"); }
private void uiButton1_Click(object sender, EventArgs e) { RemoteOverclock remoteOverclock = new RemoteOverclock(); remoteOverclock.function = "overclock"; GPUOverClock gPUOverClock = new GPUOverClock(); remoteOverclock.OVData = gPUOverClock; remoteOverclock.OVData.Name = selectGPU.Text; remoteOverclock.OVData.Power = uiTextBox1.Text; remoteOverclock.OVData.TempLimit = uiTextBox2.Text; remoteOverclock.OVData.CoreClock = uiTextBox3.Text; remoteOverclock.OVData.MemoryClock = uiTextBox4.Text; remoteOverclock.OVData.CV = uiTextBox5.Text; remoteOverclock.OVData.MV = uiTextBox6.Text; remoteOverclock.OVData.Fan = uiTextBox7.Text; string msg = JsonConvert.SerializeObject(remoteOverclock); for (int i = 0; i < remoteMinerStatusList.Count; i++) { UDPHelper.Send(msg, remoteMinerStatusList[i].IP); } UIMessageBox.Show("设置完成", "提示"); }