Tra Từ Điển

Thời gianTiếtThứ 2Thứ 3Thứ 4Thứ 5Thứ 6
8g40 - 9g101Tiếng Việt
Tiếng Anh
Tiếng Việt
Tiếng Việt
9g10 - 9g302Nghỉ giải lao
Tiếng Anh
Nghỉ giải lao
Nghỉ giải lao
9g30 - 10g3Toán
Toán
Toán

Sunday, March 21, 2021

C# Form1 & Hình Chữ Nhật, Hình Hộp

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