示例#1
0
 protected override void OnStart(string[] args)
 {
     if (Properties.Settings.Default.Cover)
     {
         Cover.Bind();
     }
     if (Properties.Settings.Default.Staff)
     {
         Staff.Bind();
     }
     if (Properties.Settings.Default.Rooms)
     {
         Rooms.Bind();
     }
 }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button1.Text == "Start")
     {
         if (Properties.Settings.Default.Cover)
         {
             Cover.Bind();
         }
         if (Properties.Settings.Default.Staff)
         {
             Staff.Bind();
         }
         if (Properties.Settings.Default.Rooms)
         {
             Rooms.Bind();
         }
         button1.Text = "Stop";
         listBox1.Items.Clear();
         Worker.Start();
     }
     else
     {
         if (Properties.Settings.Default.Cover)
         {
             Cover.Unbind();
         }
         if (Properties.Settings.Default.Staff)
         {
             Staff.Unbind();
         }
         if (Properties.Settings.Default.Rooms)
         {
             Rooms.Unbind();
         }
         button1.Text = "Start";
         stop         = true;
         Worker.Abort();
     }
 }