private void Button_Click(object sender, RoutedEventArgs e)
        {
            创建计划类 op = new 创建计划类();

            op.ShowDialog();
            this.lingTasker = LingTasker.keys;
            LingTasker.keys = new KeyValuePair <List <DateTime>, string>();
            if (lingTaskQueue.update(this.lingTasker))
            {
                lingTaskQueue.start();
            }
        }
예제 #2
0
        private void skinButton2_Click(object sender, EventArgs e)
        {
            if (redel == true)
            {
                LingTaskQueuer ling = lingTaskQueue.getLingTaskQueuer();
                ///
                if (tp.Count == 0)
                {
                    ling.delindex(int.Parse(skinTextBox1.Text) - 1);
                }
                else
                {
                    string s1 = skinDataGridView1.Rows[int.Parse(skinTextBox1.Text) - 1].Cells[0].Value.ToString();
                    string s2 = skinDataGridView1.Rows[int.Parse(skinTextBox1.Text) - 1].Cells[1].Value.ToString();
                    List <KeyValuePair <string, string> > b = built();
                    int index = b.IndexOf(new KeyValuePair <string, string>(s1, s2));
                    ling.delindex(index);
                }


                lingTaskQueue.setLingTaskQueuer(ling);
            }
            else
            {
                lingTaskQueue.stop();
                lingTaskQueue.getLingTaskQueuer().delall();

                List <KeyValuePair <DateTime, string> > queues = new List <KeyValuePair <DateTime, string> >();
                for (int i = 0, j = controlDataGridView.getRownum(); i < j; ++i)
                {
                    queues.Add(new KeyValuePair <DateTime, string>(Convert.ToDateTime(this.skinDataGridView1.Rows[i].Cells[1].Value.ToString()), this.skinDataGridView1.Rows[i].Cells[2].Value.ToString()));
                }
                lingTaskQueue.setLingQueuer(queues);

                lingTaskQueue.start();
            }

            skinButton1_Click(sender, e);
        }