private void _stopAll() { LoggingService.Stop(); AlertService.Stop(); AppService.Stop(); RenderingService.Stop(); GestureService.Stop(this); }
private void _startAll() { LoggingService.Start(); AlertService.Start(); AppService.Start(); RenderingService.Start(); //GestureService.Start(this); }
public void Bang(Point p) { //if (p != null && RenderingService.MagicRenderer != null && RenderingService.MagicRenderer is SumoNinjaMonkey.Framework.Controls.DrawingSurface.ISpriteRenderer) //{ // ((SumoNinjaMonkey.Framework.Controls.DrawingSurface.ISpriteRenderer)RenderingService.MagicRenderer).AddSprite(p.X, p.Y, 0, 0.15d); //} //else //{ RenderingService.DoExplosion(p.X, p.Y); //} }
public void SetUpBase() { this.ContentRepository = MockRepository.GenerateStub <IContentRepository>(); this.WidgetSpecificationRepository = MockRepository.GenerateStub <IWidgetSpecificationRepository>(); this.ComponentLibrary = MockRepository.GenerateStub <IComponentSpecificationLibrary>(); this.PluginContextProvider = MockRepository.GenerateStub <IPluginContextProvider>(); this.RenderingService = new RenderingService( this.ContentRepository, this.WidgetSpecificationRepository, this.ComponentLibrary, this.PluginContextProvider); }
void Current_VisibilityChanged(object sender, Windows.UI.Core.VisibilityChangedEventArgs e) { if (e.Visible) { AppDatabase.Current.LoadInstances(); //_startAll(); NavigationService.NavigateOnUI("FlickrLoginView"); } else { AppDatabase.Current.Unload(); RenderingService.Unload(); _stopAll(); NavigationService.NavigateOnUI("SuspendedView"); } }
private void _cleanUpAll() { SettingsPane.GetForCurrentView().CommandsRequested -= _vm.onCommandsRequested; //SearchPane.GetForCurrentView().QuerySubmitted -= _vm.onQuerySubmitted; RenderingService.Stop(); GestureService.Stop(this); ccDrawingSurfaceBottom.Content = null; ccDrawingSurfaceTop.Content = null; _fvm.ChangeState -= _fvm_ChangeState; DownloadService.Current.DownloadCountChanged -= Current_DownloadCountChanged; Messenger.Default.Unregister <GeneralSystemWideMessage>(this, DoGeneralSystemWideMessageCallback); AppService.NetworkConnectionChanged -= AppService_NetworkConnectionChanged; WindowLayoutService.OnWindowLayoutRaised -= WindowLayoutService_OnWindowLayoutRaised; }
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 { } }
private void _cleanUpAll() { pbMainLoading.IsActive = false; ccDrawingSurfaceBottom.Content = null; ccDrawingSurfaceTop.Content = null; RenderingService.Unload(); GestureService.Stop(this); SettingsPane.GetForCurrentView().CommandsRequested -= _vm.onCommandsRequested; GestureService.OnGestureRaised -= GestureService_OnGestureRaised; //SearchPane.GetForCurrentView().QuerySubmitted -= _vm.onQuerySubmitted; flickrLoggedInUser.LogoutRequested -= flickrLoggedInUser_LogoutRequested; flickrLoggedInUser.UnloadControl(); flickrPublicFavourites.UnloadControl(); flickrPromoted.UnloadControl(); flickrPicture.UnloadControl(); flickrPictureToolbar.UnloadControl(); flickrSmallList.UnloadControl(); _fvm.ChangeState -= _fvm_ChangeState; DownloadService.Current.DownloadCountChanged -= Current_DownloadCountChanged; //Messenger.Default.Unregister<GeneralSystemWideMessage>(this, DoGeneralSystemWideMessageCallback); //_fvm.Unload(); //_vm = null; //_fvm = null; }
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(); }
void Current_Suspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e) { _stopAll(); AppDatabase.Current.Unload(); RenderingService.Unload(); }