本文整理汇总了C#中TvDatabase.Schedule.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Schedule.ToString方法的具体用法?C# Schedule.ToString怎么用?C# Schedule.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TvDatabase.Schedule
的用法示例。
在下文中一共展示了Schedule.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CancelProgram
private static void CancelProgram(Program program, Schedule schedule, int dialogId)
{
Log.Debug("TVProgammInfo.CancelProgram - programm = {0}", program.ToString());
Log.Debug(" - schedule = {0}", schedule.ToString());
Log.Debug(" ProgramID = {0} ScheduleID = {1}", program.IdProgram, schedule.IdSchedule);
bool deleteEntireSched = false;
if (schedule.ScheduleType == (int)ScheduleRecordingType.Once)
{
TVUtil.DeleteRecAndSchedWithPrompt(schedule, program.IdChannel);
ResetCurrentScheduleAndProgram(schedule);
return;
}
if ((schedule.ScheduleType == (int)ScheduleRecordingType.Daily)
|| (schedule.ScheduleType == (int)ScheduleRecordingType.Weekends)
|| (schedule.ScheduleType == (int)ScheduleRecordingType.Weekly)
|| (schedule.ScheduleType == (int)ScheduleRecordingType.WorkingDays)
|| (schedule.ScheduleType == (int)ScheduleRecordingType.EveryTimeOnEveryChannel)
|| (schedule.ScheduleType == (int)ScheduleRecordingType.EveryTimeOnThisChannel)
|| (schedule.ScheduleType == (int) ScheduleRecordingType.WeeklyEveryTimeOnThisChannel))
{
GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);
if (dlg == null)
{
Log.Error("TVProgramInfo.CancelProgram: ERROR no GUIDialogMenu found !!!!!!!!!!");
return;
}
dlg.Reset();
dlg.SetHeading(TVUtil.GetDisplayTitle(program));
if (anyUpcomingEpisodesRecording)
{
dlg.AddLocalizedString(981); //Cancel this show
}
dlg.AddLocalizedString(982); //Delete this entire schedule
dlg.DoModal(dialogId);
if (dlg.SelectedLabel == -1)
{
return;
}
switch (dlg.SelectedId)
{
case 981: //delete specific series
break;
case 982: //Delete entire recording
deleteEntireSched = true;
break;
}
if (deleteEntireSched)
{
TVUtil.DeleteRecAndEntireSchedWithPrompt(schedule, program.StartTime);
ResetCurrentScheduleAndProgram(schedule);
}
else
{
TVUtil.DeleteRecAndSchedWithPrompt(schedule, program);
}
}
}
示例2: GetConflictingSchedules
public List<Schedule> GetConflictingSchedules(Schedule rec)
{
LogDebug("GetConflictingSchedules: Schedule = " + rec.ToString(), (int)LogSetting.DEBUG);
#if(TV100)
IList schedulesList = Schedule.ListAll();
IList cards = Card.ListAll();
#elif(TV101 || TV11 || TV12)
IList<Schedule> schedulesList = Schedule.ListAll();
IList<Card> cards = Card.ListAll();
#endif
List<Schedule> conflicts = new List<Schedule>();
if (cards.Count == 0)
{
return conflicts;
}
//LogDebug("GetConflictingSchedules: Cards.Count =" + cards.Count.ToString(), (int)LogSetting.DEBUG);
List<Schedule>[] cardSchedules = new List<Schedule>[cards.Count];
for (int i = 0; i < cards.Count; i++)
{
cardSchedules[i] = new List<Schedule>();
}
// GEMX: Assign all already scheduled timers to cards. Assume that even possibly overlapping schedulues are ok to the user,
// as he decided to keep them before. That's why they are in the db
foreach (Schedule schedule in schedulesList)
{
//huha change
if (schedule == rec)
{
continue;
}
//end huha
List<Schedule> episodes = GetRecordingTimes(schedule);
foreach (Schedule episode in episodes)
{
if (DateTime.Now > episode.EndTime)
{
continue;
}
if (episode.IsSerieIsCanceled(episode.StartTime))
{
continue;
}
Schedule overlapping;
AssignSchedulesToCard(episode, cardSchedules, out overlapping,DEBUG);
}
}
List<Schedule> newEpisodes = GetRecordingTimes(rec);
foreach (Schedule newEpisode in newEpisodes)
{
if (DateTime.Now > newEpisode.EndTime)
{
continue;
}
if (newEpisode.IsSerieIsCanceled(newEpisode.StartTime))
{
continue;
}
Schedule overlapping=null;
if (!AssignSchedulesToCard(newEpisode, cardSchedules, out overlapping,DEBUG))
{
LogDebug("GetConflictingSchedules: newEpisode can not be assigned to a card = " + newEpisode.ToString(), (int)LogSetting.DEBUG);
if (overlapping != null)
{
LogDebug("Overlapping schedule is:", (int)LogSetting.DEBUG);
outputscheduletoresponse(overlapping, (int)LogSetting.DEBUG);
conflicts.Add(overlapping);
}
else
{
LogDebug("Overlapping schedule is not defined", (int)LogSetting.DEBUG);
}
}
}
return conflicts;
}