private void InitialseProgressBar(int numberOfSteps)
        {
            SetIntDelegate setProgressStep = new SetIntDelegate(SetProgressStep);

            this.Invoke(setProgressStep, new object[] { numberOfSteps });
            VoidDelegate progressStep = new VoidDelegate(ProgressStep);

            this.Invoke(progressStep);
        }
Exemple #2
0
        public DXCapture(int c_monitor, SetIntDelegate setUPSDelegate)
        {
            int c_width = 38; int c_height = 22;

            this.setUPSDelegate = setUPSDelegate;

            setMonitor(c_monitor);
            setCaptureQuality(c_width, c_height);

            _isRunning = false;
        }
Exemple #3
0
 public static void SetHeight(Control ctrl, int value)
 {
     if (ctrl.InvokeRequired)
     {
         SetIntDelegate del = new SetIntDelegate(CrossThreadUI.SetHeight);
         if (CrossThreadUI.ExecSync)
         {
             ctrl.Invoke(del, ctrl, value);
         }
         else
         {
             ctrl.BeginInvoke(del, ctrl, value);
         }
     }
     else
     {
         ctrl.Height = value;
     }
 }
 /// <summary>
 /// Sets the 'Height' property of a given control.
 /// </summary>
 /// <param name="ctrl">The System.Windows.Forms.Control object whose height property will be set.</param>
 /// <param name="value">The System.Int32 value to assign to the property.</param>
 public static void SetHeight(Control ctrl, int value)
 {
     if (ctrl.InvokeRequired)
     {
         SetIntDelegate del = new SetIntDelegate(CrossThreadUI.SetHeight);
         if (CrossThreadUI.ExecSync)
             ctrl.Invoke(del, ctrl, value);
         else
             ctrl.BeginInvoke(del, ctrl, value);
     }
     else
         ctrl.Height = value;
 }
 public InputSliderInt(string path, GetIntDelegate getValue, SetIntDelegate setValue)
     : base(path, () => getValue().ToString(), (val) => setValue(Convert.ToInt32(val)))
 {
 }