Esempio n. 1
0
 public Task(typeTask _type, string _desc, string _title, string[] _descObj = null)
 {
     this.title    = _title;
     this.typeTask = _type;
     this.desc     = _desc;
     if (typeTask.Tour == _type)
     {
         this.descObj = _descObj;
     }
 }
Esempio n. 2
0
 public Task(typeTask _type, string _desc, string _title, string[] _descObj)
 {
     this.title    = _title;
     this.typeTask = _type;
     this.desc     = _desc;
     if (typeTask.Tour == _type)
     {
         this.descObj = _descObj;
     }
     else
     {
         Debug.LogError("Error: typeTask is not tour");
     }
 }
Esempio n. 3
0
        private void NextBtn_Click(object sender, EventArgs e)
        {
            if (DescTask.Text != "" && TitleTask.Text != "" && TypeTask.SelectedItem.ToString() != "" &&
                currentTask <= countTasks && listTarget[currentPoint][currentTask].Length != 0)
            {
                typeTask type = typeTask.Find;
                if (TypeTask.SelectedItem.ToString() == "Find")
                {
                    type = typeTask.Find;
                }
                else if (TypeTask.SelectedItem.ToString() == "MultiFind")
                {
                    type = typeTask.MultiFind;
                }
                else if (TypeTask.SelectedItem.ToString() == "Tour")
                {
                    type = typeTask.Tour;
                }
                if (typeTask.Tour == type && listDescTarget.Length == (int)numTarget.Value)
                {
                    tasks[currentTask] = new Task(type, DescTask.Text, TitleTask.Text, listDescTarget);
                }
                else if (typeTask.Tour != type)
                {
                    tasks[currentTask] = new Task(type, DescTask.Text, TitleTask.Text);
                }
                else
                {
                    MessageBox.Show("Error", "Count descTarget is not equal count target", MessageBoxButtons.OK);
                }
                currentTask++;
                curTask.Text = (currentTask + 1).ToString();

                if (currentTask >= countTasks)
                {
                    NextBtn.Enabled      = false;
                    NextPointBtn.Visible = true;
                }
            }
            else
            {
                MessageBox.Show("Заполните все поля", "Error", MessageBoxButtons.OK);
            }
        }
Esempio n. 4
0
 public Task(typeTask _type, string _desc, string _title)
 {
     this.title    = _title;
     this.typeTask = _type;
     this.desc     = _desc;
 }