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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private string Ctype;
private string Cartype;
private void tip_Click(object sender, EventArgs e)
{
info.Text="username:"+a.Text+","+"user type:"+Ctype+","+"car type:"+Cartype;
}
private void school_CheckedChanged(object sender, EventArgs e)
{
Ctype = "school";
}
private void company_CheckedChanged(object sender, EventArgs e)
{
Ctype = "company";
}
private void car_CheckedChanged(object sender, EventArgs e)
{
if (car.Checked)
{
Cartype = Cartype + car.Text;
}
else
{
Cartype.Replace(car.Text+"</br>","");
Cartype.Trim();
}
}
private void suv_CheckedChanged(object sender, EventArgs e)
{
if (suv.Checked)
{
Cartype = Cartype + suv.Text;
}
else
{
Cartype.Replace(suv.Text + "</br>", "");
Cartype.Trim();
}
}
private void mpv_CheckedChanged(object sender, EventArgs e)
{
if (mpv.Checked)
{
Cartype = Cartype + mpv.Text;
}
else
{
Cartype.Replace(mpv.Text + "</br>", "");
Cartype.Trim();
}
}
private void clear_Click(object sender, EventArgs e)
{
Cartype = "";
}
}
}