private void AddLEDAction(byte dur, cbenums.LEDs led, Color col) { // Create LED object ChorAction _newaction = new ChorAction(dur, led, col); // Add to chor actions queue _chor.AddAction(_newaction); // Refresh action list RefreshChorList(); }
private void AddEarAction(byte dur, cbenums.Actions requestedAction, cbenums.Ears ear, int earPosition, cbenums.Direction earDirection) { // Create action ChorAction _newaction = new ChorAction(dur, requestedAction, ear, earPosition, earDirection); // Add to chor actions queue _chor.AddAction(_newaction); // Refresh action list RefreshChorList(); }
int _position; // The position to move the ear(s) to #endregion Fields #region Constructors public ChorAction(byte duration, cbenums.LEDs led, System.Drawing.Color col) { _duration = duration; switch (led) { case cbenums.LEDs.All: ActionType = cbenums.Actions.AllLEDs; break; default: ActionType = cbenums.Actions.LED; break; } _led = led; _col = col; }
public ChorAction(byte duration, cbenums.Actions requestedAction, cbenums.Ears ear, int earPositionOrSteps, cbenums.Direction earDirection) { // Moves the ear(s) in the specified direction the specified number of steps or to the absolute position // (depending on the requested action) _ear = ear; _duration = duration; _position = earPositionOrSteps; _direction = earDirection; ActionType = requestedAction; }