private async void GoToMainMenu_Clicked(object sender, EventArgs e) { Dustbins.UpdateMCMCDustbin(); if (_varGroup == "Community") { await Navigation.PushAsync(new PointPage(), true); } else { await Navigation.PushAsync(new DashboardPage(), true); } }
public DashboardView() { CustomButton _DustbinBtn = new CustomButton(); _DustbinBtn.Text = "Dustbin"; _DustbinBtn.WidthRequest = 110; _DustbinBtn.Clicked += Dustbin_Clicked; CustomButton _CollectionBtn = new CustomButton(); _CollectionBtn.Text = "Pickup"; _CollectionBtn.WidthRequest = 110; _CollectionBtn.Clicked += Collection_Clicked; CustomButton _AnalyticBtn = new CustomButton(); _AnalyticBtn.Text = "Analytics"; _AnalyticBtn.WidthRequest = 110; _AnalyticBtn.Clicked += Analytic_Clicked; Content = new StackLayout { Children = { new StackLayout { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.CenterAndExpand, Orientation = StackOrientation.Vertical, Padding = new Thickness(50, 0), Children = { Configuration.GetSeperator(Dustbins.IdentifyOverallKPI() + "%", 80), new StackLayout { Margin = new Thickness(0, 20,0, 0), HorizontalOptions = LayoutOptions.Center, Orientation = StackOrientation.Vertical, Children = { _DustbinBtn, _CollectionBtn, _AnalyticBtn } } } } } }; }
public CollectionHistoryView() { _Navigation = Navigation; CustomButton _CancelBtn = new CustomButton(); _CancelBtn.Text = "Cancel"; _CancelBtn.WidthRequest = 120; _CancelBtn.Clicked += Cancel_Clicked; Content = new StackLayout { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Orientation = StackOrientation.Vertical, Children = { //Configuration.GetSeperator("LIST OF DONATION",15), new ScrollView() { BackgroundColor = Xamarin.Forms.Color.FromHex("EBEBEB"), HeightRequest = 870, //495, Content = ListTemplate(Dustbins.GetAllCreditTransaction()) }, new StackLayout { Margin = new Thickness(0, 15), HorizontalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, BackgroundColor = Configuration.ThemeColor, Children = { //_RegisterBtn, _CancelBtn } } } }; }