internal void ShowChatNotifyWindow(TaskScheduler taskScheduler) { this.SetTaskScheduler(taskScheduler); this.StartupPosition = StartupPosition.Manual; this.Top = this._App.RenderSize.Height - this.Height; this.Left = this._App.RenderSize.Width - this.Width; this.Visibility = System.Windows.Visibility.Visible; this.Show(); this.BringToFront(); }
internal void Update(CommonTaskScheduler commonTaskScheduler) { this._Id = commonTaskScheduler.Id; this._ExchangeCode = commonTaskScheduler.ExchangeCode; this._Name = commonTaskScheduler.Name; this._Description = commonTaskScheduler.Description; this._TaskStatus = commonTaskScheduler.TaskStatus; this._ActionType = commonTaskScheduler.ActionType; this._TaskType = commonTaskScheduler.TaskType; this._Interval = commonTaskScheduler.Interval; this._RecurDay = commonTaskScheduler.RecurDay; this._CreateDateTime = commonTaskScheduler.CreateDate; this._Creater = commonTaskScheduler.Creater; this._RunTime = commonTaskScheduler.RunTime; this._LastRunTime = commonTaskScheduler.LastRunTime; foreach (ParameterSettingTask setting in commonTaskScheduler.ParameterSettings) { ParameterSetting parameterSetting = new ParameterSetting(setting); this._ParameterSettings.Add(parameterSetting); } foreach (ExchangInstrument entity in commonTaskScheduler.ExchangInstruments) { this._ExchangInstruments.Add(entity); } }
internal CommonTaskScheduler ToCommonTaskScheduler() { CommonTaskScheduler commonTaskScheduler = new CommonTaskScheduler(); commonTaskScheduler.Id = this.Id; commonTaskScheduler.ExchangeCode = this.ExchangeCode; commonTaskScheduler.Name = this.Name; commonTaskScheduler.Description = this.Description; commonTaskScheduler.TaskStatus = Manager.Common.TaskStatus.Ready; commonTaskScheduler.RunTime = this.RunTime; commonTaskScheduler.LastRunTime = this.LastRunTime; commonTaskScheduler.RecurDay = this.RecurDay; commonTaskScheduler.Interval = this.Interval; commonTaskScheduler.TaskType = Manager.Common.TaskType.SetParameterTask; commonTaskScheduler.CreateDate = this.CreateDateTime; commonTaskScheduler.ActionType = this.ActionType; commonTaskScheduler.WeekDaySN = this.GetWeekString(); if (this.ExchangInstruments.Count > 0) { foreach (ExchangInstrument entity in this.ExchangInstruments) { commonTaskScheduler.ExchangInstruments.Add(entity); } } IEnumerable<ParameterSetting> newParameterSettings = this.ParameterSettings.Where(P => P.IsSelected); this.ParameterSettings = new ObservableCollection<ParameterSetting>(); foreach (ParameterSetting setting in newParameterSettings) { setting.TaskSchedulerId = this.Id; this.ParameterSettings.Add(setting); commonTaskScheduler.ParameterSettings.Add(setting.ToCommonParameterSettingTask()); } return commonTaskScheduler; }
public TaskScheduler(CommonTaskScheduler commonTaskScheduler) { this._Id = commonTaskScheduler.Id; this._ParameterSettings = new ObservableCollection<ParameterSetting>(); this._ExchangInstruments = new ObservableCollection<ExchangInstrument>(); this.Update(commonTaskScheduler); }
internal void SetTaskScheduler(TaskScheduler taskScheduler) { this._TaskScheduler = taskScheduler; this.TaskTitleTextBlock.Text = taskScheduler.Name; this._AutoCloseTimer.Start(); }
private void HandleOnSettingTaskRuningEvent(object sender, TaskScheduler taskScheduler) { //RunSettingTaskDetail control = new RunSettingTaskDetail(); //XamDialogWindow window = new XamDialogWindow(); //window.FontSize = 12; //window.StartupPosition = StartupPosition.Center; //window.IsModal = false; //window.Header = "任务详细"; //window.Width = 600; //window.Height = 400; //window.Content = control; //window.Show(); }