































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
































private void button4_Click(object sender, EventArgs e) { int b = Convert.ToInt32(textBox8.Text); if (textBox5.Text == textBox7.Text) { c = c + b; } else { MessageBox.Show("Invalid Account Number"); } richTextBox1.SelectedText= Environment.NewLine +"Account " + textBox5.Text + ",Deposite" + textBox8.Text + "$"+ ", balance" + c.ToString() +"$"; richTextBox1.SelectionColor = Color.Blue; } private void Form3_Load(object sender, EventArgs e) { textBox25.Enabled = false; textBox26.Enabled = false; comboBox2.Enabled = false; //comboBox3.Enabled = false; comboBox4.Enabled = false; radioButton3.Enabled = false; radioButton4.Enabled = false; comboBox2.Items.Add("Bus"); comboBox2.Items.Add("Lorry"); comboBox2.Items.Add("Van"); comboBox2.Items.Add("Car"); comboBox2.Items.Add("Motor cycle"); for (int i = 1970; i <= 2010; i++) { comboBox3.Items.Add(i.ToString()); }
comboBox4.Items.Add("Misubishi"); comboBox4.Items.Add("Toyota"); comboBox4.Items.Add("Zuzuki"); comboBox4.Items.Add("Honda"); comboBox4.Items.Add("TVS"); comboBox4.Items.Add("Bajaj"); } private void button31_Click(object sender, EventArgs e) { string c = textBox25.Text; //string a = comboBox2.Text; if(comboBox2.SelectedItem == "Bus") { textBox26.Text = 2500.ToString(); } else if (comboBox2.SelectedItem == "Lorry") { textBox26.Text = 2500.ToString(); } else if (comboBox2.SelectedItem == "Van") { textBox26.Text = 1500.ToString(); } else if (comboBox2.SelectedItem == "Car") { textBox26.Text = 1750.ToString(); } else if (comboBox2.SelectedItem == "Motor cycle") { textBox26.Text = 400.ToString(); } int a = Convert.ToInt32(textBox26.Text); if (radioButton1.Checked) { textBox26.Text = (a +0).ToString(); } else { textBox26.Text =( a + 5000).ToString();
GreenLight.Visible = true; } else if (GreenLight.Visible == true) { RedLight.Visible = false; YellowLight.Visible = true; GreenLight.Visible = false; } else if (YellowLight.Visible == true) { RedLight.Visible = true; YellowLight.Visible = false; GreenLight.Visible = false; } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; } private void button2_Click(object sender, EventArgs e) { timer1.Enabled = false; } } } Text File private void button1_Click(object sender, EventArgs e) { string filepath =@"C:\Users\NEXT GEN\Desktop"+"\New folder\"+textBox1.Text+".txt"; StreamWriter writer =new StreamWriter(filepath); using (writer)
writer.WriteLine("Letter :" + textBox1.Text); }
Telephone Charge private void button1_Click(object sender, EventArgs e) { int c = Convert.ToInt32(textBox1.Text); int d = Convert.ToInt32(textBox2.Text); if (radioButton1.Checked) {
private void Form1_Load(object sender, EventArgs e) { comboBox1.Items.Add(10); comboBox1.Items.Add(20);
comboBox1.Items.Add(30); } private void button1_Click(object sender, EventArgs e) { int q = Convert.ToInt32(textBox1.Text); int d = Convert.ToInt32(comboBox1.Text); if (radioButton1.Checked) { textBox2.Text= 750.ToString(); } else if (radioButton2.Checked) { textBox2.Text = 1500.ToString(); } else if (radioButton3.Checked) { textBox2.Text= 2000.ToString(); } int u = Convert.ToInt32(textBox2.Text); textBox3.Text =(( u * q * d) / 100).ToString(); textBox4.Text =( (q * u) - ((u * q * d) / 100)).ToString(); }