Ejemplo n.º 1
0
        //编辑某任务配置
        private void EditTask_Click(object sender, EventArgs e)
        {
            var item = TaskListView.SelectedItems.Count > 0 ? TaskListView.SelectedItems[0] : null;

            if (item == null)
            {
                //frmEditTask frmEditTask = new frmEditTask();
                //frmEditTask.ShowDialog();
            }
            else
            {
                var config = Constants.config.taskConfigs.FirstOrDefault(n => n.TaskId.ToString().Equals(item.Text));
                if (config != null)
                {
                    frmEditTask frmEditTask = new frmEditTask(config);
                    frmEditTask.ShowDialog();
                }
            }
        }
Ejemplo n.º 2
0
        private void 添加任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmEditTask frmEditTask = new frmEditTask();

            frmEditTask.ShowDialog();
        }