当前位置: 首页>>代码示例>>C#>>正文


C# Schedule.ToString方法代码示例

本文整理汇总了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);
        }                
      }
    }
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:64,代码来源:TVProgramInfo.cs

示例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;
      }
开发者ID:huha001,项目名称:TvWishList,代码行数:85,代码来源:EpgClass.cs


注:本文中的TvDatabase.Schedule.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。