Пример #1
0
        public TVService(ILoggingService loggingService, IOnlineTelevizorConfiguration config)
        {
            _log    = loggingService;
            _config = config;

            InitTVService();
        }
Пример #2
0
 public ChannelDetailViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
     : base(loggingService, config, dialogService)
 {
     _loggingService = loggingService;
     _dialogService  = dialogService;
     _service        = service;
     Config          = config;
 }
Пример #3
0
        public HelpPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
        {
            InitializeComponent();
            _config         = config;
            _loggingService = loggingService;
            _dialogService  = dialogService;

            BindingContext = _viewModel = new HelpViewModel(loggingService, config, dialogService, service);
        }
Пример #4
0
        public QualitiesPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config, TVService service)
        {
            InitializeComponent();

            _config = config;
            var dialogService = new DialogService(this);

            BindingContext = _viewModel = new StreamQualityViewModel(loggingService, config, dialogService, service);
        }
Пример #5
0
        public StreamQualityViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
            : base(loggingService, config, dialogService)
        {
            _service        = service;
            _loggingService = loggingService;
            _dialogService  = dialogService;
            Config          = config;

            RefreshCommand = new Command(async() => await Refresh());
        }
Пример #6
0
        public App(IOnlineTelevizorConfiguration config, ILoggingService loggingService)
        {
            InitializeComponent();

            _config         = config;
            _loggingService = loggingService;

            _mainPage = new MainPage(_loggingService, _config);

            MainPage = new NavigationPage(_mainPage);
        }
Пример #7
0
        public FilterPageViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
            : base(loggingService, config, dialogService)
        {
            _service        = service;
            _loggingService = loggingService;
            _dialogService  = dialogService;
            Config          = config;

            ClearFilterCommand = new Command(async() => await ClearFilter());
            RefreshCommand     = new Command(async() => await Refresh());
        }
Пример #8
0
        public FilterPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config, TVService service)
        {
            InitializeComponent();

            var dialogService = new DialogService(this);

            GroupPicker.Unfocused += GroupPicker_Unfocused;
            TypePicker.Unfocused  += TypePicker_Unfocused;

            BindingContext = _viewModel = new FilterPageViewModel(loggingService, config, dialogService, service);
        }
        public CastRenderersPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config)
        {
            InitializeComponent();

            var dialogService = new DialogService(this);

            BindingContext = _viewModel = new RenderersViewModel(loggingService, config, dialogService);

            CheckCastingCommand = new Command(async() => await CheckCasting());

            BackgroundCommandWorker.RunInBackground(CheckCastingCommand, 10, 5);
        }
Пример #10
0
        public PlayerPageViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
            : base(loggingService, config, dialogService)
        {
            _service        = service;
            _loggingService = loggingService;
            _dialogService  = dialogService;
            Config          = config;

            RefreshCommand = new Command(async() => await Refresh());

            BackgroundCommandWorker.RunInBackground(RefreshCommand, 30, 15);
        }
Пример #11
0
        public SettingsViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
            : base(loggingService, config, dialogService)
        {
            _service        = service;
            _loggingService = loggingService;
            _dialogService  = dialogService;
            Config          = config;

            IsPurchased = Config.Purchased;

            PayCommand        = new Command(async() => await Pay());
            StopStreamCommand = new Command(async() => await StopStream());
            AboutCommand      = new Command(async() => await About());
        }
Пример #12
0
        public SettingsPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
        {
            InitializeComponent();

            _config         = config;
            _loggingService = loggingService;
            _dialogService  = dialogService;

            BindingContext = _viewModel = new SettingsViewModel(loggingService, config, dialogService, service);

            PlayOnBackgroundSwitch.Toggled  += PlayOnBackgroundSwitch_Toggled;
            UseInternalPlayerSwitch.Toggled += PlayOnBackgroundSwitch_Toggled;

            if (Device.RuntimePlatform == Device.UWP)
            {
                UsernameEntry.TextColor       = Color.Black;
                UsernameEntry.BackgroundColor = Color.Gray;
                PasswordEntry.TextColor       = Color.Black;
                PasswordEntry.BackgroundColor = Color.Gray;
                PinEntry.TextColor            = Color.Black;
                PinEntry.BackgroundColor      = Color.Gray;

                FontSizeLabel.IsVisible  = false;
                FontSizePicker.IsVisible = false;
            }

            MessagingCenter.Subscribe <string>(this, BaseViewModel.RequestBatterySettings, async(sender) =>
            {
                if (await _dialogService.Confirm("Při běhu na pozadí je nutné zajistit, aby se aplikace kvůli optimalizaci baterie neukončovala. Přejít do nastavení?"))
                {
                    MessagingCenter.Send <SettingsPage>(this, BaseViewModel.SetBatterySettings);
                }
            });

            TVAPIPicker.Unfocused += TVAPIPicker_Unfocused;
            LastChannelAutoPlayPicker.Unfocused += LastChannelAutoPlayPicker_Unfocused;
            FontSizePicker.Unfocused            += FontSizePicker_Unfocused;

            PasswordEntry.Unfocused += PasswordEntry_Unfocused;
        }
Пример #13
0
        public static int GetScaledSize(IOnlineTelevizorConfiguration Config, int normalSize)
        {
            switch (Config.AppFontSize)
            {
            case AppFontSizeEnum.AboveNormal:
                return(Convert.ToInt32(Math.Round(normalSize * 1.12)));

            case AppFontSizeEnum.Big:
                return(Convert.ToInt32(Math.Round(normalSize * 1.25)));

            case AppFontSizeEnum.Bigger:
                return(Convert.ToInt32(Math.Round(normalSize * 1.5)));

            case AppFontSizeEnum.VeryBig:
                return(Convert.ToInt32(Math.Round(normalSize * 1.75)));

            case AppFontSizeEnum.Huge:
                return(Convert.ToInt32(Math.Round(normalSize * 2.0)));

            default: return(normalSize);
            }
        }
Пример #14
0
        public RenderersViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService)
            : base(loggingService, config, dialogService)
        {
            _loggingService = loggingService;
            _dialogService  = dialogService;
            Config          = config;

            // load native libvlc libraries
            Core.Initialize();

            // create core libvlc object
            _libVLC = new LibVLC();

            // create a renderer discoverer
            _rendererDiscoverer = new RendererDiscoverer(_libVLC);

            // register callback when a new renderer is found
            _rendererDiscoverer.ItemAdded += RendererDiscoverer_ItemAdded;

            // start discovery on the local network
            _rendererDiscoverer.Start();
        }
Пример #15
0
        public ChannelDetailPage(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
        {
            InitializeComponent();

            BindingContext = _viewModel = new ChannelDetailViewModel(loggingService, config, dialogService, service);
        }
Пример #16
0
 public TimerPageViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService)
     : base(loggingService, config, dialogService)
 {
 }
Пример #17
0
 public HelpViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService, TVService service)
     : base(loggingService, config, dialogService)
 {
 }
Пример #18
0
 public BaseViewModel(ILoggingService loggingService, IOnlineTelevizorConfiguration config, IDialogService dialogService)
 {
     _loggingService = loggingService;
     _dialogService  = dialogService;
     Config          = config;
 }