/// <summary> /// Cette Methode permet de mettre a jour le Form de facon Safe /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void UpdateScreen(object sender, EventArgs e) { if (this.textBoxRAM.InvokeRequired) { SetTextBoxRAMCallback d = new SetTextBoxRAMCallback(SetTextBoxRAM); this.Invoke(d, new object[] { observablePerformance.getAllStates()[1] }); } else { this.textBoxRAM.Text = "(No Invoke)"; } if (this.textBoxCPU.InvokeRequired) { SetTextBoxCPUCallback d = new SetTextBoxCPUCallback(SetTextBoxCPU); this.Invoke(d, new object[] { observablePerformance.getAllStates()[0] }); } else { this.textBoxCPU.Text = "(No Invoke)"; } if (this.textBoxDisk.InvokeRequired) { SetTextBoxDiskCallback d = new SetTextBoxDiskCallback(SetTextBoxDisk); this.Invoke(d, new object[] { observablePerformance.getAllStates()[2] }); } else { this.textBoxDisk.Text = "(No Invoke)"; } Alert(); }