public void SetLableText(Label lbPassLabel, string sPassText) { if (lbPassLabel.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLableText); this.Invoke(d, new object[] { lbPassLabel, sPassText }); } else { lbPassLabel.Text = sPassText; } }
private void SetLabelText(Label label, string text) { if (label.InvokeRequired) { SetLabelTextCallback de = new SetLabelTextCallback(SetLabelText); this.Invoke(de, new object[] { label, text }); } else { label.Text = text; } }
private void SetLabelText(Label b, string value) { if (b.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); b.BeginInvoke(d, new object[] { b, value }); } else { b.Text = value; } }
private void SetLabel(Label lbl, string message) { if (lbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabel); this.Invoke(d, new object[] { lbl, message }); } else { lbl.Text = message; Application.DoEvents(); } }
internal void SetLabelText(Label label, String text) { if (label.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { label, text }); } else { label.Text = text; this.Invalidate(); } }
public void UpdateTransactionId(Label label_id, string id) { //label_id.Text = id; if (label_id.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(UpdateTransactionId); this.Invoke(d, new object[] { label_id, id }); } else { label_id.Text = id; } }
public void SetLabelText(String number) { if (this.labNumber.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); Invoke(d, new object[] { number }); } else { butPositive.Enabled = true; butNegative.Enabled = true; labNumber.Text = number; } }
private void SetLabelText(Label lbl, string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (lbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { lbl, text }); } else { lbl.Text = text; } }
private void SetLabelText(string id, int currentnumber, int totalNumber) { if (lbInfo.InvokeRequired) { if (_slCall == null) { _slCall = SetLabelText; } Invoke(_slCall, id, currentnumber, totalNumber); } else { lbInfo.Text = $@"Aktuelle Beleg (ID): {id} ({currentnumber} von {totalNumber})"; } }
public void SetLabelText(System.IO.UnmanagedMemoryStream sound) { if (this.labNumber.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); Invoke(d, new object[] { sound }); } else { butPositive.Enabled = true; butNegative.Enabled = true; SoundPlayer player = new SoundPlayer(); sound.Position = 0; player.Stream = null; player.Stream = sound; player.Play(); } }
public void setLabelText(Label rtb, string value) { if (InvokeRequired) { try { SetLabelTextCallback d = new SetLabelTextCallback(setLabelText); this.Invoke(d, new object[] { rtb, value }); //this.Invoke(new Action<string>(AppendTextBox), new object[] { value }); } catch { } return; } else { lbThreads.Text = value; } }
private void SetLabelText(Control control, string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (control.InvokeRequired) //如果调用控件的线程和创建创建控件的线程不是同一个则为True { while (!control.IsHandleCreated) { //解决窗体关闭时出现“访问已释放句柄“的异常 if (control.Disposing || control.IsDisposed) { return; } } SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); control.Invoke(d, new object[] { control, text }); } else { control.Text = text; } }
private void SetLabelText(string Message, Label label) { if (label.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { Message, label }); } else { label.Text = Message; } }
private void SetLabelText(Label label, string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (label.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); label.BeginInvoke(d, new object[] { label, text }); } else { label.Text = text; } }
protected void SetLabelText(Label b, string value) { if (b.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); b.BeginInvoke(d, new object[] { b, value }); } else { b.Text = value; } }
public void SetLabelText(string text, string dest) { switch (dest) { case "stepNumLbl": if (this.stepNumLbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { text, dest }); } else { this.stepNumLbl.Text = "StepNum: " + text; } break; case "instrTextLbl": if (this.instrTextLbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { text, dest }); } else { this.instrTextLbl.Text = "Instruction: " + text; } break; case "disassemblyLbl": if (this.disassemblyLbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { text, dest }); } else { this.disassemblyLbl.Text = "Disassembly: " + text; } break; case "nextInstrLbl": if (this.nextInstrLbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { text, dest }); } else { this.nextInstrLbl.Text = "Next instruction: " + text; } break; case "nextDisasmLbl": if (this.nextDisasmLbl.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(SetLabelText); this.Invoke(d, new object[] { text, dest }); } else { this.nextDisasmLbl.Text = "Disassembly: " + text; } break; } }
private void SetLabelText(Label label, String text) { if (label.InvokeRequired) { SetLabelTextCallback callback = new SetLabelTextCallback(SetLabelText); this.Invoke(callback, new object[] { label, text }); } else { label.Text = text; label.Visible = true; label.TextAlign = ContentAlignment.MiddleCenter; } }
/** * Update label for this download. */ private void _setLabelText(Label label, String text) { if (label.InvokeRequired) { SetLabelTextCallback d = new SetLabelTextCallback(_setLabelText); label.Invoke(d, new object[] { label, text }); } else { label.Text = text; } }