using Justice.Helpers; using Microsoft; namespace Justice.Views; public partial class DashboardPage : ContentPage { public DashboardPage() { InitializeComponent(); } public async void OnGetLocationClicked(object sender, EventArgs e) { try { var (latitude, longitude) = await GeolocationHelper.GetCurrentLocationAsync(); string address = await GeolocationHelper.GetReadableAddressAsync(latitude, longitude); LocationLabel.Text = $"{address}"; } catch (Exception ex) { await DisplayAlert("Error", ex.Message,"OK"); } } private void OnInformationCenterClicked(object sender, EventArgs e) { DisplayAlert("Information button clicked","Information","OK"); } private void OnHelpLineNumberClicked(object sender, EventArgs e) { DisplayAlert("Helpline Clicked button clicked", "HepLine Numbers", "OK"); } private void OnViewReportClicked(object sender, EventArgs e) { DisplayAlert("View Reports button clicked", "Reports", "OK"); } private void OnIncidentReportClicked(object sender, EventArgs e) { DisplayAlert("Report Incident button clicked", "Reprot", "OK"); } private void OnSOSButtonClicked(object sender, EventArgs e) { DisplayAlert("SOS button clicked", "Send SOS", "OK"); } private void OnAddContactClicked(object sender, EventArgs e) { DisplayAlert("Add contact button clicked", "Add contact", "OK"); } }