-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Andy Weis <[email protected]> Co-authored-by: William Bohrmann <[email protected]> Co-authored-by: Zack Allen <[email protected]> Co-authored-by: Morten Nielsen <[email protected]> Co-authored-by: William Bohrmann <[email protected]> Co-authored-by: Preeti <[email protected]>
- Loading branch information
1 parent
85adf66
commit 4d12ac4
Showing
801 changed files
with
2,838 additions
and
908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage | ||
x:Class="ArcGIS.ApiKeyPage" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:arcgisruntime="clr-namespace:ArcGIS" | ||
Title="API Key"> | ||
<Grid> | ||
<arcgisruntime:ApiKeyView /> | ||
</Grid> | ||
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace ArcGIS; | ||
|
||
public partial class ApiKeyPage : ContentPage | ||
{ | ||
public ApiKeyPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Shell | ||
x:Class="ArcGIS.AppShell" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
Shell.TabBarIsVisible="False"> | ||
<Shell.FlyoutHeader> | ||
<Label | ||
Margin="0,5" | ||
FontAttributes="Bold" | ||
HorizontalTextAlignment="Center" | ||
Text="Categories" | ||
VerticalTextAlignment="Center" /> | ||
</Shell.FlyoutHeader> | ||
</Shell> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using ArcGIS.Samples.Managers; | ||
using ArcGIS.Samples.Shared.Managers; | ||
using ArcGIS.Samples.Shared.Models; | ||
|
||
namespace ArcGIS; | ||
|
||
public partial class AppShell : Shell | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
|
||
Initialize(); | ||
} | ||
|
||
private void Initialize() | ||
{ | ||
this.Appearing += FirstLoaded; | ||
|
||
SampleManager.Current.Initialize(); | ||
|
||
var samplesCategories = SampleManager.Current.FullTree.Items.OfType<SearchableTreeNode>().ToList(); | ||
var allSamples = SampleManager.Current.AllSamples.ToList(); | ||
|
||
List<FlyoutItem> flyoutItems = new List<FlyoutItem>(); | ||
|
||
foreach (var category in samplesCategories) | ||
{ | ||
FlyoutItem flyoutItem = new FlyoutItem(); | ||
flyoutItem.Title = category.Name; | ||
|
||
ShellContent shellContent = new ShellContent(); | ||
//shellContent.Title = category.Name; | ||
shellContent.Content = new CategoryPage(category); | ||
shellContent.Route = $"{nameof(CategoryPage)}_{category.Name}"; | ||
|
||
flyoutItem.Items.Add(shellContent); | ||
|
||
this.Items.Add(flyoutItem); | ||
} | ||
} | ||
|
||
#region Check API Key | ||
private void FirstLoaded(object sender, EventArgs e) | ||
{ | ||
this.Appearing -= FirstLoaded; | ||
|
||
_ = CheckApiKey(); | ||
} | ||
|
||
private async Task CheckApiKey() | ||
{ | ||
// Attempt to load a locally stored API key. | ||
await ApiKeyManager.TrySetLocalKey(); | ||
|
||
// Check that the current API key is valid. | ||
ApiKeyStatus status = await ApiKeyManager.CheckKeyValidity(); | ||
if (status != ApiKeyStatus.Valid) | ||
{ | ||
await Navigation.PushAsync(new ApiKeyPage(), true); | ||
} | ||
} | ||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.