Exemple #1
0
 public ElementaryArithCommand(object receiver, string Operator, int Operand)
     : base(receiver, Operator, Operand)
 {
     if (receiver.GetType() == typeof(ElementaryArithCaculator))
     {
         this._caculator = (ElementaryArithCaculator)receiver;
     }
 }
 public JsonResult Clear()
 {
     ElementaryArithCaculator receiver;
     if (Session["calculator"] == null)
     {
         Session.Add("calculator", new ElementaryArithCaculator());
     }
     receiver = new ElementaryArithCaculator();
     Session["calculator"] = receiver;
     return Json(receiver.GetResult(), JsonRequestBehavior.AllowGet);
 }
 public ElementaryArithCommand(object receiver, string Operator, int Operand)
     : base(receiver, Operator, Operand)
 {
     if (receiver.GetType() == typeof(ElementaryArithCaculator))
         this._caculator = (ElementaryArithCaculator)receiver;
 }