第一次进行WPF开发。。。
class Number { private string str_buffer = null; private decimal dec_buffer = 0m; public void plus() { dec_buffer = Convert.ToDecimal(str_buffer); this.Result += dec_buffer; str_buffer = null; dec_buffer = 0m; this.expression += "+"; } public void equal() { dec_buffer = Convert.ToDecimal(str_buffer); this.Result += dec_buffer; str_buffer = null; dec_buffer = 0m; } private string expression; public string Expression { get { return expression; } set { str_buffer += value; expression = this.Expression + value; } } private decimal result; public decimal Result { get { return result; } set { result = value; } } public void clear() { dec_buffer = 0m; str_buffer = null; expression = ""; result = 0m; } }
binding想用但不会用啊。。
时间: 2024-11-05 03:07:15