示例#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();
                }
            }
        }
示例#2
0
        private void 添加任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmEditTask frmEditTask = new frmEditTask();

            frmEditTask.ShowDialog();
        }