private async void ToolbarItem_Clicked(object sender, EventArgs e) { bool result = viewModel.GetStations(); if (result) { await DisplayAlert("Success", "Alarms have been updated", "OK"); } else { await DisplayAlert("Failure", "An error occured. Please check IP is correct within Settings.", "OK"); } }
public StationView(SystemInterface systemInterface) { InitializeComponent(); listStations.ItemTapped += OnTapEventAsync; viewModel = new StationViewModel(systemInterface); viewModel.GetStations(); BindingContext = viewModel; _systemInterface = systemInterface; }