kolejne:
private void button1_Click(object sender, EventArgs e)
{
double a = 0;
double b = 0;
a= Convert.ToDouble(textBox1.Text);
{
if (radioButton1.Checked)
b = a /1852;
else if (radioButton2.Checked)
b= a/1609;
else if (radioButton3.Checked)
b=a/0.95;
else if (radioButton4.Checked)
b=a/0.025;
}
textBox2.Text = Convert.ToString(b);
}
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("5");
comboBox1.Items.Add("10");
comboBox1.Items.Add("15");
comboBox1.Items.Add("20");
listBox1.Items.Add("5");
listBox1.Items.Add("10");
listBox1.Items.Add("15");
listBox1.Items.Add("20");
}
private void button1_Click(object sender, EventArgs e)
{
double a = 0;
double b = 0;
double c = 0;
a = Convert.ToDouble(comboBox1.Text);
b = Convert.ToDouble(listBox1.Text);
c = a * b;
textBox1.Text = Convert.ToString(c);
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("5");
comboBox1.Items.Add("10");
comboBox1.Items.Add("15");
comboBox1.Items.Add("20");
listBox1.Items.Add("5");
listBox1.Items.Add("10");
listBox1.Items.Add("15");
listBox1.Items.Add("20");
for(int i=1; i <=100; i++)
{
comboBox2.Items.Add(i);
}
for (int i = 0; i <= 500; i++)
{
listBox2.Items.Add(i);
}
}
private void button1_Click(object sender, EventArgs e)
{
double a = 0;
double b = 0;
double c = 0;
double e = 0;
double f = 0;
a = Convert.ToDouble(comboBox1.Text);
b = Convert.ToDouble(listBox1.Text);
e = Convert.ToDouble(comboBox2.Text);
f = Convert.ToDouble(listBox2.Text);
c = a * b;
c = (a ^ 2 + b ^ 2) / (e + f);
textBox1.Text = Convert.ToString(c);