using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if(checkBox1.Checked==true)
{
label3.Enabled = true;
textBox3.Enabled = true;
}
else
{
label3.Enabled = false;
textBox3.Enabled = false;
}
}
private void button1_Click(object sender, EventArgs e)
{
int cd=int.Parse(textBox1.Text);
int cr = int.Parse(textBox2.Text);
if(checkBox1.Checked==true)//hinh hop
{
int cc = int.Parse(textBox3.Text);
HH a = new HH(cd, cr, cc);
label4.Text= a.xuatTT();
}
else
{
HCN a = new HCN(cd, cr);
label4.Text = a.xuatTT();
}
}
}
}
0 comments:
Post a Comment