Exemple #1
0
 private void EnableToolStripControl(ToolStrip toolstrip, ToolStripComboBox cb, bool enable)
 {
     if (toolstrip.InvokeRequired)
     {
         EnableToolStripControlCallback d = new EnableToolStripControlCallback(EnableToolStripControl);
         toolstrip.BeginInvoke(d, new object[] { toolstrip, cb, enable });
     }
     else
     {
         cb.Enabled = enable;
     }
 }
Exemple #2
0
 private void EnableToolStripControl(ToolStrip toolstrip, ToolStripComboBox cb, bool enable)
 {
     if (toolstrip.InvokeRequired)
     {
         EnableToolStripControlCallback d = new EnableToolStripControlCallback(EnableToolStripControl);
         toolstrip.BeginInvoke(d, new object[] { toolstrip, cb, enable });
     }
     else
     {
         cb.Enabled = enable;
     }
 }