// Execute method public override void Execute() { double valueA = _numberA.GetSingleValue() is double?(double)_numberA.GetSingleValue() : 0; double valueB = _numberB.GetSingleValue() is double?(double)_numberB.GetSingleValue() : 0; _resultOut.UpdateValue(valueA + valueB); }
public override void Execute() { var inputString = _inputString.GetSingleValue() as string; var inputKey = _inputKey.GetSingleValue() is char?(char)_inputKey.GetSingleValue() : '\0'; var inputEnabled = _inputEnabled.GetSingleValue(); if (inputEnabled == null || (bool)inputEnabled == false) { _outputString.UpdateValue(DefaultOutputValue); return; } if (string.IsNullOrEmpty(inputString)) { _outputString.UpdateValue(DefaultOutputValue); } else { var result = new StringBuilder(); foreach (var c in inputString) { result.Append((char)(c ^ (uint)inputKey)); } _outputString.UpdateValue(result.ToString()); } }
public override void Execute() { var value = _inputObject.GetSingleValue(); if (value != null) { EditText(value.ToString()); } else { _displayText = ""; } OnInvokeRepaint(EventArgs.Empty); }