public App() { InitializeComponent(); AudioPlayerPageVM audioPlayerPageVM = new AudioPlayerPageVM(); AudioLibPageVM audioLibPageVM = new AudioLibPageVM(); ModesPageVM modesPageVM = new ModesPageVM(); SettingsPageVM settingsPageVM = new SettingsPageVM(); AddSongPageVM addSongPageVM = new AddSongPageVM(); MainPageVM mainPageVM = new MainPageVM(); AudioPlayerPage audioPlayerPage = new AudioPlayerPage(audioPlayerPageVM); AudioLibPage audioLibPage = new AudioLibPage(audioLibPageVM); ModesPage modesPage = new ModesPage(modesPageVM); SettingsPage settingsPage = new SettingsPage(settingsPageVM); AddSongPage addSongPage = new AddSongPage(addSongPageVM); MainPage mainPage = new MainPage(mainPageVM); ContentPage[] pages = { audioPlayerPage, audioLibPage, modesPage, settingsPage, addSongPage, mainPage }; NavigationHandler.SingletonNavHandler.SetPages(pages); MainPage = new AnimationNavigationPage(mainPage); GetPermissions(); }
private IPageAnimation GetPageAnimation(Page page, bool animated) { var animation = _useDefaultAnimation ? _defaultAnimation : AnimationNavigationPage.GetAnimation(page, animated); _useDefaultAnimation = false; return(animation); }
protected override Task <bool> OnPopToRootAsync(Page page, bool animated) { var animation = AnimationNavigationPage.GetAnimation(page, animated); animation.Duration = animated ? _popToRooAnimationDuration : 0; return(SwitchContentAsync(page, animation)); }
public App () { InitializeComponent(); //MainPage = new MainPage(); MainPage = new AnimationNavigationPage(new MainPage()); }
private void InitDeiveredPage(ManagerDispatchMob managerDispatchMob) { AnimationNavigationPage navigationPage = new AnimationNavigationPage(new DeiveredPage(managerDispatchMob, Navigation)); navigationPage.Title = "Deiveredge"; navigationPage.IconImageSource = "Delivery.png"; Children.Add(navigationPage); }
private void InitArchivedPage(ManagerDispatchMob managerDispatchMob) { AnimationNavigationPage navigationPage = new AnimationNavigationPage(new ArchivedPage(managerDispatchMob, Navigation)); navigationPage.Title = "Archived"; navigationPage.IconImageSource = "Archive.png"; Children.Add(navigationPage); }
protected override Task <bool> OnPopViewAsync(Page page, bool animated) { var appearingPage = ((INavigationPageController)Element).Pages.Skip(1).FirstOrDefault(); var animation = AnimationNavigationPage.GetAnimation(page, animated); // appearingPage?.DisplayAlert("Trial", "You using trial version of AnimationNavPage control", "Ok"); var result = appearingPage != null?SwitchContentAsync(appearingPage, animation) : Task.FromResult(false); return(result); }
public App() { InitializeComponent(); var database = new Database(); Globals.BuildGlobals(new HeartrateRepository(database), new SleepRepository(database), new StepsRepository(database), database); //database.EmptyDatabase(); MainPage = new AnimationNavigationPage(new HomePage()); }
public App() { #if DEBUG HotReloader.Current.Run(this); #endif MainPage = new AnimationNavigationPage(new MainMenuPage()) { BarTextColor = Color.White }; }
protected override Task <bool> OnPushAsync(Page view, bool animated) { if (_currentPage == null) // process root page in NavigationStack { _currentPage = view.GetXPage(); ProcessPageAppearing(_currentPage, false); return(Task.FromResult(true)); } return(SwitchContentAsync(view, AnimationNavigationPage.GetAnimation(view, animated), false)); }
protected override void OnResume() { // Handle when your app resumes GlobalStaticFields.SetSleepTimer(); if (IsTokenExpired()) { MainPage = new AnimationNavigationPage(new UnProfiledLoginPage()); return; } //LogUserOut(); }
public App() { InitializeComponent(); //Register Azure Login Service DependencyService.Register <AzureAuthHelper>(); //Navigate to Authentication Page MainPage = new AnimationNavigationPage(new AuthenticatePage()); //MainPage = new NavigationPage(new MainPage()); }
public App() { InitializeComponent(); if (CrossConnectivity.Current.IsConnected) { Device.StartTimer(TimeSpan.FromSeconds(2), () => { return(CheckConnection()); }); AnimationNavigationPage amo = new AnimationNavigationPage(new LoginPage()); MainPage = amo; } }
private void OnListItemSelected(object sender, SelectedItemChangedEventArgs args) { var item = args.SelectedItem as SingleSample; if (item != null) { IsPresented = false; Detail = new AnimationNavigationPage(item.CreateAnimationPage()) { BarTextColor = Color.White, BarBackgroundColor = Color.FromHex("#3F51B5") }; masterPage.ListView.SelectedItem = null; } }
public App() { Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MTU5OTg2QDMxMzcyZTMzMmUzMFROdjlBSDFPTVp1Y2RSWUxTSm0zak9Wb3I4TW5uYnZBeTRVcVNMV3N2OWs9;MTU5OTg3QDMxMzcyZTMzMmUzMGxraDlwUUozZnVBL0Z5eDhMU0dXVmpJa3RWb1YrUkJJQmtvakNGc0ZRZmc9;MTU5OTg4QDMxMzcyZTMzMmUzMGMvTmZaOUVFcTNLb3JYdXR6Vm1nb1RnVnp1b0FTNFAyWWowdDBWU3czL2s9;MTU5OTg5QDMxMzcyZTMzMmUzMFJFYTNWa2ttajlyY2xBa2Qza1hlazF2bk55SXJMMVkwcTkxUm9acklMVkk9;MTU5OTkwQDMxMzcyZTMzMmUzME9wUVRWM2tNT3lyZDVFcFM2VzFIUU9xSnZhc1JXZTgrSmdET3RxNDlCbDg9;MTU5OTkxQDMxMzcyZTMzMmUzMFRWanpHRWVJOERvWS9ra1RseUNZTG5qZDNxcXppTzN4Y2dsWEhodGVtbWM9;MTU5OTkyQDMxMzcyZTMzMmUzMFFicDdBVGRQRk5CRDFnc0Q5M1Bzb0hMNEZVQkVUc0RVR0IxMGhSV1h1ZWs9;MTU5OTkzQDMxMzcyZTMzMmUzMEQxZDBVU3BKZFNNRjNRQm9RbWkxUkttZUtoeDg5MHY5ckZabkxldzlKSGc9;MTU5OTk0QDMxMzcyZTMzMmUzMFJFYTNWa2ttajlyY2xBa2Qza1hlazF2bk55SXJMMVkwcTkxUm9acklMVkk9;NT8mJyc2IWhiZH1gfWN9YmdoYmF8YGJ8ampqanNiYmlmamlmanMDHmg+JiAgMjF9IToyPToTOzwnPjI6P30wPD4="); InitializeComponent(); if (UseMockDataStore) { DependencyService.Register <MockDataStore>(); } else { DependencyService.Register <AzureDataStore>(); } MainPage = new AnimationNavigationPage(new WelcomPage()); }
public App() { InitializeComponent(); string token = CrossSettings.Current.GetValueOrDefault("Token", ""); if (token == "") { isAvtorization = false; MainPage = new AnimationNavigationPage(new Avtorization()); } else { TaskManager.isWorkTask = true; isAvtorization = true; MainPage = new AnimationNavigationPage(new TabPage(new Service.ManagerDispatchMob())); } }
public void InitializeAppStart() { GlobalStaticFields.Customer = new Services.Repository.Customer(); Task.Run(async() => await GlobalStaticFields._setLifeStyle()); // Task.Run(() => GlobalStaticFields.GetToken()); Task.Run(GlobalStaticFields.GetLocationFromPlugin); StoreUniqueID(); if (IsTokenExpired()) { //MainPage = new AnimationNavigationPage(new UnProfiledLoginPage()); MainPage = new NavigationPage(new UnProfiledLoginPage()); //MainPage = new NavigationPage(new Pages.BankAccounts.Views.TransactionDetails()); } else { MainPage = new AnimationNavigationPage(new UnProfiledLoginPage()); //MainPage = new NavigationPage(new Dashboard()); // MainPage = new NavigationPage(new Pages.AllTransactions.DetailedTransactionView()); } }
public AnimationNavigationPage SetMainPage(Type targetType, NavigationAnimation animation, Color?color = null, object args = null) { try { var page = _pageLocator.ResolvePageAndViewModel(targetType, args); if (animation != NavigationAnimation.None) { page.PageAnimation = GetPageAnimanition(animation); } _navigationPage = new AnimationNavigationPage(page); SetBarBackgroundColor(_navigationPage, color ?? Color.Default); SetStatusBarColor(color ?? Color.Default); return(_navigationPage); } catch (Exception e) { Console.WriteLine(e); throw; } }
public App() { InitializeComponent(); CurrentPage = new AnimationNavigationPage(new SplashPage()); MainPage = CurrentPage; }
private Task <bool> SwitchContentAsync(Page page, bool animated, bool removed = false, bool popToRoot = false) { var tcs = new TaskCompletionSource <bool>(); Fragment fragment = _hepler.GetFragment(page, removed, popToRoot); List <Fragment> fragments = _hepler.FragmentStack; FragmentManager fm = _hepler.FragmentManager; var currentPade = (removed ? _hepler.CurrentPage : page); var currentAnimPade = currentPade as IAnimationPage; var animation = AnimationNavigationPage.GetAnimation(currentPade, animated); _hepler.CurrentPage = page; _hepler.SetNavAnimationInProgress(Element, true); FragmentTransaction transaction = fm.BeginTransaction(); AnimationHelper.SetupTransition(transaction, animation, !removed, animated); if (animation.Type != AnimationType.Empty && animation.Duration != AnimationDuration.Zero) { currentAnimPade?.OnAnimationStarted(removed); } transaction.DisallowAddToBackStack(); if (fragments.Count == 0) { transaction.Add(Id, fragment); fragments.Add(fragment); } else { if (removed) { // pop only one page, or pop everything to the root var popPage = true; var fragmentsToRemove = new List <Fragment>(); while (fragments.Count > 1 && popPage) { var currentToRemove = fragments.Last(); fragments.RemoveAt(fragments.Count - 1); fragmentsToRemove.Add(currentToRemove); transaction.Hide(currentToRemove); popPage = popToRoot; } // we need it for poping pages with animation RemoveFragments(fragmentsToRemove); Fragment toShow = fragments.Last(); // Execute pending transactions so that we can be sure the fragment list is accurate. fm.ExecutePendingTransactions(); if (fm.Fragments.Contains(toShow)) { transaction.Show(toShow); } else { transaction.Add(Id, toShow); } } else { // push Fragment currentToHide = fragments.Last(); transaction.Hide(currentToHide); transaction.Add(Id, fragment); fragments.Add(fragment); } } // We don't currently support fragment restoration, so we don't need to worry about // whether the commit loses state transaction.CommitAllowingStateLoss(); // The fragment transitions don't really SUPPORT telling you when they end // There are some hacks you can do, but they actually are worse than just doing this: if (animated) { if (!removed) { _hepler.UpdateToolbar(); if (_hepler.DrawerToggle != null && ((INavigationPageController)Element).StackDepth == 2) { _hepler.AnimateArrowIn(); } } else if (_hepler.DrawerToggle != null && ((INavigationPageController)Element).StackDepth == 2) { _hepler.AnimateArrowOut(); } Device.StartTimer(TimeSpan.FromMilliseconds(TransitionDuration), () => { tcs.TrySetResult(true); fragment.UserVisibleHint = true; if (removed) { _hepler.UpdateToolbar(); } return(false); }); } else { Device.StartTimer(TimeSpan.FromMilliseconds(1), () => { tcs.TrySetResult(true); fragment.UserVisibleHint = true; _hepler.UpdateToolbar(); return(false); }); } Context.HideKeyboard(this); if (animation.Type != AnimationType.Empty && animation.Duration != AnimationDuration.Zero && currentAnimPade != null) { Device.StartTimer(TimeSpan.FromMilliseconds(GetAnimationDuration(currentAnimPade.PageAnimation)), delegate { currentAnimPade.OnAnimationFinished(removed); return(false); }); } _hepler.SetNavAnimationInProgress(Element, false); return(tcs.Task); }
public App() { InitializeComponent(); FolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); MainPage = new AnimationNavigationPage(new QuotePage()); }
public App() { InitializeComponent(); MainPage = new AnimationNavigationPage(new Views.WelcomePage()); }