Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 public bool CheckTaskBySearch(DTask task)
 {
     if (string.IsNullOrEmpty(TextSearch))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemplo n.º 4
0
        public void Show()
        {
            DTask db = ReadCfgTask.GetDataById(taskID);

            if (db == null)
            {
                return;
            }
            taskName.text       = db.Name;
            taskIcon.spriteName = db.Icon;
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        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,
                });
            }));
        }
Exemplo n.º 8
0
    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();
    }
Exemplo n.º 9
0
        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));
            }
        }
Exemplo n.º 10
0
 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);
     }
 }
Exemplo n.º 11
0
 void CopyTaskTitleMethod(DTask dTask)
 {
     Clipboard.SetText(dTask?.CopyTaskLink());
 }
Exemplo n.º 12
0
 void LoadTask(DTask dTask)
 {
     Task = MainContext.GetEntities <DTask>().Single(a => a.Id == dTask.Id);
 }
Exemplo n.º 13
0
 public CommentViewModel(DTask dTask)
 {
     LoadTask(dTask);
 }
Exemplo n.º 14
0
 public TaskInfoViewModel(DTask dTask)
 {
     SelectedTask = dTask;
     ActiveItem   = new CommentViewModel(SelectedTask);
 }