Esempio n. 1
0
        private async Task <bool> OnRecErrorAsync()
        {
            bool flag;
            OkCancelPopupViewModel    okCancelPopupViewModel   = new OkCancelPopupViewModel(ResourcesModel.Instanse.COM_SID_STOP_RECORDING, ResourcesModel.Instanse.MAPP_SID_TV_CURRENTLY_RECORDING_BEFORE_CHANGE_SOURCE, true);
            PopupWrapper              popupWrapper             = base.Controller.CreatePopup(okCancelPopupViewModel, false);
            AlternativePopupEventArgs alternativePopupEventArg = await popupWrapper.ShowDialogAsync() as AlternativePopupEventArgs;

            Settings.Default.ExitDoNotShowAgain = okCancelPopupViewModel.CheckBoxState;
            Settings.Default.Save();
            if (alternativePopupEventArg != null)
            {
                bool?decision = alternativePopupEventArg.Decision;
                if ((!decision.GetValueOrDefault() ? false : decision.HasValue))
                {
                    bool flag1 = await this.TargetDevice.StopRecordAsync();

                    if (!flag1)
                    {
                        flag = flag1;
                        return(flag);
                    }
                    else
                    {
                        base.Controller.ShowMessage("Recording stopped");
                        flag = flag1;
                        return(flag);
                    }
                }
            }
            await this.TargetDevice.RestartView();

            flag = false;
            return(flag);
        }
        public override async Task OnNavigateToAsync()
        {
            //await this.<>n__FabricatedMethod3();
            if (this.dataLibrary != null)
            {
                this.multimediaLoadingPopup  = base.Controller.CreatePopup(new MultimediaAddingContentPopupViewModel(this.dataLibrary), false);
                this.dataLibrary.DataLoaded += new EventHandler(this.OnDataLoadedChanged);
            }
            string repeatTrackFlag = Settings.Default.RepeatTrackFlag;

            try
            {
                this.IsRepeat = new bool?(bool.Parse(repeatTrackFlag));
            }
            catch
            {
                this.IsRepeat = null;
            }
            this.IsRandom = Settings.Default.ShuffleTrackFlag;
            if (this.ContentType == MediaLibrary.DataModels.ContentType.Video)
            {
                this.Volume = Settings.Default.VolumePlayerForVideo;
            }
            if (this.ContentType == MediaLibrary.DataModels.ContentType.Track)
            {
                this.Volume = Settings.Default.VolumePlayerForAudio;
            }
        }
        private void OnChangeTV(object obj)
        {
            PopupWrapper popupWrapper = this.changeTVPopup;

            object[] controller = new object[] { this.deviceController, base.Controller, this.InnerController };
            popupWrapper.Show(controller);
        }
Esempio n. 4
0
 public override async Task OnNavigateToAsync()
 {
     this.Volume = Settings.Default.VolumeTv;
     this.IsCcDataButtonPressed            = Settings.Default.CcDataVisible;
     this.messagePopup                     = base.Controller.CreatePopup(new MessagePopupViewModel(), false);
     this.TargetDevice.ErrorMessageArised += new EventHandler <ErrorMessageEventArgs>(this.TvVideoViewModel_ErrorMessageArised);
     this.TargetDevice.ViewStarted        += new EventHandler(this.TvVideoViewModel_ViewStarted);
     await this.TargetDevice.SetRemoteControlStateAsync(false);
 }
Esempio n. 5
0
        private async void OnRemoveFolder(object obj)
        {
            bool             flag;
            MultimediaFolder multimediaFolder = obj as MultimediaFolder;

            if (multimediaFolder != null)
            {
                if (!Settings.Default.RemoveFolderNotificationDoNotShowAgain)
                {
                    using (PopupWrapper popupWrapper = base.Controller.CreatePopup(new YesNoPopupViewModel(ResourcesModel.Instanse.MAPP_SID_REMOVE_FOLDER, ResourcesModel.Instanse.MAPP_SID_SURE_WANT_TO_REMOVE_SELECTED_FOLDERS, true), false))
                    {
                        AlternativePopupEventArgs alternativePopupEventArg = await popupWrapper.ShowDialogAsync() as AlternativePopupEventArgs;

                        if (alternativePopupEventArg != null)
                        {
                            Settings.Default.RemoveFolderNotificationDoNotShowAgain = alternativePopupEventArg.CheckBoxState;
                            Settings.Default.Save();
                            bool?decision = alternativePopupEventArg.Decision;
                            flag = (!decision.GetValueOrDefault() ? true : !decision.HasValue);
                            if (flag)
                            {
                                return;
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                }
                switch (this.ContentType)
                {
                case MediaLibrary.DataModels.ContentType.Image:
                {
                    this.dataLibrary.DeleteFileOrFolder(this.dataLibrary.RootImageFolder, multimediaFolder);
                    goto case MediaLibrary.DataModels.ContentType.Track;
                }

                case MediaLibrary.DataModels.ContentType.Track:
                {
                    break;
                }

                case MediaLibrary.DataModels.ContentType.Video:
                {
                    this.dataLibrary.DeleteFileOrFolder(this.dataLibrary.RootVideoFolder, multimediaFolder);
                    goto case MediaLibrary.DataModels.ContentType.Track;
                }

                default:
                {
                    goto case MediaLibrary.DataModels.ContentType.Track;
                }
                }
            }
        }
        private void OnSlideshowSettings(object obj)
        {
            PopupWrapper           popupWrapper           = this.slideshowSettingsPopup;
            SlideShowSettingsModel slideShowSettingsModel = new SlideShowSettingsModel()
            {
                Speed  = Settings.Default.QueueSpeed,
                Effect = Settings.Default.QueueEffect
            };

            popupWrapper.Show(slideShowSettingsModel);
        }
 public override void OnNavigateTo(object p)
 {
     this.device          = (DeviceInfo)p;
     base.IsDataLoaded    = true;
     this.InvalidPinCount = 0;
     this.PinErrorMessage = string.Empty;
     this.messagePopup    = base.Controller.CreatePopup(new MessagePopupViewModel(), true);
     this.ResetPin();
     this.StartTimer();
     base.OnNavigateTo(p);
 }
Esempio n. 8
0
 public override async Task OnNavigateToAsync()
 {
     //await this.<>n__FabricatedMethod4();
     this.messagePopup   = base.Controller.CreatePopup(new VideoErrorPopupViewModel(), false);
     this.textInputPopup = base.Controller.CreatePopup(new TextInputPopupViewModel(this.TargetDevice), false);
     this.TargetDevice.ShowInputKeyboard    += new EventHandler <EventArgs>(this.TargetDevice_ShowInputKeyboard);
     this.TargetDevice.ShowPasswordKeyboard += new EventHandler <EventArgs>(this.TargetDevice_ShowPasswordKeyboard);
     this.TargetDevice.HideKeyboard         += new EventHandler <EventArgs>(this.TargetDevice_HideKeyboard);
     this.TargetDevice.TextUpdated          += new EventHandler <UpdateTextEventArgs>(this.TargetDevice_TextUpdated);
     this.TargetDevice.ErrorMessageArised   += new EventHandler <ErrorMessageEventArgs>(this.TargetDevice_ErrorMessageArised);
 }
        private async void pinTimeOutTimer_Tick(object sender, EventArgs e)
        {
            await this.deviceController.ClosePinPageOnTV();

            this.StopTimer();
            PopupWrapper popupWrapper = this.messagePopup;

            string[] cOMTVSIDTRYAGAIN = new string[] { ResourcesModel.Instanse.COM_TV_SID_TRY_AGAIN, ResourcesModel.Instanse.MAPP_SID_PIN_ENTRY_TIME_LIMIT_EXPIRED };
            await popupWrapper.ShowDialogAsync(cOMTVSIDTRYAGAIN);

            base.Controller.ClosePopup(false);
        }
Esempio n. 10
0
        private async void OnPair(object obj)
        {
            string[] strArrays = this.pinNumbers;
            if (!(
                    from number in strArrays
                    where string.IsNullOrEmpty(number)
                    select number).Any <string>())
            {
                try
                {
                    try
                    {
                        base.IsDataLoaded = false;
                        string str = string.Concat(this.pinNumbers);
                        if (await this.deviceController.SetPin(str))
                        {
                            base.Controller.ClosePopup(true);
                        }
                        PinViewModel invalidPinCount = this;
                        invalidPinCount.InvalidPinCount = invalidPinCount.InvalidPinCount + 1;
                        PinViewModel pinViewModel = this;
                        object[]     mAPPSIDENTEREDINCORRECTPIN = new object[] { ResourcesModel.Instanse.MAPP_SID_ENTERED_INCORRECT_PIN, this.InvalidPinCount, this.MaxInvalidCount, ResourcesModel.Instanse.COM_TV_SID_PLEASE_TRY_AGAIN };
                        pinViewModel.PinErrorMessage = string.Format("{0}({1}/{2})\n{3}", mAPPSIDENTEREDINCORRECTPIN);
                        this.ResetPin();
                        if (this.InvalidPinCount >= this.MaxInvalidCount)
                        {
                            this.RestartTimer();
                            PopupWrapper popupWrapper    = this.messagePopup;
                            string[]     mAPPSIDPINERROR = new string[] { ResourcesModel.Instanse.MAPP_SID_PIN_ERROR, ResourcesModel.Instanse.MAPP_SID_ENTERED_INCORRECT_PIN_CHECK_PIN_AGAIN };
                            await popupWrapper.ShowDialogAsync(mAPPSIDPINERROR);

                            base.Controller.ClosePopup(false);
                        }
                    }
                    catch (Exception exception)
                    {
                        base.Controller.ClosePopup(exception);
                    }
                }
                finally
                {
                    base.IsDataLoaded = true;
                }
            }
            else
            {
                this.PinErrorMessage = ResourcesModel.Instanse.MAPP_SID_PIN_ENTERD_SHORT_TRY;
            }
        }
Esempio n. 11
0
 public override async Task OnNavigateToAsync()
 {
     //await this.<>n__FabricatedMethod2();
     if (this.dataLibrary != null)
     {
         this.multimediaLoadingPopup  = base.Controller.CreatePopup(new MultimediaAddingContentPopupViewModel(this.dataLibrary), false);
         this.dataLibrary.DataLoaded += new EventHandler(this.OnDataLoadedChanged);
     }
     if (!this.isPlayerResumed && this.savedVisualState != null && this.savedVisualState.PlayerState != null)
     {
         BaseSavedVisualState baseSavedVisualState = this.SaveVisualState(this.savedVisualState.PlayerState);
         base.Controller.Navigate(new MediaPlayerViewModel(baseSavedVisualState, this.multiScreen, this.dataLibrary, baseSavedVisualState.PlayerState), false);
         this.isPlayerResumed = true;
     }
 }
 public override async Task OnCreateAsync()
 {
     //await this.<>n__FabricatedMethod2();
     this.pinPopup                            = base.Controller.CreatePopup(new PinViewModel(this.deviceController), false);
     this.tvViewModel                         = new TvVideoViewModel(this.deviceController, this.TargetDevice);
     this.InnerController                     = new UIFoundation.Navigation.Controller(this.tvViewModel, base.Controller);
     this.messagePopup                        = base.Controller.CreatePopup(new MessagePopupViewModel(), false);
     this.slideshowSettingsPopup              = base.Controller.CreatePopup(new QueueSettingsViewModel(this.TargetDevice.MultiScreen), false);
     this.slideshowSettingsPopup.PopupClosed += new EventHandler <PopupClosedEventArgs>(this.slideshowSettingsPopup_PopupClosed);
     this.guidePopup                          = base.Controller.CreatePopup(new GuideViewModel(), true);
     this.versionPopup                        = base.Controller.CreatePopup(new VersionViewModel(), true);
     this.licensePopup                        = base.Controller.CreatePopup(new LicenseViewModel(), true);
     this.ccSettingsPopup                     = base.Controller.CreatePopup(new CCSettingsViewModel(), true);
     this.ccSettingsPopup.PopupClosed        += new EventHandler <PopupClosedEventArgs>(this.ccSettingsPopup_PopupClosed);
     this.changeTVPopup                       = base.Controller.CreatePopup(new ChangeTVViewModel(), true);
 }
Esempio n. 13
0
        private async void OnTvPower(object obj)
        {
            using (PopupWrapper popupWrapper = base.Controller.CreatePopup(new YesNoPopupViewModel(ResourcesModel.Instanse.COM_TV_SID_CMD_POWER_OFF, ResourcesModel.Instanse.MAPP_SID_TURN_OFF_TV_APP_ALSO_CLOSE), false))
            {
                AlternativePopupEventArgs alternativePopupEventArg = await popupWrapper.ShowDialogAsync() as AlternativePopupEventArgs;

                if (alternativePopupEventArg != null)
                {
                    bool?decision = alternativePopupEventArg.Decision;
                    if ((!decision.GetValueOrDefault() ? false : decision.HasValue))
                    {
                        this.TargetDevice.CurrentSource.RemoteControl.Power.ExecuteIfYouCan(obj);
                        await this.deviceController.DisconnectAsync(true);

                        this.deviceController.RefreshDiscovery();
                        await this.parentController.GoBack(typeof(WelcomeViewModel));
                    }
                }
            }
        }
Esempio n. 14
0
        private async Task RunPopup()
        {
            var key = GetType().Name;

            PopupWrapper[] wrapper       = { null };
            var            closeCallback = (Action)(() => wrapper[0]?.Close());

            if (CloseCallbacks.TryGetValue(key, out var shown))
            {
                shown();
            }

            using (wrapper[0] = new PopupWrapper(GetSize(), GetControl())) {
                CloseCallbacks[key] = closeCallback;
                await wrapper[0].ShowAndWaitAsync();
                if (CloseCallbacks.TryGetValue(key, out var current) && current == closeCallback)
                {
                    CloseCallbacks.Remove(key);
                }
            }
        }
        private void OnPreview(object obj)
        {
            PopupWrapper popupWrapper = base.Controller.CreatePopup(new PreviewPopupViewModel(ResourcesModel.Instanse.COM_STR_KEYPAD_FLS_CAPITAL_2, ResourcesModel.Instanse.COM_SID_PREVIEW, this.CreateStyle()), false);

            popupWrapper.Show();
        }
 public override void OnNavigateTo(object p)
 {
     this.SettingsModel     = SmartView2.Models.Settings.SettingsModel.Load();
     this.resetAllPopup     = base.Controller.CreatePopup(new OkCancelPopupViewModel(ResourcesModel.Instanse.COM_IDS_TXT_RESET_ALL, ResourcesModel.Instanse.MAPP_SID_RESET_ALL_CLOSED_CAPTION_OPTIONS_DEFAULT), false);
     this.resetAllInfoPopup = base.Controller.CreatePopup(new MessagePopupViewModel(ResourcesModel.Instanse.MAPP_SID_CLOSED_CAPTION_OPTIONS_RESET, ResourcesModel.Instanse.COM_BDP_SID_SMARTHUB_RESET_COMPLETE_TEXT), false);
 }