//主窗体加载方法
private void ReleaseOutForm_Load(object sender, EventArgs e)
{
//水库下拉列表
util=new ReleaseOutUtil();
String[] arr1 = util.getSTNM("1");//1表示水库类型
comboBoxEx1.DataSource = arr1;
comboBoxEx1.SelectedIndex = 0;
comboBoxEx1.DropDownStyle = ComboBoxStyle.DropDownList;//设为只读
//建筑物下拉列表
string[] arr2 = new string[2];
arr2[0] = "泄洪洞";
arr2[1] = "溢洪道";
comboBoxEx2.DataSource = arr2;
comboBoxEx2.SelectedIndex = 0;
comboBoxEx2.DropDownStyle = ComboBoxStyle.DropDownList;//设为只读
//起始、截止时间
dateTimeInput1.Value = DateTime.Now.AddMonths(-1);
dateTimeInput2.Value = DateTime.Now;
dateTimeInput1.MaxDate = DateTime.Now;
dateTimeInput2.MaxDate = DateTime.Now;
}
c#主窗体加载方法
最新推荐文章于 2024-04-23 09:02:40 发布