C#编写的windows计算器-源代码(29) #endregion /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.Run(new Form1()); }
/// <summary> #region 获取操作数事件 //获取操作数事件 private void btn_0_Click(object sender, System.EventArgs e) { System.Windows.Forms.Button btnTmp; double i;
btnTmp = sender as System.Windows.Forms.Button; if (btnTmp != null) { if (dot == NODOT) { // 没有点击小数点 i = double.Parse(btnTmp.Tag.ToString()); //取用户自定义的控件关联数,并转换成double型