计算器2------C#窗体
来源:互联网 发布:用友t软件视频教程 编辑:程序博客网 时间:2024/05/22 15:07
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace form1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private int op1, op2, re;
private char op;
private void button2_Click(object sender, EventArgs e)
{
this.textBox1.Text = "";
this.textBox2.Text = "";
this.textBox3.Text = "";
}
private void button1_Click(object sender, EventArgs e)
{
op1 = int.Parse(this.textBox1.Text);
op2 = int.Parse(this.textBox2.Text);
if (radioButton1.Checked == true)
{
re = op1 + op2;
this.textBox3.Text = re.ToString();
}
if (radioButton2.Checked == true)
{
re = op1- op2;
this.textBox3.Text = re.ToString();
}
if (radioButton3.Checked == true)
{
re = op1 * op2;
this.textBox3.Text = re.ToString();
}
if (radioButton4.Checked == true)
{
re = op1 /op2;
this.textBox3.Text = re.ToString();
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
- 计算器2------C#窗体
- 计算器1 ------C#窗体
- C#窗体-简单计算器
- C#编写简单窗体计算器
- C# 计算器
- C# 计算器
- c# 计算器
- C# 计算器
- c#计算器
- C#计算器
- C# 计算器
- C#计算器
- C# 计算器
- c# 计算器
- C#窗体
- C# 透明窗体制作方法比较(2)
- C#窗体Combobox简单用法(2)
- C# 透明窗体制作方法比较(2)
- 生活
- as a designer
- 学习
- gfd
- 扫雷-----C#窗体
- 计算器2------C#窗体
- debian package tools (续)
- 编写可移植C/C++程序的要点
- 啊
- 我要记住的话
- C#中treeview的基本使用方法
- 出现频率最高的笔试题strcpy写法
- 时间的励志名言
- 青春励志格言