public static void CrossThreadInvoke(ComboBoxEx t, MethodInvoker m) { if (t.InvokeRequired) { t.Invoke(m); } }
public static void CrossThreadInvoke(ComboBoxEx t, MethodInvoker m) { if (t.InvokeRequired) { t.Invoke(m); } }
private void UpdateComboBoxEx(ComboBoxEx item, bool enabled) { if (item.InvokeRequired) { item.Invoke(new Action <ComboBoxEx, bool>(UpdateComboBoxEx), item, enabled); return; } item.Enabled = enabled; }
public void EnableComboBox(ComboBoxEx combo) { if (combo.InvokeRequired) { combo.Invoke( new MethodInvoker( delegate { EnableComboBox(combo); })); } else { combo.Enabled = true; } }
void SetPrintStyle(ComboBoxEx cbo, DataTable dt) { Action <DataTable> setPrintStyleAction = dtStyle => { cbo.ValueMember = "style_url"; cbo.DisplayMember = "style_name"; cbo.DataSource = dtStyle; }; if (cbo.InvokeRequired) { cbo.Invoke(setPrintStyleAction, dt); } else { setPrintStyleAction(dt); } }
public static string GetExamId(ComboBoxEx ctl) { if (ctl.InvokeRequired) { return(ctl.Invoke(new Func <ComboBoxEx, string>(GetExamId), ctl).ToString()); } else { JHExamRecord jh = (ctl.SelectedItem as JHExamRecord); if (jh == null) { return(""); } else { return(jh.ID); } } }
void SetPrintStyle(ComboBoxEx cbo, DataTable dt) { Action<DataTable> setPrintStyleAction = dtStyle => { cbo.ValueMember = "style_url"; cbo.DisplayMember = "style_name"; cbo.DataSource = dtStyle; }; if (cbo.InvokeRequired) { cbo.Invoke(setPrintStyleAction, dt); } else { setPrintStyleAction(dt); } }
public void EnableComboBox(ComboBoxEx combo) { if (combo.InvokeRequired) { combo.Invoke( new MethodInvoker( delegate { EnableComboBox(combo); })); } else { combo.Enabled = true; } }
private void UpdateComboBoxEx(ComboBoxEx item, bool enabled) { if (item.InvokeRequired) { item.Invoke(new Action<ComboBoxEx, bool>(UpdateComboBoxEx), item, enabled); return; } item.Enabled = enabled; }