コード例 #1
0
        public SplashPage(SplashPageViewModel splashPageViewModel)
        {
            InitializeComponent();

            _splashPageViewModel = splashPageViewModel;

            _splashPageViewModel.ConnectedToPage = this;

            BindingContext = _splashPageViewModel;
        }
コード例 #2
0
ファイル: SplashPage.xaml.cs プロジェクト: acoville/Valkyrie
        //======================================================================

        /*-----------------------------------------
        *
        * Constructor will load the appropriate
        * splash image
        *
        * ---------------------------------------*/

        public SplashPage()
        {
            InitializeComponent();

            spvm = new SplashPageViewModel();

            if (spvm.orientation == Screen.Orientation.landscape)
            {
                ImageTag.Source = "splash_landscape.png";
            }
            else if (spvm.orientation == Screen.Orientation.portrait)
            {
                ImageTag.Source = "splash_portrait.png";
            }
        }
コード例 #3
0
        public SplashPage()
        {
            InitializeComponent();
            BindingContext = new SplashPageViewModel(Navigation);

            //Device.StartTimer(TimeSpan.FromMilliseconds(200), () =>
            //{
            //    ProgressInitilize.Progress += 0.01;
            //    if (ProgressInitilize.Progress > .5)
            //    {
            //        ProgressInitilize.Progress = 0;
            //        return false;
            //    }
            //    return true;
            //});
        }
コード例 #4
0
        public void OnNavigatedToTest()
        {
            SplashPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.OnNavigatedTo(SplashPage.BuildNavigationParams(Destination.ContactedNotifyPage, new NavigationParameters {
                { "test-key", "test-value" }
            }));

            _mockMigrationService.Verify(x => x.MigrateAsync(), Times.Once());

            _mockSplashNavigationService.VerifySet(x => x.Destination = Destination.ContactedNotifyPage, Times.Once());
            _mockSplashNavigationService.VerifySet(x =>
                                                   x.DestinationPageParameters = It.Is <INavigationParameters>(x =>
                                                                                                               x.ContainsKey("test-key") && x.GetValue <string>("test-key") == "test-value"),
                                                   Times.Once()
                                                   );

            _mockSplashNavigationService.Verify(x => x.Prepare(), Times.Once());
            _mockSplashNavigationService.Verify(x => x.NavigateNextAsync(false), Times.Once());
        }