void heavyProcessTimer_Tick(object sender, EventArgs e) { if (!threadProcess.IsAlive) { heavyProcessTimer.Stop(); MyListBox.Focus(); ShowResult(...); } }
void ToAdd()//准备新增分组 { Operation = true; button1.Text = "确认新增"; textBox1.Text = ""; numericUpDown1.Value = 50; LB.ClearSelected(); LB.Focus(); }
void DefineView() { LBGroups = new MyListBox(listBox1, "select GroupID,GroupName from LabelGroups where LocationID=" + INI.GetLocationID() + " order by GroupOrder", "GroupName", "GroupID", Global.con); try { FirstGroupID = ((DataRowView)LBGroups.Items[0])["GroupID"].ToString(); } catch { FirstGroupID = "0"; } LBLabels = new MyListBox(listBox2, "select LabelName,Path from Labels where GroupID=" + FirstGroupID + " order by LabelOrder", "LabelName", "Path", Global.con); try { LBGroups.SelectedIndex = 0; } catch { } LBLabels.Focus(); }
void ToAdd() { Operation = true; button2.Text = "确认新增"; textBox1.Text = ""; dateTimePicker1.Value = DateTime.Now; checkBox1.Checked = false; LB.ClearSelected(); label2.Text = ""; label4.Text = ""; LB.Focus(); }