Example #1
0
        public void Stop(SolaryAction action)
        {
            _worker.ResetDevice(_deviceNumber);

            _action     = SolaryAction.None;
            _actionTime = 0;
        }
Example #2
0
        public void Start(SolaryAction action, int time)
        {
            var channels = Array.FindAll(_actions, elem => elem.First == (int)action);

            if (_action != action)
            {
                if (_worker != null)
                {
                    foreach (var pair in channels)
                    {
                        _worker.SetChannelState(_deviceNumber, pair.Second, 0, time);
                    }
                    _action     = action;
                    _actionTime = time;
                }
            }
        }
Example #3
0
        public void Stop(SolaryAction action)
        {
            _worker.ResetDevice(_deviceNumber);

            _action = SolaryAction.None;
            _actionTime = 0;
        }
Example #4
0
 public void Start(SolaryAction action, int time)
 {
     var channels = Array.FindAll(_actions, elem => elem.First == (int) action);
     if (_action != action)
     {
         if (_worker != null)
         {
             foreach (var pair in channels)
             {
                 _worker.SetChannelState(_deviceNumber, pair.Second, 0, time);
             }
             _action = action;
             _actionTime = time;
         }
     }
 }