private void Vals_Updated(object sender, string e) { ValueGen vg = (ValueGen)sender; this.UIThread(() => this.textBox1.Text = vg.val1.ToString()); this.UIThread(() => this.textBox2.Text = vg.val2.ToString()); }
public Form1() { InitializeComponent(); vals = new(); vals.Updated += Vals_Updated; }