protected override async void OnAppearing() { if (CheckConnection.validate()) { bool validate = await CheckAuth.validate(); if (validate) { await Navigation.PushModalAsync(new Timeline()); } else { loader.IsVisible = false; formLogin.IsVisible = true; btRemember.IsVisible = true; } } else { App.Current.MainPage = new NavigationPage(new FailConnection()); } base.OnAppearing(); }
protected override async void OnAppearing() { if (CheckConnection.validate()) { bool validate = await CheckAuth.validate(); if (!validate) { App.Current.MainPage = new NavigationPage(new Login()); } else { await makeTimeline(); string screen = Settings.config_screen; double s = Convert.ToDouble(screen); MainRelative.HeightRequest = s; } } else { App.Current.MainPage = new NavigationPage(new FailConnection()); } base.OnAppearing(); }
protected override async void OnAppearing() { base.OnAppearing(); bool validate = await CheckAuth.validate(); if (validate) { await Navigation.PushAsync(new Timeline()); } string endpoint = "portalib-dev-category"; IDictionary <string, string> parameters = new Dictionary <string, string>() { { "", "" } }; IDictionary <string, string> call = new Dictionary <string, string> { { "act", "categoryall" }, { "mod", "category" } }; dynamic res = await decora.Service.Run(endpoint, call, "GET", parameters); makeCategories(res); }
protected override async void OnAppearing() { bool validate = await CheckAuth.validate(); if (!validate) { App.Current.MainPage = new NavigationPage(new Login()); } base.OnAppearing(); }
protected override async void OnAppearing() { bool validate = await CheckAuth.validate(); if (!validate) { App.Current.MainPage = new NavigationPage(new Login()); } base.OnAppearing(); img_category.Source = ImageRender.display("post", "foto5.jpg"); }
protected override async void OnAppearing() { bool validate = await CheckAuth.validate(); if (!validate) { App.Current.MainPage = new NavigationPage(new Login()); } else { MainRelative.HeightRequest = Application.Current.MainPage.Height; makePost(postId); } base.OnAppearing(); }
protected override async void OnAppearing() { bool validate = await CheckAuth.validate(); if (!validate) { App.Current.MainPage = new NavigationPage(new Login()); } base.OnAppearing(); string endpoint = "portalib-dev-category"; IDictionary <string, string> parameters = new Dictionary <string, string>() { { "", "" } }; IDictionary <string, string> call = new Dictionary <string, string> { { "act", "allblog" }, { "mod", "category" } }; dynamic res = await decora.Service.Run(endpoint, call, "GET", parameters); int c = 0; int i = 0; foreach (var item in res) { c++; } if (c > 0) { category_sel.GestureRecognizers.Add(new TapGestureRecognizer() { Command = new Command(() => { comboCategory.Focus(); }) }); List <CategoryModel> category = new List <CategoryModel>(); Dictionary <int, string> valuess = new Dictionary <int, string>(); foreach (var item in res) { comboCategory.Items.Add((string)item["title"]); category.Add(new CategoryModel { id = Convert.ToInt32((string)item["idCategory"]), title = (string)item["title"] }); } comboCategory.Title = "- - -"; comboCategory.SelectedIndexChanged += (object sender, EventArgs e) => { if (comboCategory.SelectedIndex != -1) { i = 0; foreach (var itemCat in category) { if (comboCategory.SelectedIndex == i) { App.Current.MainPage = new NavigationPage(new BlogList(itemCat.id, comboCategory.Items[comboCategory.SelectedIndex])); } i++; } } }; } }