/*-----------------*/ /*----Functions----*/ /*-----------------*/ public void get_psdata() { if (psstatus == 1) { PS3.ClearTargetInfo(); //Get from PS3 cputemp = PS3.GetTemperatureCELL(); gputemp = PS3.GetTemperatureRSX(); psversion = PS3.GetFirmwareVersion(); psversiontype = PS3.GetFirmwareType(); show_psdata(); } else if (psstatus == 0) { if (L_cputemp_show.InvokeRequired) { L_cputemp_show.Invoke((Action)(() => get_psdata())); } //Set Values to n/a L_cputemp_show.Text = "n/a"; L_gputemp_show.Text = "n/a"; L_firmware_show.Text = "n/a"; L_type_show.Text = "n/a"; //Status "Not Connected" stat_notconnected(); } else { L_status_show.Text = "Error!"; } }
private void InfoWorker() { lblFW.Invoke((MethodInvoker)(() => { lblFW.Text = PS3.GetFirmwareVersion(); })); lblLV2.Invoke((MethodInvoker)(() => { lblLV2.Text = PS3.GetFirmwareType(); })); while (threadIsRunning) { string temp1 = PS3.GetTemperatureCELL(); string temp2 = PS3.GetTemperatureRSX(); lblCELL.Invoke((MethodInvoker)(() => { lblCELL.Text = temp1; })); lblRSX.Invoke((MethodInvoker)(() => { lblRSX.Text = temp2; })); PS3.ClearTargetInfo(); Thread.Sleep(500); } TargetInfo.Abort(); }