Академический Документы
Профессиональный Документы
Культура Документы
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DeviceApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a = Convert.ToInt32(textBox1.Text);
int b = Convert.ToInt32(textBox2.Text);
int s = a + b;
textBox3.Text = s . ToString();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DeviceApplication5
{
public partial class Form1 : Form
{
private bool clr;
private string t, optr;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "1";
clr = false;
}
private void button16_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "0";
clr = false;
}
private void button3_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "3";
clr = false;
}
private void button2_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "2";
clr = false;
}
private void button4_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "4";
clr = false;
}
private void button5_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "5";
clr = false;
}
private void button6_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "6";
clr = false;
}
private void button7_Click(object sender, EventArgs e)
{
if (clr) kq.Text = " ";
if (optr == ".") kq.Text = kq.Text + ".";
kq.Text = kq.Text + "7";
clr = false;
}
}
}
}