public override Task InitializeAsync(object navigationData) { NavigationData = navigationData as HomeMenuModel; ocean.SubscribeMessagingCenterMethod(); rail.UnSubscribeMessagingCenterMethod(); road.UnSubscribeMessagingCenterMethod(); OceanCommand.Execute(null); return(base.InitializeAsync(navigationData)); }
//public async Task<List<T>> GetListHomeMenuAsync<T>() //{ // try // { // //await Task.Delay(5000); // return JsonConvert.DeserializeObject<List<T>>("[\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n]"); // } // catch (Exception e) // { // return default(List<T>); // } // finally // { // } //} public async Task <List <T> > GetListHomeMenuAsync <T>() { try { var l = new List <HomeMenuModel>(); //await Task.Delay(5000); for (int i = 0; i < 10; i++) { var o = new HomeMenuModel(); o.base64 = "https://png.icons8.com/metro/1600/home.png"; o.Menu_name = "Goku"; o.sub_menu = new List <string> { "Submenu 1", "Submenu 2", "Submenu 3" }; if (i % 2 == 1) { o.banner_list = "http://artificial-intelligence.biz/images/joomlart/article/banner5.jpg"; } else { o.banner_list = "https://previews.123rf.com/images/arrow/arrow1508/arrow150800013/43834604-mobile-marketing-flat-design-concept-banner-background.jpg"; } l.Add(o); } var jsonlist = JsonConvert.SerializeObject(l); return(JsonConvert.DeserializeObject <List <T> >(jsonlist)); //return JsonConvert.DeserializeObject<List<T>>("[\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n{\r\n\'Menu_name\' : \'Vessel\',\r\n\'base64\':\'https://vignette.wikia.nocookie.net/dbz-dokkanbattle/images/6/68/Leaping_Even_Higher_Super_Saiyan_Goku.png/revision/latest?cb=20160830122933\',\r\n\'sub_menu\':[\'submenu1\',\'submenu2\',\'submenu3\']\r\n},\r\n]"); } catch (Exception e) { return(default(List <T>)); } finally { } }
private async Task InitClass() { lstMenuDesplegable = await HomeMenuModel.MenuDesplegable(); lstOriginalMenuDesplegable = lstMenuDesplegable.ToList(); }
private void SelectedHomeMenu(object obj) { HomeMenuModel SelectedItem = obj as HomeMenuModel; nav.NavigateToAsync <DetailsTabbedViewModel>(SelectedItem); }