Пример #1
0
 private void _startAll()
 {
     LoggingService.Start();
     AlertService.Start();
     AppService.Start();
     RenderingService.Start();
     //GestureService.Start(this);
 }
Пример #2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            sbLoadView.Completed += (obj, ea) =>
            {
                State.DrawingSurfaceWidth  = ccDrawingSurfaceBottom.ActualWidth;
                State.DrawingSurfaceHeight = ccDrawingSurfaceBottom.ActualHeight;

                layoutRoot.Background = new SolidColorBrush(Colors.White);

                RenderingService.Init(State);

                ccDrawingSurfaceBottom.Content = RenderingService.BackgroundSIS;
                ccDrawingSurfaceTop.Content    = RenderingService.MagicSIS;


                RenderingService.Start();

                GestureService.Start(this);



                if (_fvm.IsFlickrLoginDetailsCached())
                {
                    _fvm.ViewInit();
                    _fvm.ChangeState += _fvm_ChangeState;
                    _fvm.GetLoggedInUserDetails(_fvm.AccessToken.UserId);
                }
            };
            sbLoadView.Begin();


            try
            {
                SettingsPane.GetForCurrentView().CommandsRequested += _vm.onCommandsRequested;
                //SearchPane.GetForCurrentView().QuerySubmitted += _vm.onQuerySubmitted;
            }
            catch { }
        }
Пример #3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            OnNavigateToBase(Dispatcher);

            PopupService.Init(layoutRoot);

            DownloadService.Current.DownloadCountChanged += Current_DownloadCountChanged;

            layoutRoot.Background = new SolidColorBrush(Colors.Black);

            LoggingService.LogInformation("Showing splash screeen", "Views.HomeView");

            //_vm = new HomeViewModel();
            //_vm.Load();
            this.DataContext = _vm;

            //_fvm = new FlickrViewModel(Dispatcher);
            pbMainLoading.DataContext = _fvm;


            ////_vm.ShowLoginCommand.Execute(null);

            //Messenger.Default.Register<GeneralSystemWideMessage>(this, DoGeneralSystemWideMessageCallback);

            GestureService.OnGestureRaised += GestureService_OnGestureRaised;

            //AppDatabase.Current.DeleteProjects(SessionID);



            State.DrawingSurfaceWidth     = Window.Current.Bounds.Width;  // ccDrawingSurfaceBottom.ActualWidth;
            State.DrawingSurfaceHeight    = Window.Current.Bounds.Height; //ccDrawingSurfaceBottom.ActualHeight;
            State.DefaultBackgroundUri    = "\\Assets\\StartDemo\\Backgrounds\\green1.jpg";
            State.DefaultBackgroundFolder = string.Empty;


            flickrLoggedInUser.LogoutRequested += (obj, ea) => {
                _fvm.RequestLogout();
            };

            RenderingService.Init(State);



            sbLoadView.Completed += (obj, ea) =>
            {
                sbLoadView.Stop();

                layoutRoot.Background = new SolidColorBrush(Colors.White);

                ccDrawingSurfaceBottom.Content = RenderingService.BackgroundSIS;
                ccDrawingSurfaceTop.Content    = RenderingService.MagicSIS;
                RenderingService.Start();

                GestureService.Start(this);

                if (_fvm.IsFlickrLoginDetailsCached())
                {
                    _fvm.ViewInit();
                    _fvm.ChangeState += _fvm_ChangeState;
                    _fvm.GetLoggedInUserDetails(_fvm.AccessToken.UserId);
                    _fvm.GetLoggedInFavourites(_fvm.AccessToken.UserId);
                    //RenderingService.BackgroundRenderer.ChangeBackground("\\Assets\\StartDemo\\Backgrounds\\green1.jpg", string.Empty);
                }

                flickrPictureToolbar.ChangeViewTo(PictureToolbar.ViewType.Exif | PictureToolbar.ViewType.Fav | PictureToolbar.ViewType.Promote);
            };
            sbLoadView.Begin();



            SettingsPane.GetForCurrentView().CommandsRequested += _vm.onCommandsRequested;
            //SearchPane.GetForCurrentView().QuerySubmitted += _vm.onQuerySubmitted;

            //NotifyGCTotalMemory();
        }