Class StandardCalculatorCalculationBehavior
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI.Calculator
Assembly: Telerik.WinControls.UI.dll
Syntax
public class StandardCalculatorCalculationBehavior
Constructors
StandardCalculatorCalculationBehavior(ICalculatorElement)
Declaration
public StandardCalculatorCalculationBehavior(ICalculatorElement calculatorElement)
Parameters
ICalculatorElement
calculatorElement
|
Fields
ErrorMessageCannotDivideByZero
Declaration
public static string ErrorMessageCannotDivideByZero
Field Value
System.String
|
ErrorMessageInvalidOperation
Declaration
public static string ErrorMessageInvalidOperation
Field Value
System.String
|
Properties
DisplayedValue
Gets or sets the displayed value.
Declaration
public virtual string DisplayedValue { get; set; }
Property Value
System.String
|
ErrorMessage
Gets or sets the currently displayed error message.
Declaration
public virtual string ErrorMessage { get; set; }
Property Value
System.String
|
History
Gets or sets the history text.
Declaration
public virtual string History { get; set; }
Property Value
System.String
|
InputValue
Gets or sets the input value.
Declaration
public virtual decimal InputValue { get; set; }
Property Value
System.Decimal
|
IsInputUpdated
Gets or sets a value indicating whether the input is updated.
Declaration
public virtual bool IsInputUpdated { get; set; }
Property Value
System.Boolean
|
IsMemoryUpdated
Gets or sets a value indicating whether the memory is updated.
Declaration
public virtual bool IsMemoryUpdated { get; set; }
Property Value
System.Boolean
|
IsOperationExecuted
Gets or sets a value indicating whether an operation is executed.
Declaration
public virtual bool IsOperationExecuted { get; set; }
Property Value
System.Boolean
|
MemoryValue
Gets or sets the memory value.
Declaration
public virtual decimal? MemoryValue { get; set; }
Property Value
System.Nullable<System.Decimal>
|
Operations
Gets or sets the available mathematical operations.
Declaration
public virtual OperationsSource Operations { get; set; }
Property Value
OperationsSource
|
PendingOperation
Gets or sets the pending operation.
Declaration
public virtual Operation PendingOperation { get; set; }
Property Value
Operation
|
RedoStack
Gets or sets the redo stack.
Declaration
public Stack<StatusItem> RedoStack { get; set; }
Property Value
System.Collections.Generic.Stack<StatusItem>
|
UndoStack
Gets or sets the undo stack.
Declaration
public Stack<StatusItem> UndoStack { get; set; }
Property Value
System.Collections.Generic.Stack<StatusItem>
|
Value
Gets or sets the calculated value.
Declaration
public virtual decimal Value { get; set; }
Property Value
System.Decimal
|
Methods
AddPendingBinaryOperation(Operation)
Declaration
protected virtual void AddPendingBinaryOperation(Operation parameter)
Parameters
Operation
parameter
|
ClearEverything()
Declaration
public virtual void ClearEverything()
ClearInput()
Declaration
protected virtual void ClearInput()
ClearStacksAndHistory()
Declaration
public virtual void ClearStacksAndHistory()
Delete()
Declaration
protected virtual void Delete()
EnsureBinaryOpeartion(Func<Decimal, Decimal, Decimal>, Decimal, Decimal)
Declaration
protected virtual void EnsureBinaryOpeartion(Func<decimal, decimal, decimal> operationBody, decimal firstArgument, decimal secondArgument)
Parameters
System.Func<System.Decimal, System.Decimal, System.Decimal>
operationBody
|
System.Decimal
firstArgument
|
System.Decimal
secondArgument
|
EnsureUnaryOpeartion(Func<Decimal, Decimal>, Decimal)
Declaration
protected virtual void EnsureUnaryOpeartion(Func<decimal, decimal> operationBody, decimal argument)
Parameters
System.Func<System.Decimal, System.Decimal>
operationBody
|
System.Decimal
argument
|
ExecuteBinaryOperation()
Declaration
protected virtual void ExecuteBinaryOperation()
ExecuteButtonAction(CalculatorAction)
Declaration
protected virtual void ExecuteButtonAction(CalculatorAction calculatorAction)
Parameters
CalculatorAction
calculatorAction
|
ExecuteCommandsOnCtrKeyPressed(Keys)
Executed once Ctrl modifier key and a key from the keyboard are pressed.
Declaration
protected virtual void ExecuteCommandsOnCtrKeyPressed(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
ExecuteCommandsOnKeyPressed(Keys)
Executed once a key from the keyboard is pressed.
Declaration
protected virtual void ExecuteCommandsOnKeyPressed(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
ExecuteCommandsOnShiftKeyPressed(Keys)
Executed once Shift modifier key and a key from the keyboard are pressed.
Declaration
protected virtual void ExecuteCommandsOnShiftKeyPressed(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
ExecuteNumericKeyCommands(Keys)
Declaration
protected virtual void ExecuteNumericKeyCommands(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
ExecuteOperationLogic(Operation)
Declaration
protected virtual void ExecuteOperationLogic(Operation executedOperation)
Parameters
Operation
executedOperation
|
ExecutePercentOperation(Operation)
Declaration
protected virtual void ExecutePercentOperation(Operation executedOperation)
Parameters
Operation
executedOperation
|
ExecuteUnaryOperation(Operation)
Declaration
protected virtual void ExecuteUnaryOperation(Operation executedOperation)
Parameters
Operation
executedOperation
|
FormatStatus(Operation, StatusItem, Boolean)
Declaration
protected virtual void FormatStatus(Operation executedOperation, StatusItem currentStatusItem, bool isExecuted)
Parameters
Operation
executedOperation
|
StatusItem
currentStatusItem
|
System.Boolean
isExecuted
|
MemoryClear()
Declaration
public virtual void MemoryClear()
MemoryMinus()
Declaration
protected virtual void MemoryMinus()
MemoryPlus()
Declaration
protected virtual void MemoryPlus()
MemoryRecall()
Declaration
protected virtual void MemoryRecall()
MemoryStore()
Declaration
protected virtual void MemoryStore()
ModifyDisplayValueOnCalculations(Decimal)
Declaration
protected virtual string ModifyDisplayValueOnCalculations(decimal calculatedNumber)
Parameters
System.Decimal
calculatedNumber
|
Returns
System.String
|
OnButtonKeyDown(KeyEventArgs)
Executed when a key down event is fired.
Declaration
public virtual void OnButtonKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
OnButtonKeyPress(KeyPressEventArgs)
Executed when a key press event is fired.
Declaration
public virtual void OnButtonKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
OnButtonMouseUp(CalculatorButtonType, CalculatorAction, MouseEventArgs)
Executed when a button is mouse up event is fired.
Declaration
public virtual void OnButtonMouseUp(CalculatorButtonType buttonType, CalculatorAction buttonAction, MouseEventArgs e)
Parameters
CalculatorButtonType
buttonType
|
CalculatorAction
buttonAction
|
System.Windows.Forms.MouseEventArgs
e
|
OnInput(Keys)
Declaration
protected virtual void OnInput(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
OnPropertyChanged(String)
Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System.String
propertyName
|
ProcessKeyDown(KeyEventArgs)
Declaration
protected virtual void ProcessKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
ProcessKeyPress(KeyPressEventArgs)
Declaration
protected virtual void ProcessKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Redo()
Declaration
protected virtual void Redo()
Undo()
Declaration
protected virtual void Undo()
UpdateCurrentCalculatorStatus(StatusItem)
Declaration
protected virtual void UpdateCurrentCalculatorStatus(StatusItem statusItem)
Parameters
StatusItem
statusItem
|
UpdateDisplayValueOnInput(String)
Declaration
protected virtual void UpdateDisplayValueOnInput(string commandParameter)
Parameters
System.String
commandParameter
|
UpdateInput(String)
Declaration
protected virtual void UpdateInput(string parameter)
Parameters
System.String
parameter
|
UpdateInputValueOnInputCommand(String)
Declaration
protected virtual void UpdateInputValueOnInputCommand(string commandParameter)
Parameters
System.String
commandParameter
|
UpdateValueOnInputCommand(String)
Declaration
protected virtual void UpdateValueOnInputCommand(string commandParameter)
Parameters
System.String
commandParameter
|