Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private async Task Initialize()
}
catch (Exception e)
{
await DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private async Task Initialize()
}
catch (Exception e)
{
await DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
}
}

Expand Down Expand Up @@ -107,7 +107,7 @@ private async void StatesPicker_SelectionChanged(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand All @@ -134,7 +134,7 @@ private async void CountFeaturesButton_Click(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private async Task Initialize()
}
catch (Exception e)
{
await DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private async Task QueryAndBufferFeatures()
}
catch (Exception e)
{
await DisplayAlert("Error", e.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.Message, "OK");
}
}

Expand Down Expand Up @@ -163,7 +163,7 @@ private async Task CreateNewEmptyFeature(Esri.ArcGISRuntime.Maui.GeoViewInputEve
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down Expand Up @@ -197,7 +197,7 @@ private async Task<List<string>> GetContingentValues(string field, string fieldG
}
catch (Exception e)
{
await DisplayAlert("Error", e.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.Message, "OK");
}

return contingentValuesNamesList;
Expand Down Expand Up @@ -250,7 +250,7 @@ private async Task DiscardFeature()
}
catch (Exception e)
{
await DisplayAlert("Error", e.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.Message, "OK");
}
}

Expand All @@ -274,13 +274,13 @@ private async Task UpdateField(string field, object value)
break;

default:
await DisplayAlert("Error", $"{field} not found in any of the data dictionaries.", "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", $"{field} not found in any of the data dictionaries.", "OK");
break;
}
}
catch (Exception e)
{
await DisplayAlert("Error", e.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.Message, "OK");
}
}

Expand Down Expand Up @@ -344,7 +344,7 @@ private async Task SaveFeature()
}
else
{
await DisplayAlert("Error", $"Error saving feature. {numberOfViolations} violation(s) in field group(s) {string.Join(", ", fieldGroupNames)}.", "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", $"Error saving feature. {numberOfViolations} violation(s) in field group(s) {string.Join(", ", fieldGroupNames)}.", "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private async Task CreateGeodatabase()
}
catch (Exception ex)
{
await DisplayAlert(ex.GetType().Name, ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert(ex.GetType().Name, ex.Message, "OK");
}
}

Expand Down Expand Up @@ -131,7 +131,7 @@ private async Task AddFeature(MapPoint location)
}
catch (Exception ex)
{
await DisplayAlert(ex.GetType().Name, ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert(ex.GetType().Name, ex.Message, "OK");
}
}

Expand Down Expand Up @@ -195,7 +195,7 @@ await Share.RequestAsync(new ShareFileRequest
}
catch (Exception ex)
{
await DisplayAlert(ex.GetType().Name, ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert(ex.GetType().Name, ex.Message, "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down Expand Up @@ -227,7 +227,7 @@ private async void GeoViewTapped(object sender, GeoViewInputEventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down Expand Up @@ -373,7 +373,7 @@ private async Task HandleGenerationStatusChange(GenerateGeodatabaseJob job)
}

// Show the message.
await DisplayAlert("Error", message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", message, "OK");
}
}

Expand Down Expand Up @@ -481,7 +481,7 @@ private async void GenerateButton_Clicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down Expand Up @@ -512,7 +512,7 @@ private async void SyncButton_Click(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Alert", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Alert", ex.ToString(), "OK");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down Expand Up @@ -106,7 +106,7 @@ private async void MapView_Tapped(object sender, Esri.ArcGISRuntime.Maui.GeoView
}
catch (Exception ex)
{
await DisplayAlert("Error selecting feature", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error selecting feature", ex.ToString(), "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down Expand Up @@ -113,7 +113,7 @@ private async Task SelectFeature(Point clickedPoint)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down Expand Up @@ -170,7 +170,7 @@ private async void OkClick(object sender, System.EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand All @@ -74,7 +74,7 @@ private async void MyMapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.Mau
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down Expand Up @@ -115,7 +115,7 @@ private async void SaveButton_Clicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ private async Task QueryStateFeature(string stateName)
}
else
{
await DisplayAlert("State Not Found!", "Add a valid state name.", "OK");
await Application.Current.Windows[0].Page.DisplayAlert("State Not Found!", "Add a valid state name.", "OK");
}
}
catch (Exception)
{
await DisplayAlert("Sample error", "An error occurred", "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Sample error", "An error occurred", "OK");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down Expand Up @@ -218,7 +218,7 @@ private async Task HandleGenerationStatusChange(GenerateGeodatabaseJob job, Geod
await _gdbSyncTask.UnregisterGeodatabaseAsync(resultGdb);

// Tell the user that the geodatabase was unregistered.
await DisplayAlert("Alert", "Since no edits will be made, the local geodatabase has been unregistered per best practice.", "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Alert", "Since no edits will be made, the local geodatabase has been unregistered per best practice.", "OK");

// Re-enable generate button.
MyGenerateButton.IsEnabled = true;
Expand All @@ -241,7 +241,7 @@ private async Task HandleGenerationStatusChange(GenerateGeodatabaseJob job, Geod
message += ": " + String.Join("\n", job.Messages.Select(m => m.Message));
}

await DisplayAlert("Alert", message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Alert", message, "OK");
}
}

Expand All @@ -260,7 +260,7 @@ private async void GenerateButton_Clicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ private async void StopEditTransaction(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private async Task Initialize()
}
catch (Exception e)
{
await DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
}
}

Expand Down Expand Up @@ -132,7 +132,7 @@ private async void MyMapViewOnGeoViewTapped(object sender, GeoViewInputEventArgs
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
}
}
}
Expand Down
Loading
Loading