public MainPresenterDependencyBlock(
            ILogManager logManager,
            IMailSender mailSender,
            IConfigurationManager <SenderConfiguration> senderConfigManager,
            EntityService <RecipeRow> recipeService,
            EntityService <RemainRow> remainService,
            IRepository <RecipeRow> recipeRepository,
            IRepository <RemainRow> remainRepository,
            IGuideService guideService,
            IConfigurationManager <FtpConfiguration> ftpConfigManager)
        {
            LogManager = logManager;
            MailSender = mailSender;

            SenderConfigManager = senderConfigManager;

            RecipeService = recipeService;
            RemainService = remainService;

            RecipeRepository = recipeRepository;
            RemainRepository = remainRepository;

            GuideService = guideService;

            FtpConfigManager = ftpConfigManager;
        }
Exemplo n.º 2
0
        // CONSTRUCTOR SECTION
        //---------------------------------------------------------------------

        public MainPresenter(IMainView view, IApplicationController appController,
                             IMainPresenterDependencyBlock dependencyBlock)
            : base(view, appController)
        {
            // UTILS BINDINGS SECTION
            //---------------------------------------------
            var logManager = dependencyBlock.LogManager;

            _log = logManager.GetLog(typeof(MainPresenter));

            _mailSender          = dependencyBlock.MailSender;
            _senderConfigManager = dependencyBlock.SenderConfigManager;
            _ftpConfigManager    = dependencyBlock.FtpConfigManager;

            // SERVICES BINDINGS SECTION
            //---------------------------------------------
            _recipeService = dependencyBlock.RecipeService;
            _remainService = dependencyBlock.RemainService;
            _guideService  = dependencyBlock.GuideService;

            // REPOSITORIES BINDINGS SECTION
            //---------------------------------------------
            _recipeRepository = dependencyBlock.RecipeRepository;
            _remainRepository = dependencyBlock.RemainRepository;

            // EVENTS BINDINGS SECTION
            //---------------------------------------------
            View.InitializeAsync += OnInitializeAsync;
        }
Exemplo n.º 3
0
 public void RefreshEpgData(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
                            IControlService tvControlAgent, bool reloadData, Guid currentChannelGroupId, DateTime guideDateTime,
                            CancellationPendingDelegate cancellationPending)
 {
     if (reloadData)
     {
         _model.ProgramsByChannel.Clear();
         RefreshUpcomingPrograms(tvSchedulerAgent, tvControlAgent);
         if (cancellationPending != null &&
             cancellationPending())
         {
             return;
         }
     }
     if (guideDateTime != DateTime.MinValue)
     {
         SetChannelGroup(currentChannelGroupId);
         _model.GuideDateTime = guideDateTime;
         _model.Channels      = new List <Channel>(tvSchedulerAgent.GetChannelsInGroup(currentChannelGroupId, true));
         if (cancellationPending != null &&
             cancellationPending())
         {
             return;
         }
         RefreshChannelsEpgData(tvGuideAgent, _model.Channels, guideDateTime, guideDateTime.AddDays(1), cancellationPending);
     }
     else
     {
         _model.Channels = new List <Channel>();
     }
 }
Exemplo n.º 4
0
        public Schedule CreateRecordOnceSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent, Guid channelId, Guid guideProgramId)
        {
            GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);

            if (guideProgram != null)
            {
                return(GuideController.CreateRecordOnceSchedule(tvSchedulerAgent, _model.ChannelType, channelId, guideProgram.Title, guideProgram.SubTitle, guideProgram.EpisodeNumberDisplay, guideProgram.StartTime));
            }
            return(null);
        }
Exemplo n.º 5
0
 public static Schedule CreateRecordRepeatingSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
     RepeatingType repeatingType, ChannelType channelType, Guid channelId, Guid guideProgramId, string titleSuffix = null)
 {
     GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);
     if (guideProgram != null)
     {
         return CreateRecordRepeatingSchedule(tvSchedulerAgent, repeatingType, channelType, channelId, guideProgram.Title, guideProgram.StartTime, titleSuffix);
     }
     return null;
 }
 public UsersController(IUserService iuserService, ICityService icityService, ITownService itownService, IGuideService iguidService, IClassifyService iclassifyService, IFavoriteService ifavoriteService, ICategoryService iCategoryService)
 {
     _iuserService     = iuserService;
     _iclassifyService = iclassifyService;
     _ifavoriteService = ifavoriteService;
     _iCategoryService = iCategoryService;
     _iguidService     = iguidService;
     _icityService     = icityService;
     _itownService     = itownService;
 }
Exemplo n.º 7
0
 public static Schedule CreateRecordOnceSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
     ChannelType channelType, Guid channelId, Guid guideProgramId)
 {
     GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);
     if (guideProgram != null)
     {
         return CreateRecordOnceSchedule(tvSchedulerAgent, channelType,
             channelId, guideProgram.Title, guideProgram.SubTitle, guideProgram.EpisodeNumberDisplay, guideProgram.StartTime);
     }
     return null;
 }
Exemplo n.º 8
0
 public WikiGuideViewModel(IGuideService guideService)
 {
     this.guideService      = guideService;
     RefreshHtmlPageCommand = GetAsyncCommand(RefreshHtmlPage);
     IndeterminateLoading   = true;
     SubscribeToEvent <SearchSuggestionMessage>(async msg =>
     {
         Destination = msg.Suggestion;
         await RefreshHtmlPage();
     });
 }
Exemplo n.º 9
0
 private void MergeExtraPrograms(IGuideService tvGuideAgent, Channel channel, ChannelPrograms channelPrograms, DateTime fromDateTime, DateTime toDateTime)
 {
     if (toDateTime > fromDateTime)
     {
         GuideProgramSummary[] guidePrograms =
             tvGuideAgent.GetChannelProgramsBetween(channel.GuideChannelId.Value, fromDateTime, toDateTime);
         foreach (GuideProgramSummary guideProgram in guidePrograms)
         {
             channelPrograms.InsertProgram(guideProgram);
         }
     }
 }
Exemplo n.º 10
0
        public MarleyService(ISessionsService sessionsService,
                             UserManager <User> userManager,
                             INlpService nlpService,
                             ITrainingService trainingService,
                             IGuideService guideService,
                             IGoalsService goalService)
        {
            _sessions     = sessionsService;
            _userManager  = userManager;
            _nlpService   = nlpService;
            _trainings    = trainingService;
            _guideService = guideService;
            _goalService  = goalService;

            Init();
        }
Exemplo n.º 11
0
        public Form1()
        {
            var ipAddress = "13.67.234.244";

            //var ipAddress = "192.168.0.109";
            InitializeComponent();
            _guideService     = new GuideService(ipAddress);
            _scavengerService = new ScavengerService(ipAddress);

            _guideClient.OnScavengerMoved            += _guideClient_OnScavengerMoved;
            _guideClient.OnLobbyReady                += _guideClient_OnLobbyReady;
            _guideClient.OnScavengerChangedDirection += _guideClient_OnScavengerChangedDirection;

            _scavengerClient.OnLobbyReady += _scavengerClient_OnLobbyReady;

            timer1.Start();
        }
Exemplo n.º 12
0
        public static async Task SeedScenarios(this ChatContext context, IGuideService guideService, ILogger logger)
        {
            var all = guideService.GetAllScenarioGuide();

            foreach (var scenarioGuide in all)
            {
                logger.LogDebug($"Seeding scenario scenario {scenarioGuide.ScenarioId}");
                try
                {
                    var scenario = new Scenario()
                    {
                        Id          = scenarioGuide.ScenarioId,
                        Name        = scenarioGuide.ScenarioName,
                        Description = scenarioGuide.Description
                    };
                    if (context.Scenarios.FirstOrDefault(item => item.Id == scenario.Id) != null)
                    {
                        continue;
                    }
                    context.Add(scenario);
                    var i = 1;
                    foreach (var goalGuide in scenarioGuide.Goals)
                    {
                        logger.LogDebug($"Seeding scenario scenario {goalGuide.Id}");
                        var goal = new Goal()
                        {
                            Id         = goalGuide.Id,
                            Order      = i,
                            ScenarioId = scenarioGuide.ScenarioId,
                            Text       = goalGuide.GoalName
                        };
                        if (context.Goals.FirstOrDefault(item => item.Id == goal.Id) != null)
                        {
                            continue;
                        }
                        context.Add(goal);
                        i++;
                    }
                }
                catch (Exception ex)
                {
                    logger.LogError("Failed duering addition of new scenario.", ex);
                }
            }
            await context.SaveChangesAsync();
        }
Exemplo n.º 13
0
        public void Initialize(IGuideService tvGuideAgent, ISchedulerService tvSchedulerAgent, Schedule schedule,
                               bool forceManualSchedule, string allChannelsGroupName, string defaultFormatName)
        {
            _model.Schedule = schedule;
            _model.IsManual = forceManualSchedule ||
                              (_model.Schedule.Rules.FindRuleByType(ScheduleRuleType.ManualSchedule) != null);

            if (schedule.ScheduleType == ScheduleType.Recording)
            {
                _model.RecordingFormats = new SortableBindingList <RecordingFileFormat>(tvSchedulerAgent.GetAllRecordingFileFormats());
                _model.RecordingFormats.Insert(0, new RecordingFileFormat()
                {
                    Name   = defaultFormatName,
                    Format = String.Empty
                });
            }

            Channel[] channels = tvSchedulerAgent.GetAllChannels(schedule.ChannelType, false);
            _model.AllChannels.Clear();
            foreach (Channel channel in channels)
            {
                _model.AllChannels.Add(channel.ChannelId, channel);
            }

            _model.ChannelGroups.Clear();
            _model.ChannelGroups.AddRange(tvSchedulerAgent.GetAllChannelGroups(schedule.ChannelType, !_model.IsManual));
            _model.ChannelGroups.Add(new ChannelGroup()
            {
                ChannelGroupId = schedule.ChannelType == ChannelType.Television ? ChannelGroup.AllTvChannelsGroupId : ChannelGroup.AllRadioChannelsGroupId,
                ChannelType    = schedule.ChannelType,
                GroupName      = allChannelsGroupName,
                VisibleInGuide = true
            });

            if (!_model.IsManual)
            {
                _model.Categories = tvGuideAgent.GetAllCategories();
            }
        }
Exemplo n.º 14
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public async void Configure(IApplicationBuilder app,
                                    IHostingEnvironment env,
                                    UserManager <User> userManager,
                                    RoleManager <Role> roleManager,
                                    ILogger <Startup> logger,
                                    ChatContext dbContext,
                                    IGuideService guideService)
        {
            app.Use(async(context, next) => {
                await next();
                if (context.Response.StatusCode == 404 &&
                    !Path.HasExtension(context.Request.Path.Value) &&
                    !context.Request.Path.Value.StartsWith("/api/"))
                {
                    context.Request.Path = "/index.html";
                    await next();
                }
            });

            await roleManager.SeedRoles(logger);

            await userManager.SeedUserRoles(logger);

            await dbContext.SeedScenarios(guideService, logger);

            app.UseAuthentication();
            app.UseCors("MyPolicy");
            app.UseWebSockets();
            app.UseSignalR(routes =>
            {
                routes.MapHub <MessageHub>("/message");
                routes.MapHub <TrainingHub>("/training");
            });
            app.UseMvcWithDefaultRoute();
            app.UseDefaultFiles();
            app.UseStaticFiles();
        }
Exemplo n.º 15
0
        public void RefreshChannelsEpgData(IGuideService tvGuideAgent, List<Channel> channels,
            DateTime fromDateTime, DateTime toDateTime, CancellationPendingDelegate cancellationPending)
        {
            foreach (Channel channel in channels)
            {
                if (channel.GuideChannelId.HasValue)
                {
                    if (_model.ProgramsByChannel.ContainsKey(channel.ChannelId))
                    {
                        ChannelPrograms channelPrograms = _model.ProgramsByChannel[channel.ChannelId];
                        if (channelPrograms.LowerBoundTime >= toDateTime
                            || channelPrograms.UpperBoundTime <= fromDateTime)
                        {
                            _model.ProgramsByChannel.Remove(channel.ChannelId);
                        }
                        else if (channelPrograms.LowerBoundTime <= fromDateTime
                            && channelPrograms.UpperBoundTime <= toDateTime)
                        {
                            DateTime newUpperBoundTime = channelPrograms.UpperBoundTime.AddHours(8);
                            if (toDateTime > newUpperBoundTime)
                            {
                                newUpperBoundTime = toDateTime;
                            }
                            MergeExtraPrograms(tvGuideAgent, channel, channelPrograms, channelPrograms.UpperBoundTime, newUpperBoundTime);
                            channelPrograms.UpperBoundTime = newUpperBoundTime;
                        }
                        else if (channelPrograms.LowerBoundTime >= fromDateTime
                            && channelPrograms.UpperBoundTime >= toDateTime)
                        {
                            DateTime newLowerBoundTime = channelPrograms.LowerBoundTime.AddHours(-8);
                            if (fromDateTime < newLowerBoundTime)
                            {
                                newLowerBoundTime = fromDateTime;
                            }
                            MergeExtraPrograms(tvGuideAgent, channel, channelPrograms, newLowerBoundTime, channelPrograms.LowerBoundTime);
                            channelPrograms.LowerBoundTime = newLowerBoundTime;
                        }
                    }

                    if (cancellationPending != null
                        && cancellationPending())
                    {
                        return;
                    }

                    if (!_model.ProgramsByChannel.ContainsKey(channel.ChannelId))
                    {
                        _model.ProgramsByChannel[channel.ChannelId] = new ChannelPrograms(fromDateTime, toDateTime,
                            tvGuideAgent.GetChannelProgramsBetween(channel.GuideChannelId.Value, fromDateTime, toDateTime));
                    }
                }
                else
                {
                    _model.ProgramsByChannel[channel.ChannelId] = new ChannelPrograms(fromDateTime, toDateTime, new GuideProgramSummary[] { });
                }

                if (cancellationPending != null
                    && cancellationPending())
                {
                    break;
                }
            }
        }
Exemplo n.º 16
0
 public Schedule CreateRecordRepeatingSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent, RepeatingType repeatingType, Guid? channelId, Guid guideProgramId)
 {
     GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);
     if (guideProgram != null)
     {
         return GuideController.CreateRecordRepeatingSchedule(tvSchedulerAgent, repeatingType, _model.ChannelType, channelId, guideProgram.Title, guideProgram.StartTime,string.Empty);
     }
     return null;
 }
Exemplo n.º 17
0
 public void RefreshChannelsEpgData(IGuideService tvGuideAgent, List<Channel> channels, DateTime fromDateTime, DateTime toDateTime)
 {
     RefreshChannelsEpgData(tvGuideAgent, channels, fromDateTime, toDateTime, null);
 }
Exemplo n.º 18
0
        public void RefreshChannelsEpgData(IGuideService tvGuideAgent, List <Channel> channels,
                                           DateTime fromDateTime, DateTime toDateTime, CancellationPendingDelegate cancellationPending)
        {
            foreach (Channel channel in channels)
            {
                if (channel.GuideChannelId.HasValue)
                {
                    if (_model.ProgramsByChannel.ContainsKey(channel.ChannelId))
                    {
                        ChannelPrograms channelPrograms = _model.ProgramsByChannel[channel.ChannelId];
                        if (channelPrograms.LowerBoundTime >= toDateTime ||
                            channelPrograms.UpperBoundTime <= fromDateTime)
                        {
                            _model.ProgramsByChannel.Remove(channel.ChannelId);
                        }
                        else if (channelPrograms.LowerBoundTime <= fromDateTime &&
                                 channelPrograms.UpperBoundTime <= toDateTime)
                        {
                            DateTime newUpperBoundTime = channelPrograms.UpperBoundTime.AddHours(8);
                            if (toDateTime > newUpperBoundTime)
                            {
                                newUpperBoundTime = toDateTime;
                            }
                            MergeExtraPrograms(tvGuideAgent, channel, channelPrograms, channelPrograms.UpperBoundTime, newUpperBoundTime);
                            channelPrograms.UpperBoundTime = newUpperBoundTime;
                        }
                        else if (channelPrograms.LowerBoundTime >= fromDateTime &&
                                 channelPrograms.UpperBoundTime >= toDateTime)
                        {
                            DateTime newLowerBoundTime = channelPrograms.LowerBoundTime.AddHours(-8);
                            if (fromDateTime < newLowerBoundTime)
                            {
                                newLowerBoundTime = fromDateTime;
                            }
                            MergeExtraPrograms(tvGuideAgent, channel, channelPrograms, newLowerBoundTime, channelPrograms.LowerBoundTime);
                            channelPrograms.LowerBoundTime = newLowerBoundTime;
                        }
                    }

                    if (cancellationPending != null &&
                        cancellationPending())
                    {
                        return;
                    }

                    if (!_model.ProgramsByChannel.ContainsKey(channel.ChannelId))
                    {
                        _model.ProgramsByChannel[channel.ChannelId] = new ChannelPrograms(fromDateTime, toDateTime,
                                                                                          tvGuideAgent.GetChannelProgramsBetween(channel.GuideChannelId.Value, fromDateTime, toDateTime));
                    }
                }
                else
                {
                    _model.ProgramsByChannel[channel.ChannelId] = new ChannelPrograms(fromDateTime, toDateTime, new GuideProgramSummary[] { });
                }

                if (cancellationPending != null &&
                    cancellationPending())
                {
                    break;
                }
            }
        }
Exemplo n.º 19
0
 public void CancelOrUncancelUpcomingProgram(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
     IControlService tvControlAgent, Guid scheduleId, Guid channelId, Guid guideProgramId, bool cancel)
 {
     GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);
     if (guideProgram != null)
     {
         if (cancel)
         {
             tvSchedulerAgent.CancelUpcomingProgram(scheduleId, guideProgramId, channelId, guideProgram.StartTime);
         }
         else
         {
             tvSchedulerAgent.UncancelUpcomingProgram(scheduleId, guideProgramId, channelId, guideProgram.StartTime);
         }
         RefreshUpcomingPrograms(tvSchedulerAgent, tvControlAgent);
     }
 }
Exemplo n.º 20
0
 public void RefreshEpgData(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
                            IControlService tvControlAgent, bool reloadData, Guid currentChannelGroupId, DateTime guideDateTime)
 {
     RefreshEpgData(tvSchedulerAgent, tvGuideAgent, tvControlAgent, reloadData, currentChannelGroupId, guideDateTime, null);
 }
Exemplo n.º 21
0
 public TourGuideController(IGuideService service)
 {
     this._service = service;
 }
Exemplo n.º 22
0
 public void RefreshEpgData(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
     IControlService tvControlAgent, bool reloadData, Guid currentChannelGroupId, DateTime guideDateTime)
 {
     RefreshEpgData(tvSchedulerAgent, tvGuideAgent, tvControlAgent, reloadData, currentChannelGroupId, guideDateTime, null);
 }
Exemplo n.º 23
0
 private void MergeExtraPrograms(IGuideService tvGuideAgent, Channel channel, ChannelPrograms channelPrograms, DateTime fromDateTime, DateTime toDateTime)
 {
     if (toDateTime > fromDateTime)
     {
         GuideProgramSummary[] guidePrograms =
             tvGuideAgent.GetChannelProgramsBetween(channel.GuideChannelId.Value, fromDateTime, toDateTime);
         foreach (GuideProgramSummary guideProgram in guidePrograms)
         {
             channelPrograms.InsertProgram(guideProgram);
         }
     }
 }
Exemplo n.º 24
0
 public GuidesController(ApplicationDbContext context, ITripListService tripListService, IGuideService guideService)
 {
     _context         = context;
     _tripListService = tripListService;
     _guideService    = guideService;
 }
Exemplo n.º 25
0
 public GuideController(IGuideService guideService, ILoggerCreator loggerCreator)
 {
     _loggerCreator = loggerCreator;
     _guideService  = guideService;
 }
Exemplo n.º 26
0
        public Schedule CreateRecordRepeatingSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent, RepeatingType repeatingType, Guid?channelId, Guid guideProgramId)
        {
            GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);

            if (guideProgram != null)
            {
                return(GuideController.CreateRecordRepeatingSchedule(tvSchedulerAgent, repeatingType, _model.ChannelType, channelId, guideProgram.Title, guideProgram.StartTime, string.Empty));
            }
            return(null);
        }
Exemplo n.º 27
0
    void Start()
    {
        _guideClient = new TestGuideClient();

        _guideService = new GuideService();
    }
Exemplo n.º 28
0
        public void CancelOrUncancelUpcomingProgram(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
                                                    IControlService tvControlAgent, Guid scheduleId, Guid channelId, Guid guideProgramId, bool cancel)
        {
            GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);

            if (guideProgram != null)
            {
                if (cancel)
                {
                    tvSchedulerAgent.CancelUpcomingProgram(scheduleId, guideProgramId, channelId, guideProgram.StartTime);
                }
                else
                {
                    tvSchedulerAgent.UncancelUpcomingProgram(scheduleId, guideProgramId, channelId, guideProgram.StartTime);
                }
                RefreshUpcomingPrograms(tvSchedulerAgent, tvControlAgent);
            }
        }
Exemplo n.º 29
0
 public void RefreshEpgData(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
     IControlService tvControlAgent, bool reloadData, Guid currentChannelGroupId, DateTime guideDateTime,
     CancellationPendingDelegate cancellationPending)
 {
     if (reloadData)
     {
         _model.ProgramsByChannel.Clear();
         RefreshUpcomingPrograms(tvSchedulerAgent, tvControlAgent);
         if (cancellationPending != null
             && cancellationPending())
         {
             return;
         }
     }
     if (guideDateTime != DateTime.MinValue)
     {
         SetChannelGroup(currentChannelGroupId);
         _model.GuideDateTime = guideDateTime;
         _model.Channels = new List<Channel>(tvSchedulerAgent.GetChannelsInGroup(currentChannelGroupId, true));
         if (cancellationPending != null
             && cancellationPending())
         {
             return;
         }
         RefreshChannelsEpgData(tvGuideAgent, _model.Channels, guideDateTime, guideDateTime.AddDays(1), cancellationPending);
     }
     else
     {
         _model.Channels = new List<Channel>();
     }
 }
 public LikeController(IGuideService guideService, IUserService userService) : base(userService)
 {
     this.guideService = guideService ?? throw new ArgumentNullException(nameof(guideService));
 }
Exemplo n.º 31
0
 public GuideController(IGuideService IGuideService)
 {
     _GuideService = IGuideService;
 }
Exemplo n.º 32
0
 public GuideController(IGuideService guideService)
 {
     _guideService = guideService;
 }
        public void Initialize(IGuideService tvGuideAgent, ISchedulerService tvSchedulerAgent, Schedule schedule,
            bool forceManualSchedule, string allChannelsGroupName, string defaultFormatName)
        {
            _model.Schedule = schedule;
            _model.IsManual = forceManualSchedule
                || (_model.Schedule.Rules.FindRuleByType(ScheduleRuleType.ManualSchedule) != null);

            if (schedule.ScheduleType == ScheduleType.Recording)
            {
                _model.RecordingFormats = new SortableBindingList<RecordingFileFormat>(tvSchedulerAgent.GetAllRecordingFileFormats());
                _model.RecordingFormats.Insert(0, new RecordingFileFormat(Guid.Empty, defaultFormatName, String.Empty));
            }

            Channel[] channels = tvSchedulerAgent.GetAllChannels(schedule.ChannelType, false);
            _model.AllChannels.Clear();
            foreach (Channel channel in channels)
            {
                _model.AllChannels.Add(channel.ChannelId, channel);
            }

            _model.ChannelGroups.Clear();
            _model.ChannelGroups.AddRange(tvSchedulerAgent.GetAllChannelGroups(schedule.ChannelType, !_model.IsManual));
            _model.ChannelGroups.Add(new ChannelGroup(
                schedule.ChannelType == ChannelType.Television ? ChannelGroup.AllTvChannelsGroupId : ChannelGroup.AllRadioChannelsGroupId,
                (int)schedule.ChannelType, allChannelsGroupName, true, 0, 0));

            if (!_model.IsManual)
            {
                _model.Categories = tvGuideAgent.GetAllCategories();
            }
        }
Exemplo n.º 34
0
 public GuidesController(IGuideService guides)
 {
     this.guides = guides;
 }
Exemplo n.º 35
0
 public AdminGuideController(IGuideService IGuideService, ApplicationUserManager userManager) : base(userManager)
 {
     _GuideService = IGuideService;
 }
Exemplo n.º 36
0
 public void RefreshChannelsEpgData(IGuideService tvGuideAgent, List <Channel> channels, DateTime fromDateTime, DateTime toDateTime)
 {
     RefreshChannelsEpgData(tvGuideAgent, channels, fromDateTime, toDateTime, null);
 }
Exemplo n.º 37
0
        public static Schedule CreateRecordRepeatingSchedule(ISchedulerService tvSchedulerAgent, IGuideService tvGuideAgent,
                                                             RepeatingType repeatingType, ChannelType channelType, Guid channelId, Guid guideProgramId, string titleSuffix = null)
        {
            GuideProgram guideProgram = tvGuideAgent.GetProgramById(guideProgramId);

            if (guideProgram != null)
            {
                return(CreateRecordRepeatingSchedule(tvSchedulerAgent, repeatingType, channelType, channelId, guideProgram.Title, guideProgram.StartTime, titleSuffix));
            }
            return(null);
        }
 public GuidesController(IGuideService guideService, IUserService userService) : base(userService)
 {
     this.guideService = guideService;
 }