Пример #1
0
 private void butAddTask_Click(object sender, RoutedEventArgs e)
 {
     if (infoManager.anyProfileExists())
     {
         TaskInfoWindow tiw = new TaskInfoWindow(bot, false, "");
         tiw.Show();
     }
     else
     {
         MessageBox.Show(Properties.Resources.errorAddProfileFirst);
     }
 }
Пример #2
0
        private void butEditTask_Click(object sender, RoutedEventArgs e)
        {
            LvTaskItem gti = ((LvTaskItem)lvTasks.SelectedItem);

            if (gti != null)    // something is selected
            {
                TaskInfo ti = (TaskInfo)infoManager.GetTaskByName(gti.TaskName);

                TaskInfoWindow tiw = new TaskInfoWindow(bot, true, ti.name);
                tiw.fillWithTaskInfo(ti);
                tiw.Show();
            }
            else
            {
                MessageBox.Show(Properties.Resources.errorSelectTaskFirst);
            }
        }