コード例 #1
0
        } // CanRecord

        public static RecordTask GetRecordTask(UiBroadcastService service, EpgProgram epgProgram, DateTime localReferenceTime)
        {
            var channel = GetRecordChannel(service);

            if (epgProgram == null)
            {
                return(RecordTask.CreateWithDefaultValues(channel));
            } // if

            var isCurrent   = epgProgram.IsCurrent(localReferenceTime);
            var program     = GetRecordProgram(epgProgram);
            var schedule    = GetRecordSchedule(epgProgram, isCurrent);
            var duration    = GetRecordDuration(epgProgram, isCurrent);
            var description = GetRecordDescription(epgProgram, channel);
            var action      = GetRecordAction(service, epgProgram);
            var advanced    = GetRecordAdvancedSettings();

            var task = new RecordTask()
            {
                Channel          = channel,
                Program          = program,
                Schedule         = schedule,
                Duration         = duration,
                Description      = description,
                Action           = action,
                AdvancedSettings = advanced,
            };

            return(task);
        } // GetRecordTask
コード例 #2
0
        } // DialogRecordChannel_Shown

        #endregion

        #region Form events implementation

        private void DialogRecordChannel_Load_Implementation(object sender, EventArgs e)
        {
            BasicGoogleTelemetry.SendScreenHit(this);

            // Initialize
            if (Task == null)
            {
                if (this.DesignMode)
                {
                    Task      = RecordTask.CreateWithDefaultValues(null);
                    IsNewTask = true;
                }
                else
                {
                    throw new ArgumentNullException();
                } // if-else
            }     // if

            // General
            InitGeneralData();
            // Schedule tab
            InitScheduleData();
            // Duration tab
            InitDurationData();
            // Description tab
            InitDescriptionData();
            // Save tab
            InitSaveData();
            // Advanced tab
            InitAdvancedData();
        } // DialogRecordChannel_Load_Implementation