Ejemplo n.º 1
0
 public static void CrossThreadInvoke(ComboBoxEx t, MethodInvoker m)
 {
     if (t.InvokeRequired)
     {
         t.Invoke(m);
     }
 }
Ejemplo n.º 2
0
 public static void CrossThreadInvoke(ComboBoxEx t, MethodInvoker m)
 {
     if (t.InvokeRequired)
     {
         t.Invoke(m);
     }
 }
Ejemplo n.º 3
0
 private void UpdateComboBoxEx(ComboBoxEx item, bool enabled)
 {
     if (item.InvokeRequired)
     {
         item.Invoke(new Action <ComboBoxEx, bool>(UpdateComboBoxEx), item, enabled);
         return;
     }
     item.Enabled = enabled;
 }
Ejemplo n.º 4
0
 public void EnableComboBox(ComboBoxEx combo)
 {
     if (combo.InvokeRequired)
     {
         combo.Invoke(
             new MethodInvoker(
                 delegate { EnableComboBox(combo); }));
     }
     else
     {
         combo.Enabled = true;
     }
 }
Ejemplo n.º 5
0
        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);
            }
        }
Ejemplo n.º 6
0
        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);
                }
            }
        }
Ejemplo n.º 7
0
 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);
     }
 }
Ejemplo n.º 8
0
 public void EnableComboBox(ComboBoxEx combo)
 {
     if (combo.InvokeRequired)
     {
         combo.Invoke(
             new MethodInvoker(
                 delegate { EnableComboBox(combo); }));
     }
     else
     {
         combo.Enabled = true;
     }
 }
Ejemplo n.º 9
0
 private void UpdateComboBoxEx(ComboBoxEx item, bool enabled)
 {
     if (item.InvokeRequired)
     {
         item.Invoke(new Action<ComboBoxEx, bool>(UpdateComboBoxEx), item, enabled);
         return;
     }
     item.Enabled = enabled;
 }