Skip to content

Commit

Permalink
[Automated] Sync v.next with main (#1532)
Browse files Browse the repository at this point in the history
Co-authored-by: William Bohrmann <[email protected]>
  • Loading branch information
arcgis-maps-sdk-bot and williambohrmann3 authored Nov 8, 2024
1 parent 56779f6 commit ed7b2e5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ public partial class AnimateImageOverlay : ContentPage, IDisposable
public AnimateImageOverlay()
{
InitializeComponent();
Initialize();
_ = Initialize();
}

private void Initialize()
private async Task Initialize()
{
// This sample is only supported in x64 on .NET MAUI.
if (!Environment.Is64BitProcess)
{
await Application.Current.MainPage.DisplayAlert("Error", "This sample is only supported for .NET MAUI in x64. Run the sample viewer in x64 to use this sample.", "Exit");
return;
}

// Create the scene.
MySceneView.Scene = new Scene(BasemapStyle.ArcGISDarkGray);

Expand Down Expand Up @@ -137,7 +144,7 @@ public void Dispose()
{
//Stop the animation when the sample is unloaded.
_animationStopped = true;
_timer.Dispose();
_timer?.Dispose();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public AnimateImageOverlay()

private void Initialize()
{
// This sample is only supported in x64 on WPF.
if (!Environment.Is64BitProcess)
{
MessageBox.Show("This sample is only supported for WPF in x64. Run the sample viewer in x64 to use this sample.");
}

// Create the scene.
MySceneView.Scene = new Scene(new Basemap(new Uri("https://www.arcgis.com/home/item.html?id=1970c1995b8f44749f4b9b6e81b5ba45")));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public AnimateImageOverlay()

private async Task Initialize()
{
// This sample is only supported in x64 on UWP.
// This sample is only supported in x64 on WinUI.
if (!Environment.Is64BitProcess)
{
await new MessageDialog2("This sample is only supported for UWP in x64. Run the sample viewer in x64 to use this sample.", "Error").ShowAsync();
await new MessageDialog2("This sample is only supported for WinUI in x64. Run the sample viewer in x64 to use this sample.", "Error").ShowAsync();
return;
}

Expand Down

0 comments on commit ed7b2e5

Please sign in to comment.