日期:2014-05-17 浏览次数:20946 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 日月选择器
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
comboBox2.Items.Clear();
string s = comboBox1.Text;
if (s == "2")
{
for (int i = 1; i <= 28; i++)
{
comboBox2.Items.Add(i); }
}
else if (s == "4" || s == "6" || s == "9" || s == "11")
{
for (int i = 1; i <= 30; i++)
{
comboBox2.Items.Add(i);
}
}
else
{
for (int i = 1; i <= 31; i++)
{
&nb