private void ResetSettings(SMU smuSettings) { SMU_ADDR_MSG = smuSettings.SMU_ADDR_MSG; SMU_ADDR_RSP = smuSettings.SMU_ADDR_RSP; SMU_ADDR_ARG = smuSettings.SMU_ADDR_ARG; textBoxCMDAddress.Text = cpuType > SMU.CPUType.DEBUG ? $"0x{Convert.ToString(SMU_ADDR_MSG, 16).ToUpper()}" : "0x0"; textBoxRSPAddress.Text = cpuType > SMU.CPUType.DEBUG ? $"0x{Convert.ToString(SMU_ADDR_RSP, 16).ToUpper()}" : "0x0"; textBoxARGAddress.Text = cpuType > SMU.CPUType.DEBUG ? $"0x{Convert.ToString(SMU_ADDR_ARG, 16).ToUpper()}" : "0x0"; textBoxCMD.Text = "0x1"; textBoxARG0.Text = "0x0"; }
private void InitForm() { InitSystemInfo(); smu = GetMaintainedSettings.GetByType(cpuType); ResetSettings(smu); smu.Version = GetSmuVersion(); if (smu.Version == 0) { MessageBox.Show("Error getting SMU version!\n" + "Default SMU addresses are not responding to commands.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } SI.SmuVersion = smu.Version; DisplaySystemInfo(); pstateIdBox.SelectedIndex = 0; pstateDid.KeyDown += pstateFidDid_KeyDown; pstateDid.KeyPress += pstateFidDid_KeyPress; pstateDid.KeyUp += pstateFidDid_KeyUp; pstateFid.KeyDown += pstateFidDid_KeyDown; pstateFid.KeyPress += pstateFidDid_KeyPress; pstateFid.KeyUp += pstateFidDid_KeyUp; PopulateFrequencyList(comboBoxACF.Items); PopulateFrequencyList(comboBoxSCF.Items); PopulateCCDList(comboBoxCore.Items); comboBoxCore.SelectedIndex = 0; int index = (int)((GetCurrentMulti() - 5.50) / 0.25); comboBoxACF.SelectedIndex = index; comboBoxSCF.SelectedIndex = index; var prochotEnabled = IsProchotEnabled(); checkBoxPROCHOT.Checked = prochotEnabled; //checkBoxPROCHOT.Enabled = prochotEnabled; //buttonApplyPROCHOT.Enabled = prochotEnabled; ToolTip toolTip = new ToolTip(); toolTip.SetToolTip(checkBoxPROCHOT, "Disables temperature throttling. Can be useful on extreme cooling."); SetStatusText($"{cpuType}. Ready."); }