Exemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        public TerrariumLed()
        {
            InitializeComponent();

            this.UseStyles = false;
            this.state = LedStates.Idle;
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        public TerrariumLed()
        {
            InitializeComponent();

            this.UseStyles = false;
            this.state     = LedStates.Idle;
        }
Exemplo n.º 3
0
 /// <summary>
 ///  Delegate implementation for async activity subtractions
 /// </summary>
 void RemoveActivityCountSynchronous()
 {
     activityCount--;
     if (activityCount <= 0)
     {
         activityCount = 0;
         LedState      = LedStates.Idle;
     }
     SetToolTip();
 }
Exemplo n.º 4
0
        /// <summary>
        ///  Delegate implementation for asynchronous LedState changing
        /// </summary>
        /// <param name="newState">The new state of the LED</param>
        public void SetLedStateSynchronous(LedStates newState)
        {
            if (newState == LedStates.Waiting)
            {
                numRequests++;
            }

            state = newState;

            this.UpdateGradient();

            SetToolTip();
            this.Invalidate();
            this.Update();
        }
Exemplo n.º 5
0
        /// <summary>
        ///  Delegate implementation for asynchronous LedState changing
        /// </summary>
        /// <param name="newState">The new state of the LED</param>
        public void SetLedStateSynchronous(LedStates newState)
        {
            if (newState == LedStates.Waiting)
            {
                _numRequests++;
            }

            _currentLedState = newState;

            updateGradient();

            setToolTip();
            Invalidate();
            Update();
        }
Exemplo n.º 6
0
 /// <summary>
 ///  Method for resetting the activity count and idle states for an LED
 /// </summary>
 private void Reset()
 {
     activityCount = 0;
     LedState = LedStates.Idle;
     SetToolTip();
 }
Exemplo n.º 7
0
 /// <summary>
 ///  Delegate implementation for async activity subtractions
 /// </summary>
 void RemoveActivityCountSynchronous()
 {
     activityCount--;
     if (activityCount <= 0)
     {
         activityCount = 0;
         LedState = LedStates.Idle;
     }
     SetToolTip();
 }
Exemplo n.º 8
0
 /// <summary>
 ///  Delegate implementation for async activity adds
 /// </summary>
 void AddActivityCountSynchronous()
 {
     activityCount++;
     LedState = LedStates.Waiting;
     SetToolTip();
 }
Exemplo n.º 9
0
        /// <summary>
        ///  Delegate implementation for asynchronous LedState changing
        /// </summary>
        /// <param name="newState">The new state of the LED</param>
        public void SetLedStateSynchronous(LedStates newState)
        {
            if (newState == LedStates.Waiting)
            {
                numRequests++;
            }

            state = newState;

            this.UpdateGradient();

            SetToolTip();
            this.Invalidate();
            this.Update();
        }
Exemplo n.º 10
0
 /// <summary>
 ///  Delegate implementation for async activity adds
 /// </summary>
 void AddActivityCountSynchronous()
 {
     activityCount++;
     LedState = LedStates.Waiting;
     SetToolTip();
 }
Exemplo n.º 11
0
 /// <summary>
 ///
 /// </summary>
 public TerrariumLed()
 {
     InitializeComponent();
     _currentLedState = LedStates.Waiting;
     NormalGradient   = _waitingGradient;
 }
Exemplo n.º 12
0
 /// <summary>
 /// 
 /// </summary>
 public TerrariumLed()
 {
     InitializeComponent();
     this.state = LedStates.Waiting;
     this.NormalGradient = waitingGradient;
 }
Exemplo n.º 13
0
 /// <summary>
 /// 
 /// </summary>
 public TerrariumLed()
 {
     InitializeComponent();
     _currentLedState = LedStates.Waiting;
     NormalGradient = _waitingGradient;
 }
Exemplo n.º 14
0
        /// <summary>
        ///  Delegate implementation for asynchronous LedState changing
        /// </summary>
        /// <param name="newState">The new state of the LED</param>
        public void SetLedStateSynchronous(LedStates newState)
        {
            if (newState == LedStates.Waiting)
            {
                _numRequests++;
            }

            _currentLedState = newState;

            updateGradient();

            setToolTip();
            Invalidate();
            Update();
        }
Exemplo n.º 15
0
 /// <summary>
 ///  Delegate implementation for async activity subtractions
 /// </summary>
 private void removeActivityCountSynchronous()
 {
     _activityCount--;
     if (_activityCount <= 0)
     {
         _activityCount = 0;
         LedState = LedStates.Idle;
     }
     setToolTip();
 }
Exemplo n.º 16
0
 /// <summary>
 ///  Delegate implementation for async activity adds
 /// </summary>
 private void addActivityCountSynchronous()
 {
     _activityCount++;
     LedState = LedStates.Waiting;
     setToolTip();
 }