public ScheduleRegisterView() { InitializeComponent(); scheduleControl = new ScheduleControl(); scheduleViewControl = new ScheduleViewControl(); DataContext = scheduleViewControl; fillCBSchedule(); }
internal static async Task <IList <ISchedule> > GetSchedulesAsync(IOwinContext context) { var schedules = await ScheduleControl.GetSchedulesAsync(); if (schedules.Success) { return(schedules.Result); } return(null); }
internal static async Task <bool> CancelScheduleAsync(IOwinContext context, int id) { IProgram program = await GetProgramAsync(context, id); if (program != null) { return(await ScheduleControl.RemoveScheduleForProgramAsync(program, ScheduleRecordingType.Once)); } return(false); }
internal static async Task <bool> DeleteScheduleAsync(IOwinContext context, int id) { var schedules = await GetSchedulesAsync(context); if (schedules != null) { return(await ScheduleControl.RemoveScheduleAsync(schedules.Single(s => s.ScheduleId == id))); } return(false); }
internal static async Task <ISchedule> GetScheduleAsync(IOwinContext context, int id) { var schedules = await ScheduleControl.GetSchedulesAsync(); if (schedules.Success) { return(schedules.Result.FirstOrDefault(s => s.ScheduleId == id)); } return(null); }
internal static async Task <bool> UnCancelScheduleAsync(IOwinContext context, int id) { IProgram program = await GetProgramAsync(context, id); if (program != null) { return(await ScheduleControl.UnCancelScheduleAsync(program)); } return(false); }
internal static async Task <bool> CreateScheduleAsync(IOwinContext context, int channelId, string title, DateTime startTime, DateTime endTime, WebScheduleType scheduleType) { var channel = await GetChannelAsync(channelId); if (channel != null) { var schedule = await ScheduleControl.CreateScheduleByTimeAsync(channel, title, startTime, endTime, (ScheduleRecordingType)scheduleType); return(schedule.Success); } return(false); }
internal static async Task <bool> CreateScheduleAsync(IOwinContext context, int channelId, string title, DateTime startTime, DateTime endTime, WebScheduleType scheduleType, int preRecordInterval, int postRecordInterval, string directory, int priority) { var channel = await GetChannelAsync(channelId); if (channel != null) { var schedule = await ScheduleControl.CreateScheduleDetailedAsync(channel, title, startTime, endTime, (ScheduleRecordingType)scheduleType, preRecordInterval, postRecordInterval, directory, priority); return(schedule.Success); } return(false); }
internal static async Task <RecordingStatus> GetProgramRecordingStatusAsync(IOwinContext context, int id) { if (ProgramInfo.GetProgram(id, out IProgram prog)) { var status = await ScheduleControl.GetRecordingStatusAsync(prog); if (status.Success) { return(status.Result); } } return(RecordingStatus.None); }
public ImportEmployeeModal() { InitializeComponent(); importControl = new ImportControl(); companyControl = new CompanyControl(); scheduleControl = new ScheduleControl(); DataContext = new ImportEmployeesViewControl(); backWorkerImportEmployee.DoWork += importEmployeeBackground; backWorkerImportEmployee.RunWorkerCompleted += backWorkerImportEmployeeResponse; fillCBCompany(); fillCBSchedule(); }
public bool WatchRecordingFromBeginning(IProgram program) { string fileOrStream; if (ScheduleControl.GetRecordingFileOrStream(program, out fileOrStream)) { IChannel channel; if (ChannelAndGroupInfo.GetChannel(program.ChannelId, out channel)) { MediaItem recordig = SlimTvMediaItemBuilder.CreateRecordingMediaItem(0, fileOrStream, program, channel); PlayItemsModel.CheckQueryPlayAction(recordig); return(true); } } return(false); }
public bool WatchRecordingFromBeginning(IProgram program) { string fileOrStream; if (ScheduleControl.GetRecordingFileOrStream(program, out fileOrStream)) { IChannel channel; if (ChannelAndGroupInfo.GetChannel(program.ChannelId, out channel)) { MediaItem recordig = SlimTvMediaItemBuilder.CreateRecordingMediaItem(0, fileOrStream, program, channel); PlayerContextConcurrencyMode playMode = GetMatchingPlayMode(); PlayItemsModel.PlayOrEnqueueItem(recordig, true, playMode); return(true); } } return(false); }
/// <summary> /// Run lazy load. /// </summary> private void StartLazyLoad() { // Lazy load task. IoC.Task.Run(async() => { // Lazy load delay. await Task.Delay((int)(SlideSeconds * 2500)); // Update UI thread. await IoC.Dispatcher.UI.BeginInvokeOrDie((Action)(async() => { ScheduleControl.Visibility = System.Windows.Visibility.Hidden; await Task.Delay(1000); // Delay some time to load (heavy) schedule in invisibility. // Animation. await ScheduleControl.SlideAndFadeInFromBottom(8, 0.6f); })); }); }
public async Task <bool> WatchRecordingFromBeginningAsync(IProgram program) { var result = await ScheduleControl.GetRecordingFileOrStreamAsync(program); if (result.Success) { string fileOrStream = result.Result; var channelResult = await ChannelAndGroupInfo.GetChannelAsync(program.ChannelId); if (channelResult.Success) { MediaItem recordig = SlimTvMediaItemBuilder.CreateRecordingMediaItem(0, fileOrStream, program, channelResult.Result); PlayItemsModel.CheckQueryPlayAction(recordig); return(true); } } return(false); }
public EmployeeRegisterView() { InitializeComponent(); employeeControl = new EmployeeControl(); companyControl = new CompanyControl(); scheduleControl = new ScheduleControl(); departmentControl = new DepartmentControl(); officeControl = new OfficeControl(); resignationReasonControl = new ResignationReasonControl(); employeeViewControl = new EmployeeViewControl(); DataContext = employeeViewControl; fillCBCompany(); fillCBSchedule(); fillCBDepartment(); fillCBOffice(); fillCBRReasons(); fillImageControl(); }
internal static async Task <bool> EditScheduleAsync(IOwinContext context, int scheduleId, int?channelId = null, string title = null, DateTime?startTime = null, DateTime?endTime = null, WebScheduleType?scheduleType = null, int?preRecordInterval = null, int?postRecordInterval = null, string directory = null, int?priority = null) { IChannel channel = null; if (channelId.HasValue) { channel = await GetChannelAsync(channelId.Value); } var schedules = await GetSchedulesAsync(context); ISchedule scheduleSrc = schedules.Single(x => x.ScheduleId == scheduleId); return(await ScheduleControl.EditScheduleAsync(scheduleSrc, channel, title, startTime, endTime, scheduleType != null?(ScheduleRecordingType?)scheduleType : (ScheduleRecordingType?)null, preRecordInterval, postRecordInterval, directory, priority)); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.scheduleControl1 = new Syncfusion.Windows.Forms.Schedule.ScheduleControl(); this.btnDay = new Syncfusion.Windows.Forms.ButtonAdv(); this.btnWeek = new Syncfusion.Windows.Forms.ButtonAdv(); this.btnMonth = new Syncfusion.Windows.Forms.ButtonAdv(); this.radWorkWeek = new System.Windows.Forms.RadioButton(); this.radFullWeek = new System.Windows.Forms.RadioButton(); this.SuspendLayout(); // // scheduleControl1 // this.scheduleControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.scheduleControl1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(215)))), ((int)(((byte)(252))))); this.scheduleControl1.Culture = new System.Globalization.CultureInfo(""); this.scheduleControl1.DataSource = null; this.scheduleControl1.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.scheduleControl1.Location = new System.Drawing.Point(0, 34); this.scheduleControl1.Name = "scheduleControl1"; this.scheduleControl1.NavigationPanelPosition = Syncfusion.Schedule.CalendarNavigationPanelPosition.Hidden; this.scheduleControl1.Size = new System.Drawing.Size(600, 326); this.scheduleControl1.TabIndex = 0; // // btnDay // this.btnDay.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Office2007; this.btnDay.BorderStyleAdv = Syncfusion.Windows.Forms.ButtonAdvBorderStyle.Solid; this.btnDay.Font = new System.Drawing.Font("Corbel", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnDay.KeepFocusRectangle = false; this.btnDay.Location = new System.Drawing.Point(1, 0); this.btnDay.Name = "btnDay"; this.btnDay.Size = new System.Drawing.Size(75, 33); this.btnDay.TabIndex = 1; this.btnDay.Text = "Day"; this.btnDay.UseVisualStyle = true; this.btnDay.Click += new System.EventHandler(this.buttonAdv1_Click); // // btnWeek // this.btnWeek.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Office2007; this.btnWeek.BorderStyleAdv = Syncfusion.Windows.Forms.ButtonAdvBorderStyle.Solid; this.btnWeek.Font = new System.Drawing.Font("Corbel", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnWeek.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnWeek.KeepFocusRectangle = false; this.btnWeek.Location = new System.Drawing.Point(76, 0); this.btnWeek.Name = "btnWeek"; this.btnWeek.Size = new System.Drawing.Size(75, 33); this.btnWeek.TabIndex = 2; this.btnWeek.Text = "Week"; this.btnWeek.UseVisualStyle = true; this.btnWeek.Click += new System.EventHandler(this.buttonAdv2_Click); // // btnMonth // this.btnMonth.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Office2007; this.btnMonth.BorderStyleAdv = Syncfusion.Windows.Forms.ButtonAdvBorderStyle.Flat; this.btnMonth.Font = new System.Drawing.Font("Corbel", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnMonth.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnMonth.KeepFocusRectangle = false; this.btnMonth.Location = new System.Drawing.Point(151, 0); this.btnMonth.Name = "btnMonth"; this.btnMonth.Size = new System.Drawing.Size(75, 33); this.btnMonth.TabIndex = 3; this.btnMonth.Text = "Month"; this.btnMonth.UseVisualStyle = true; this.btnMonth.Click += new System.EventHandler(this.buttonAdv3_Click); // // radWorkWeek // this.radWorkWeek.AutoSize = true; this.radWorkWeek.BackColor = System.Drawing.Color.Transparent; this.radWorkWeek.FlatStyle = System.Windows.Forms.FlatStyle.System; this.radWorkWeek.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radWorkWeek.Location = new System.Drawing.Point(261, 8); this.radWorkWeek.Name = "radWorkWeek"; this.radWorkWeek.Size = new System.Drawing.Size(120, 20); this.radWorkWeek.TabIndex = 4; this.radWorkWeek.TabStop = true; this.radWorkWeek.Text = "Show work week"; this.radWorkWeek.UseVisualStyleBackColor = false; this.radWorkWeek.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged); // // radFullWeek // this.radFullWeek.AutoSize = true; this.radFullWeek.BackColor = System.Drawing.Color.Transparent; this.radFullWeek.FlatStyle = System.Windows.Forms.FlatStyle.System; this.radFullWeek.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radFullWeek.Location = new System.Drawing.Point(435, 8); this.radFullWeek.Name = "radFullWeek"; this.radFullWeek.Size = new System.Drawing.Size(112, 20); this.radFullWeek.TabIndex = 5; this.radFullWeek.TabStop = true; this.radFullWeek.Text = "Show full week"; this.radFullWeek.UseVisualStyleBackColor = false; this.radFullWeek.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged); // // CalendarForm // this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(209)))), ((int)(((byte)(255))))); this.Controls.Add(this.radFullWeek); this.Controls.Add(this.radWorkWeek); this.Controls.Add(this.btnMonth); this.Controls.Add(this.btnWeek); this.Controls.Add(this.btnDay); this.Controls.Add(this.scheduleControl1); this.Name = "CalendarForm"; this.Size = new System.Drawing.Size(600, 360); this.ResumeLayout(false); this.PerformLayout(); }
private void scheduleControl7_ItemSelected(object sender, EventArgs e) { _ScheduleControlSelected = scheduleControl7; _SelectedItemsInfos = scheduleControl7.SelectedItemInfos; }