// Namespace MyCalClass
// Class Name: CalClass
// The constructor CalClass () without Parameters ()
// 6 private variables used
// Void PointClick () by decimal point
// String CE () is used for resetting the calculator. The clear Function
// String BackSpace (string Txt) regressing key. The parameter is the calculation result displayed during calculation.
// String NumClick (string Txt, int NumKey) 0-9 numeric key press response, Txt is the calculation result, and NumKey is the numeric value pressed
// String OpClick (string Txt, int OpKey) +,-, *,/, = processing when several keys are pressed. Txt is the current calculation result, opKey is the numeric ID for pressing the operation key.
Namespace MyCalClass
{
Public class CalClass
{
Private string ResultTxt; // Get and Show The Result of the TextBox in application
Private bool PointIsDown; // If the radix point was clicked;
Private double MidResult; // To Store middle results
Private double Results; // To store finally result
Private int LastClick; // To sign last clicking button class, is number (1) or operator (2)
Private int LastOperator; // To sign last clicked button of operator is who? 0 is Null, 1 is +, 2 is-, 3 is *, 4 is/, 5 is =;
Public CalClass ()
{
ResultTxt = "0 .";
PointIsDown = false;
MidResult = 0;
Results = 0;
LastClick = 0;