You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Seekers/Views/DashboardPage.xaml.cs

56 lines
1.4 KiB

6 months ago
using Justice.Helpers;
using Microsoft;
6 months ago
namespace Justice.Views;
public partial class DashboardPage : ContentPage
{
public DashboardPage()
{
InitializeComponent();
}
public async void OnGetLocationClicked(object sender, EventArgs e)
6 months ago
{
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");
}
6 months ago
}