void StartTimer(DTask dTask) { System.Windows.Forms.Application.EnableVisualStyles(); // System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); MainForm mainForm = new MainForm(dTask.GetTimerType()); System.Windows.Forms.Application.Run(mainForm); }
public void run(DTask task) { task .Sites .Select(x => x.Url) .Select(x => x.get_content(client)) .SelectMany(x => x.load(task.Rules)) .each(x => task.result(x)); }
public bool CheckTaskBySearch(DTask task) { if (string.IsNullOrEmpty(TextSearch)) { return(false); } else { return(true); } }
public void Show() { DTask db = ReadCfgTask.GetDataById(taskID); if (db == null) { return; } taskName.text = db.Name; taskIcon.spriteName = db.Icon; }
public TaskNode(DObject obj, IRepository repository) { var task = new DTask(obj, repository); Id = task.Id; Title = task.DisplayTitle; Initiator = task.GetInitiatorDisplayName(repository); Executor = task.GetExecutorDisplayName(repository); State = task.State; Kind = task.Kind; DateOfAssignment = task.DateOfAssignment; DeadlineDate = task.DeadlineDate; DateOfStart = task.DateOfStart; }
public TaskViewModel(DTask task) { Users = new ObservableCollection<User>(MainContext.GetEntities<User>()); Periods = new ObservableCollection<Period>(MainContext.GetEntities<Period>()); Tasks = new ObservableCollection<DTask>(MainContext.GetEntities<DTask>()); Statuses.Add(Status.NotStarted); Statuses.Add(Status.InProgress); Statuses.Add(Status.Done); Weights.Add(Weight.Low); Weights.Add(Weight.Big); Weights.Add(Weight.High); SelectedTask = MainContext.GetEntities<DTask>().Single(a => a.Id == task.Id); }
public static IEnumerable <DTask> generate(this DUrlTemplate source) { var data_bag = source.DataBag; var url = source.Url; return(data_bag.MinValue .to(data_bag.MaxValue) .Select(x => { var task = new DTask(); var uri = url.Replace(data_bag.Key, x.ToString()); return task.init(new DSite() { Host = source.Host, Uri = uri, }); })); }
private void OnRecvSubmitTask(int pTaskID) { DTask db = ReadCfgTask.GetDataById(pTaskID); List <ItemTask> pList = mTasks[db.Type]; UIGrid grid = mGrids[db.Type]; for (int i = 0; i < pList.Count; i++) { ItemTask tab = pList[i]; if (tab.taskID == pTaskID) { grid.RemoveChild(tab.go.transform); pList.Remove(tab); GameObject.Destroy(tab.go); break; } } ResetView(); }
public TaskDetailsViewModel(Guid taskId, IRepository repository) { var objs = repository.GetObjects(new[] { taskId }); if (!objs.Any()) { return; } var task = new DTask(objs.First(), repository); Title = task.Title; Description = task.Description; Initiator = task.GetInitiatorDisplayName(repository); Executor = task.GetExecutorDisplayName(repository); if (task.InitiatorAttachments.Any()) { Attachments = repository.GetObjects(task.InitiatorAttachments.ToArray()).Select(a => new Attachment(a, repository)); } }
private void AddTaskCmd() { try { var newTask = new DTask(); MainContext.AddEntity(newTask); Tasks.Add(newTask); SelectedTask = newTask; SelectedTask.Assignee = User; SelectedTask.CreatedBy = User; SelectedTask.Validator = User; SelectedTask.Period = CurrentPeriod; SaveCmd(); NotifyOfPropertyChange(nameof(SelectedTask)); } catch (Exception ex) { string msg = Helper.GetMessage(ex); // Message.ShowErrorMsg("This Task is already exists! Title must be unique!\n" + msg); } }
void CopyTaskTitleMethod(DTask dTask) { Clipboard.SetText(dTask?.CopyTaskLink()); }
void LoadTask(DTask dTask) { Task = MainContext.GetEntities <DTask>().Single(a => a.Id == dTask.Id); }
public CommentViewModel(DTask dTask) { LoadTask(dTask); }
public TaskInfoViewModel(DTask dTask) { SelectedTask = dTask; ActiveItem = new CommentViewModel(SelectedTask); }