public override void Handle(ColorCommand obj)
 {
     if (CombinatorValue == null)
     {
         CombinatorValue = new _16BitCommand(ColorValue.GetGrayscaleLevel(obj.CommandValue));
     }
     else
     {
         ushort value1 = CombinatorValue.CommandValue;
         ushort value2 = ColorValue.GetGrayscaleLevel(obj.CommandValue);
         CombinatorValue = new _16BitCommand(Math.Max(value1, value2));
     }
 }
Exemple #2
0
        // Handling intents as an evaluator.
        public override void Handle(IIntentState <ColorValue> obj)
        {
            byte byteLevel = ColorValue.GetGrayscaleLevel(obj.GetValue().Color);

            EvaluatorValue = new _8BitCommand(byteLevel);
        }
Exemple #3
0
 public void Handle(ColorCommand obj)
 {
     EvaluatorValue = new _8BitCommand(ColorValue.GetGrayscaleLevel(obj.CommandValue));
 }