Public Class Form1 Enum karrar text1 = 250 text11 = 350 text12 = 500 text13 = 750 text14 = 850 text15 = 1000 End Enum Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged If TextBox1.Text = "4" Then Label9.Text = karrar.text15 ElseIf TextBox1.Text = "3.5" Then Label9.Text = karrar.text14 ElseIf TextBox1.Text = "3" Then Label9.Text = karrar.text13 ElseIf TextBox1.Text = "2.5" Then Label9.Text = karrar.text12 ElseIf TextBox1.Text = "2" Then Label9.Text = karrar.text11 ElseIf TextBox1.Text = "1.5" Then Label9.Text = karrar.text1 ElseIf TextBox1.Text = "1" Then Label9.Text = karrar.text1 Else Label9.Text = " " End If End Sub Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles TextBox6.TextChanged If TextBox6.Text = "جمالي" Then Label14.Text = karrar.text1 ElseIf TextBox6.Text = "كعب" Then Label14.Text = karrar.text12 ElseIf TextBox1.Text = "3" Or "5" Then Label14.Text = " " End If End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button2.Click, Button1.Click If Not IsNumeric(TextBox1.Text) Or Not IsNumeric(TextBox2.Text) Or Not IsNumeric(TextBox3.Text) Or Not IsNumeric(TextBox4.Text) Or Not IsNumeric(TextBox5.Text) Or Not IsNumeric(TextBox6.Text) Then MsgBox("برنامج حساب الكلفة /خاص بدار الوارث", MsgBoxStyle.Information) Exit Sub End If End Sub Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged If TextBox2.Text = "4" Then Label10.Text = karrar.text13 ElseIf TextBox2.Text = "3" Then Label10.Text = karrar.text14 ElseIf TextBox2.Text = "2" Then Label10.Text = karrar.text12 ElseIf TextBox2.Text = "1" Then Label10.Text = karrar.text11 ElseIf TextBox1.Text = "3" Or "5" Then Label10.Text = " " End If End Sub Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged If TextBox3.Text = "4" Then Label11.Text = karrar.text13 ElseIf TextBox3.Text = "3" Then Label11.Text = karrar.text12 ElseIf TextBox3.Text = "2" Then Label11.Text = karrar.text11 ElseIf TextBox3.Text = "1" Then Label11.Text = karrar.text13 Else Label11.Text = " " Exit Sub End If End Sub Private Sub TextBox4_TextChanged(sender As Object, e As EventArgs) Handles TextBox4.TextChanged If TextBox4.Text = "250" Then Label12.Text = karrar.text13 ElseIf TextBox4.Text = "170" Then Label12.Text = karrar.text12 Else Label12.Text = " " Exit Sub End If End Sub Private Sub TextBox5_TextChanged(sender As Object, e As EventArgs) Handles TextBox5.TextChanged If TextBox5.Text = "100" Then Label13.Text = karrar.text13 Else Label13.Text = " " Exit Sub End If End Sub Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged Label15.Text = "30" End Sub Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Label16.Text = "33" End Sub Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged Label17.Text = "40" If Not IsNumeric(Label17.Text) Then Label17.Text = " " End If End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click If RadioButton1.Checked Then Form2.Show() End If End Sub End Class End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)