嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 5 元微信扫码支付:5 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
WinCE系统简单计算器
WinCE计算器
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "1";
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "2";
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "3";
}
private void button4_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "4";
}
private void button5_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "5";
}
private void button6_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "6";
}
private void button7_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "7";
}
private void button8_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "8";
}
private void button9_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "9";
}
private void button10_Click(object sender, EventArgs e)
{
if (textBox1.Text == "0")
textBox1.Text = "";
this.textBox1.Text = "0";
}
private void button11_Click(object sender, EventArgs e)
{
this.textBox1.Text = ".";
}
private void button12_Click(object sender, EventArgs e)
{
string s1 = textBox1.Text;
int len = s1.Length;
try
{
this.textBox1.Text = s1.Substring(0, len - 1);
}
catch (Exception)
{
DialogResult result = MessageBox.Show("出现异常", "提示");
}
}
private void button13_Click(object sender, EventArgs e)
{
this.textBox1.Text = " ";
}
private void button14_Click(object sender, EventArgs e)
{
this.textBox1.Text = "-";
}
private void button15_Click(object sender, EventArgs e)
{
this.textBox1.Text = "*";
}
private void button16_Click(object sender, EventArgs e)
{
this.textBox1.Text = "/";
}
private void button17_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
this.textBox1.Text = dt.Compute(textBox1.Text, "").ToString();
}