1月2 每日打卡

实验:

 

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 shiyan3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.comboBox1.Items.Add("团员");
this.comboBox1.Items.Add("群众");
this.comboBox1.Items.Add("预备党员");
this.comboBox1.Items.Add("党员");
this.comboBox2.Items.Add("信息科学与技术学院");
this.comboBox2.Items.Add("土木学院");
this.comboBox2.Items.Add("经济管理学院");
this.comboBox2.Items.Add("电气学院");
this.comboBox2.Items.Add("文法学院");
this.comboBox3.Items.Add("信2105-1");
this.comboBox3.Items.Add("信2105-2");
this.comboBox3.Items.Add("信2105-3");
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{


}

private void radioButton2_CheckedChanged(object sender, EventArgs e)
{

}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{

}

private void textBox4_TextChanged(object sender, EventArgs e)
{

}

private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{

}

private void textBox1_TextChanged(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)

{
string msg = "";
msg = "姓名:" + textBox1.Text + "学号:" + textBox2.Text + "性别:";
if (radioButton1.Checked)
{
msg = msg + radioButton1.Text;
}
else if (radioButton2.Checked)
{
msg = radioButton2.Text;
}
msg = msg + "政治面貌" + this.comboBox1.SelectedItem.ToString();
msg = msg + "院系" + this.comboBox2.SelectedItem.ToString() + "爱好:";
if (checkBox1.Checked)
{
msg = msg + " " + checkBox1.Text;
}
if (checkBox2.Checked)
{
msg = msg + " " + checkBox2.Text;
}
if (checkBox3.Checked)
{
msg = msg + " " + checkBox3.Text;
}
if (checkBox4.Checked)
{
msg = msg + " " + checkBox4.Text;
}
MessageBox.Show(msg);
}

private void label1_Click(object sender, EventArgs e)
{

}

private void label4_Click(object sender, EventArgs e)
{

}

private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}

 

posted @ 2024-01-02 22:31  云边上打盹  阅读(10)  评论(0)    收藏  举报