Exemplo n.º 1
0
        /// <summary>
        /// 添加新任务到队列
        /// </summary>
        /// <param name="data">模板数据</param>
        /// <param name="pluginData">插件自定义数据</param>
        /// <returns>返回创建的任务</returns>
        public static TaskInfoModel Add(TemplateModel data, object pluginData = null)
        {
            TaskInfoModel model = new TaskInfoModel()
            {
                Data       = data.Clone(),
                PluginData = pluginData,
            };

            TaskList.Add(model);
            return(model);
        }
Exemplo n.º 2
0
 private void tsbSaveTask_Click(object sender, EventArgs e)
 {
     task.Data = data.Clone();
 }