软件界面:
软代码:
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 comport
{
public partial class Form1 : Form
{
int count;
int time;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)//下拉框的选择
{
int i;
for (i = 0; i < 100; i++)
{
comboBox1.Items.Add(i.ToString() + " 秒");
}
comboBox1.Text = "5 秒";//下拉框选择的初始化
}
private void button1_Click(object sender, EventArgs