private void Instance_Initing(Machine.Hardware obj) { if (!this.IsHandleCreated) { return; } this.BeginInvoke(new MethodInvoker(() => { this.lblMessage.ForeColor = Color.Black; this.lblMessage.Text = string.Format("Initing {0} ...", obj); })); }
private void Instance_InitedItem(Machine.Hardware arg1, bool arg2, int arg3) { if (!this.IsHandleCreated) { return; } this.BeginInvoke(new MethodInvoker(() => { if (!arg2) { this.lblMessage.ForeColor = Color.Red; this.lblMessage.Text = string.Format("Init {0} Failed !!!", arg1); } else { this.progressBar1.Value += arg3; this.lblMessage.ForeColor = Color.Black; this.lblMessage.Text = string.Format("Init {0} Done.", arg1); } })); }