Example #1
0
 void heavyProcessTimer_Tick(object sender, EventArgs e)
 {
     if (!threadProcess.IsAlive)
     {
         heavyProcessTimer.Stop();
         MyListBox.Focus();
         ShowResult(...);
     }
 }
Example #2
0
 void ToAdd()//准备新增分组
 {
     Operation            = true;
     button1.Text         = "确认新增";
     textBox1.Text        = "";
     numericUpDown1.Value = 50;
     LB.ClearSelected();
     LB.Focus();
 }
Example #3
0
 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();
 }
Example #4
0
 void ToAdd()
 {
     Operation             = true;
     button2.Text          = "确认新增";
     textBox1.Text         = "";
     dateTimePicker1.Value = DateTime.Now;
     checkBox1.Checked     = false;
     LB.ClearSelected();
     label2.Text = "";
     label4.Text = "";
     LB.Focus();
 }