private void TaskSchedulerCompleted(TaskScheduler taskScheduler)
        {
            this._TaskSchedulers.Remove(taskScheduler);
            switch (taskScheduler.ActionType)
            {
                case ActionType.OneTime:
                    break;
                case ActionType.Daily:
                    taskScheduler.LastRunTime = taskScheduler.RunTime;
                    taskScheduler.RunTime = DateTime.Now + TimeSpan.FromDays(1);
                    this._TaskSchedulers.Add(taskScheduler);
                    break;
                case ActionType.Weekly:
                    taskScheduler.LastRunTime = DateTime.Now;
                    taskScheduler.RunTime = DateTime.Now + TimeSpan.FromDays(7);
                    this._TaskSchedulers.Add(taskScheduler);

                    break;
                case ActionType.Monthly:
                    break;
                default:
                    break;
            }
            bool isSucceed = SettingManagerData.UpdateSettingsParameter(taskScheduler);
            TaskSchedulerRunMessage message = new TaskSchedulerRunMessage(taskScheduler, isSucceed);
            MainService.ClientManager.Dispatch(message);
        }
 private void MessageClient_OnSettingTaskRunEvent(TaskSchedulerRunMessage message)
 {
     this.Dispatcher.BeginInvoke((Action)delegate()
     {
         this.ShowChatNotifyWindow(message.TaskScheduler);
     });
 }
Exemplo n.º 3
0
 private void Process(TaskSchedulerRunMessage message)
 {
     TaskSchedulerModel.Instance.TaskSchedulerStatusChangeNotify(message);
 }