public App() { InitializeComponent(); NavigationHandler handler = new NavigationHandler(); AudioPlayerPageVM audioPlayerPageVM = new AudioPlayerPageVM(); AudioLibPageVM audioLibPageVM = new AudioLibPageVM(handler); ConnectionPageVM connectionPageVM = new ConnectionPageVM(handler); ModesPageVM modesPageVM = new ModesPageVM(); SettingsPageVM settingsPageVM = new SettingsPageVM(); AddSongPageVM addSongPageVM = new AddSongPageVM(handler); MainPageVM mainPageVM = new MainPageVM(handler); AudioPlayerPage audioPlayerPage = new AudioPlayerPage(audioPlayerPageVM); AudioLibPage audioLibPage = new AudioLibPage(audioLibPageVM); ConnectionPage connectionPage = new ConnectionPage(connectionPageVM); ModesPage modesPage = new ModesPage(modesPageVM); SettingsPage settingsPage = new SettingsPage(settingsPageVM); AddSongPage addSongPage = new AddSongPage(addSongPageVM); MainPage mainPage = new MainPage(mainPageVM); ContentPage[] pages = { audioPlayerPage, audioLibPage, connectionPage, modesPage, settingsPage, addSongPage, mainPage }; handler.SetPages(pages); MainPage = new NavigationPage(mainPage); }
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(); }