private void SetTextBoxDeepSleepResult(string text, Color color) { if (this.textBoxDeepSleepResult.InvokeRequired) { SetTextBoxCallback d1 = new SetTextBoxCallback(SetTextBoxDeepSleepResult); this.Invoke(d1, new object[] { text, color }); } else { this.textBoxDeepSleepResult.Text = text; this.textBoxDeepSleepResult.BackColor = color; } }
public void set_TextBox_delegate(TextBox target, object value, Option_TextBox option) { if (target.InvokeRequired) { SetTextBoxCallback d = new SetTextBoxCallback(set_TextBox_delegate); form.Invoke(d, new object[] { target, value, option }); } else if (option == Option_TextBox.enable) { target.Enabled = (bool)value; } else if (option == Option_TextBox.text) { target.Text = (string)value; } }
private void setTextBox(string text) { try { if (textBox_nowtask.InvokeRequired) { SetTextBoxCallback scb = new SetTextBoxCallback(setTextBox); this.Invoke(scb, new object[] { text }); } else { textBox_nowtask.Text = text; } } catch { } }
private void SetTextBoxSleepResult(string text, Color color) { if (this.textBoxSleepResult.InvokeRequired) { SetTextBoxCallback d1 = new SetTextBoxCallback(SetTextBoxSleepResult); this.Invoke(d1, new object[] { text, color }); } else { this.textBoxSleepResult.Text = text; this.textBoxSleepResult.BackColor = color; } }