Table of Contents

Class Calculator

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Calculator control with buttons and display.

public class Calculator : HiddenBorder, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo
Inheritance
Calculator
Implements

Remarks

Calculator

Constructors

Calculator()

Initializes a new instance of the Calculator class.

Fields

DefaultButtonDistance

Gets or sets default distance between buttons of the calculator.

DefaultButtonPadding

Represents the default padding applied to buttons.

DefaultDistanceToDisplay

Gets or sets default distance between calculator display and buttons.

DefaultMinButtonSize

Gets or sets default minimum button size.

Properties

Buttons

Gets collection of calculator buttons.

ButtonsPanel

Gets panel with buttons.

DisplayTextBox

Gets display control.

FormulaGlobalContext

Gets or sets script global context used in the formula evaluation. Default is Null.

FormulaGlobalType

Gets or sets script global type used in the formula evaluation. Default is Null.

FormulaOptions

Gets or sets script options used in the formula evaluation. Default is Null.

SetOfButtons

Gets collection of calculator buttons as ControlSet.

WantReturn

Gets or sets a value indicating whether a "Return" key is processed. DoActionCalcFormula() is called when "Return" key is pressed and WantReturn is true (default value).

Methods

CreateButton()

Creates button used in the calculator.

DoActionCalcFormula()

Evaluates the formula entered in the display text box and updates the result.

DoActionClearAll()

Clears all text in the formula.

DoActionClearLast()

Clears the last character in the formula.

DoActionToggleSign()

Toggles the sign of the formula.

Evaluate(string)

Evaluates formula.

EvaluateAsync<T>(string)

Asynchronously evaluates the specified formula and returns the result as the specified type.

SetFocus()

Sets input focus to the control.