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
2 changes: 1 addition & 1 deletion src/MAUI/Maui.Samples/Helpers/ArcGISLoginPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static async Task<bool> EnsureAGOLCredentialAsync()
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert("Login failed", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Login failed", ex.Message, "OK");
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/MAUI/Maui.Samples/Helpers/FeedbackPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal static class FeedbackPrompt

public async static Task ShowFeedbackPromptAsync()
{
await Application.Current.Windows[0].Page.DisplayActionSheet("Open an issue on GitHub:", "Cancel", null, [BugReport, FeatureRequest]).ContinueWith((result) =>
await Application.Current.Windows[0].Page.DisplayActionSheetAsync("Open an issue on GitHub:", "Cancel", null, [BugReport, FeatureRequest]).ContinueWith((result) =>
{
switch (result.Result)
{
Expand Down
4 changes: 2 additions & 2 deletions src/MAUI/Maui.Samples/Helpers/SampleLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static async Task LoadSample(SampleInfo sampleInfo)
if (sampleInfo.OfflineDataItems != null && !await DataManager.HasSampleDataPresent(sampleInfo))
{
// Ask the user for permission before downloading.
bool download = await Application.Current.Windows[0].Page.DisplayAlert(
bool download = await Application.Current.Windows[0].Page.DisplayAlertAsync(
"Download Required",
"This sample requires data to be downloaded. Would you like to download it now?",
"Download", "Cancel");
Expand Down Expand Up @@ -91,7 +91,7 @@ await DataManager.EnsureSampleDataPresent(sampleInfo, cancellationSource.Token,
await Shell.Current.Navigation.PopModalAsync(false);
}

await Application.Current.Windows[0].Page.DisplayAlert("", "Download cancelled", "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("", "Download cancelled", "OK");
}
catch (Exception ex)
{
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 Application.Current.Windows[0].Page.DisplayAlert("Error", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error", ex.Message, "OK");
}
}

Expand Down Expand Up @@ -127,7 +127,7 @@ private async void OnCategorizeClicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert("Error creating geomorphic category field", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error creating geomorphic category field", ex.Message, "OK");
CategorizeButton.IsEnabled = true;
CategorizeButton.Text = "Categorize";
return;
Expand All @@ -149,7 +149,7 @@ private async void OnCategorizeClicked(object sender, EventArgs e)

if (exportedFiles.Count == 0 || !File.Exists(exportedFiles[0]))
{
await Application.Current.Windows[0].Page.DisplayAlert("Export Error", "Exported geomorphic categorization file does not exist.", "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Export Error", "Exported geomorphic categorization file does not exist.", "OK");
CategorizeButton.IsEnabled = true;
CategorizeButton.Text = "Categorize";
return;
Expand All @@ -166,7 +166,7 @@ private async void OnCategorizeClicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert("Error exporting geomorphic categorization", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error exporting geomorphic categorization", ex.Message, "OK");
CategorizeButton.IsEnabled = true;
CategorizeButton.Text = "Categorize";
}
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 Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("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 Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error", ex.ToString(), "OK");
}
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private async Task Initialize()
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert("Error initializing viewshed", ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error initializing viewshed", ex.Message, "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 Application.Current.Windows[0].Page.DisplayAlert("Error", e.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error", e.Message, "OK");
}
}

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

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

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

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

Expand Down Expand Up @@ -345,7 +345,7 @@ private async Task SaveFeature()
}
else
{
await Application.Current.Windows[0].Page.DisplayAlert("Error", $"Error saving feature. {numberOfViolations} violation(s) in field group(s) {string.Join(", ", fieldGroupNames)}.", "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("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 @@ -75,7 +75,7 @@ private async Task Initialize()
}
catch (Exception e)
{
await Application.Current.Windows[0].Page.DisplayAlert("Error", e.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error", e.ToString(), "OK");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
WidthRequest="{OnIdiom Default=-1,
Desktop=450}">
<Grid RowDefinitions="*,auto">
<ListView x:Name="FeatureListView" Grid.Row="0">
<ListView.Header>
<CollectionView x:Name="FeatureListView"
Grid.Row="0"
SelectionMode="None">
<CollectionView.Header>
<Grid ColumnDefinitions="*,*">
<Label Grid.Column="0"
FontAttributes="Bold"
Expand All @@ -50,24 +52,22 @@
HorizontalTextAlignment="Center"
Text="Collection Timestamp" />
</Grid>
</ListView.Header>
<ListView.ItemTemplate>
</CollectionView.Header>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="esri:Feature">
<ViewCell>
<Grid ColumnDefinitions="*,*">
<Label Grid.Column="0"
HorizontalOptions="Fill"
HorizontalTextAlignment="Center"
Text="{Binding Path=Attributes[oid]}" />
<Label Grid.Column="1"
HorizontalOptions="Fill"
HorizontalTextAlignment="Center"
Text="{Binding Path=Attributes[collection_timestamp]}" />
</Grid>
</ViewCell>
<Grid ColumnDefinitions="*,*">
<Label Grid.Column="0"
HorizontalOptions="Fill"
HorizontalTextAlignment="Center"
Text="{Binding Path=Attributes[oid]}" />
<Label Grid.Column="1"
HorizontalOptions="Fill"
HorizontalTextAlignment="Center"
Text="{Binding Path=Attributes[collection_timestamp]}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</CollectionView.ItemTemplate>
</CollectionView>
<Button Grid.Row="1"
Margin="5"
Clicked="CloseTable"
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 Application.Current.Windows[0].Page.DisplayAlert(ex.GetType().Name, ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync(ex.GetType().Name, ex.Message, "OK");
}
}

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

Expand Down Expand Up @@ -178,7 +178,7 @@ private void CloseGeodatabaseClick(object sender, EventArgs e)
}
catch (Exception ex)
{
DisplayAlert(ex.GetType().Name, ex.Message, "OK");
DisplayAlertAsync(ex.GetType().Name, ex.Message, "OK");
}
}

Expand All @@ -195,7 +195,7 @@ await Share.RequestAsync(new ShareFileRequest
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert(ex.GetType().Name, ex.Message, "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync(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 Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Error", ex.ToString(), "OK");
}
}

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

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

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

Expand Down Expand Up @@ -438,7 +438,7 @@ private void HandleSyncCompleted(SyncGeodatabaseJob job)
// Tell the user about job completion.
if (job.Status == JobStatus.Succeeded)
{
DisplayAlert("Alert", "Geodatabase synchronization succeeded.", "OK");
DisplayAlertAsync("Alert", "Geodatabase synchronization succeeded.", "OK");
}
// See if the job failed.
else if (job.Status == JobStatus.Failed)
Expand All @@ -462,7 +462,7 @@ private void HandleSyncCompleted(SyncGeodatabaseJob job)
}

// Show the message.
DisplayAlert("Error", message, "OK");
DisplayAlertAsync("Error", message, "OK");
}
}

Expand All @@ -481,7 +481,7 @@ private async void GenerateButton_Clicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await Application.Current.Windows[0].Page.DisplayAlert("Error", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("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 Application.Current.Windows[0].Page.DisplayAlert("Alert", ex.ToString(), "OK");
await Application.Current.Windows[0].Page.DisplayAlertAsync("Alert", ex.ToString(), "OK");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private bool VersionNameValid(string versionName)

private void ShowAlert(string alertText, string titleText = "Alert")
{
Application.Current.Windows[0].Page.DisplayAlert(titleText, alertText, "OK");
Application.Current.Windows[0].Page.DisplayAlertAsync(titleText, alertText, "OK");
}

private async void MyMapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.Maui.GeoViewInputEventArgs e)
Expand Down
Loading
Loading