diff --git a/PokemonGo-UWP/App.xaml b/PokemonGo-UWP/App.xaml
index 7a2fe5464..3fdf6445d 100644
--- a/PokemonGo-UWP/App.xaml
+++ b/PokemonGo-UWP/App.xaml
@@ -93,10 +93,15 @@
-
+
+
+
+
+
+
+
-
diff --git a/PokemonGo-UWP/App.xaml.cs b/PokemonGo-UWP/App.xaml.cs
index 54fdf40f2..7dd1d9cb1 100644
--- a/PokemonGo-UWP/App.xaml.cs
+++ b/PokemonGo-UWP/App.xaml.cs
@@ -176,10 +176,10 @@ private void CatchablePokemons_CollectionChanged(object sender, NotifyCollection
///
///
public override Task OnSuspendingAsync(object s, SuspendingEventArgs e, bool prelaunchActivated)
- {
+ {
GameClient.PokemonsInventory.CollectionChanged -= PokemonsInventory_CollectionChanged;
GameClient.CatchablePokemons.CollectionChanged -= CatchablePokemons_CollectionChanged;
- NetworkInformation.NetworkStatusChanged -= NetworkInformationOnNetworkStatusChanged;
+ NetworkInformation.NetworkStatusChanged -= NetworkInformationOnNetworkStatusChanged;
if (SettingsService.Instance.IsBatterySaverEnabled)
_proximityHelper.EnableDisplayAutoOff(false);
@@ -207,7 +207,7 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)
#if DEBUG
// Init logger
Logger.SetLogger(new ConsoleLogger(LogLevel.Info));
-#endif
+#endif
// If we have a phone contract, hide the status bar
if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
@@ -218,7 +218,7 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)
// Enter into full screen mode
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
- ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Standard;
+ ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Standard;
// Forces the display to stay on while we play
//_displayRequest.RequestActive();
@@ -247,10 +247,10 @@ public override async Task OnInitializeAsync(IActivatedEventArgs args)
// Respond to changes in inventory and Pokemon in the immediate viscinity.
GameClient.PokemonsInventory.CollectionChanged += PokemonsInventory_CollectionChanged;
- GameClient.CatchablePokemons.CollectionChanged += CatchablePokemons_CollectionChanged;
+ GameClient.CatchablePokemons.CollectionChanged += CatchablePokemons_CollectionChanged;
await Task.CompletedTask;
- }
+ }
///
///
@@ -351,7 +351,7 @@ private void WindowOnVisibilityChanged(object sender, VisibilityChangedEventArgs
#region Helpers
///
- ///
+ ///
///
///
///
diff --git a/PokemonGo-UWP/Assets/Icons/crown.png b/PokemonGo-UWP/Assets/Icons/crown.png
deleted file mode 100644
index da84a155e..000000000
Binary files a/PokemonGo-UWP/Assets/Icons/crown.png and /dev/null differ
diff --git a/PokemonGo-UWP/Assets/Icons/indicator_crown.png b/PokemonGo-UWP/Assets/Icons/indicator_crown.png
new file mode 100644
index 000000000..c30fc565c
Binary files /dev/null and b/PokemonGo-UWP/Assets/Icons/indicator_crown.png differ
diff --git a/PokemonGo-UWP/Assets/Icons/indicator_empty.png b/PokemonGo-UWP/Assets/Icons/indicator_empty.png
new file mode 100644
index 000000000..bcc56379a
Binary files /dev/null and b/PokemonGo-UWP/Assets/Icons/indicator_empty.png differ
diff --git a/PokemonGo-UWP/Assets/Icons/indicator_normal.png b/PokemonGo-UWP/Assets/Icons/indicator_normal.png
new file mode 100644
index 000000000..8198b8142
Binary files /dev/null and b/PokemonGo-UWP/Assets/Icons/indicator_normal.png differ
diff --git a/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml b/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml
new file mode 100644
index 000000000..9173bfb31
--- /dev/null
+++ b/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml.cs b/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml.cs
new file mode 100644
index 000000000..f0ab93dee
--- /dev/null
+++ b/PokemonGo-UWP/Controls/MessageDialog/PoGoTeamSelectDialog.xaml.cs
@@ -0,0 +1,251 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Template10.Common;
+using Template10.Controls;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI;
+using Windows.UI.ViewManagement;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Automation.Peers;
+using Windows.UI.Xaml.Automation.Provider;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Markup;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Media.Animation;
+using Windows.UI.Xaml.Navigation;
+
+
+namespace PokemonGo_UWP.Controls
+{
+ public enum PoGoTeamSelectionDialogAnimation
+ {
+ None,
+ Bottom,
+ Fade
+ }
+
+ public sealed partial class PoGoTeamSelectionDialog : UserControl
+ {
+ public PoGoTeamSelectionDialog()
+ {
+ this.InitializeComponent();
+
+ YellowButton.Click += TerminalButtonClick;
+ BlueButton.Click += TerminalButtonClick;
+ RedButton.Click += TerminalButtonClick;
+ CancelButton.Click += TerminalButtonClick;
+ }
+
+ public void Show()
+ {
+ WindowWrapper.Current().Dispatcher.Dispatch(() =>
+ {
+ var modal = Window.Current.Content as ModalDialog;
+ if (modal == null)
+ {
+ return;
+ }
+
+ _formerModalBrush = modal.ModalBackground;
+ modal.ModalBackground = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
+ modal.ModalContent = this;
+ modal.IsModal = true;
+
+ // Subscribe to keyboard events
+ InputPane.GetForCurrentView().Showing += OnKeyboardShowing;
+ InputPane.GetForCurrentView().Hiding += OnKeyboardHiding;
+
+ // Start the animation
+ if (AnimationType == PoGoMessageDialogAnimation.Bottom)
+ {
+ // preconditions
+ double Ytranslation = (modal.ActualHeight / 2) + 300;
+ DownwardsTranslationRange = Ytranslation;
+ DownwardsTranslation.Y = Ytranslation;
+
+ // animate
+ Storyboard sb = this.Resources["ShowMDBottomStoryboard"] as Storyboard;
+ sb.Begin();
+ sb.Completed += AppearCompleted;
+ }
+ else if (AnimationType == PoGoMessageDialogAnimation.Fade)
+ {
+ // animate
+ Storyboard sb = this.Resources["ShowMDFadeStoryboard"] as Storyboard;
+ sb.Begin();
+ sb.Completed += AppearCompleted;
+ }
+ });
+ }
+
+ #region Propertys
+
+ // Internal
+ private bool _keyboardVisible = false;
+ private Brush _formerModalBrush = null;
+
+ public static readonly DependencyProperty DownwardsTranslationRangeProperty =
+ DependencyProperty.Register(nameof(DownwardsTranslationRange), typeof(Double?), typeof(PoGoMessageDialog),
+ new PropertyMetadata(0.0));
+
+ public Double? DownwardsTranslationRange
+ {
+ get { return (Double?)GetValue(DownwardsTranslationRangeProperty); }
+ set { SetValue(DownwardsTranslationRangeProperty, value); }
+ }
+
+ // Public
+
+ public static readonly DependencyProperty DialogContentProperty =
+ DependencyProperty.Register(nameof(DialogContent), typeof(Object), typeof(PoGoMessageDialog),
+ new PropertyMetadata(null));
+
+ public static readonly DependencyProperty CoverBackgroundProperty =
+ DependencyProperty.Register(nameof(CoverBackground), typeof(bool), typeof(PoGoMessageDialog), new PropertyMetadata(false));
+
+ public Object DialogContent
+ {
+ get { return (Object)GetValue(DialogContentProperty); }
+ set { SetValue(DialogContentProperty, value); }
+ }
+
+ public bool CoverBackground
+ {
+ get { return (bool)GetValue(CoverBackgroundProperty); }
+ set {
+ if(value)
+ {
+ CoverGrid.Background = new SolidColorBrush((Color)XamlBindingHelper.ConvertValue(typeof(Windows.UI.Color), "#55000000"));
+ } else
+ {
+ CoverGrid.Background = new SolidColorBrush((Color)XamlBindingHelper.ConvertValue(typeof(Windows.UI.Color), "Transparent"));
+ }
+ SetValue(CoverBackgroundProperty, value);
+ }
+ }
+
+ private bool _backgroundTapInvokesCancel;
+ public bool BackgroundTapInvokesCancel
+ {
+ get { return _backgroundTapInvokesCancel; }
+ set { _backgroundTapInvokesCancel = value; }
+ }
+
+ public PoGoMessageDialogAnimation AnimationType { get; set; }
+
+ #endregion
+
+ #region Events
+
+ public event RoutedEventHandler YellowInvoked
+ {
+ add { YellowButton.Click += value; }
+ remove { YellowButton.Click -= value; }
+ }
+
+ public event RoutedEventHandler BlueInvoked
+ {
+ add { BlueButton.Click += value; }
+ remove { BlueButton.Click -= value; }
+ }
+
+ public event RoutedEventHandler RedInvoked
+ {
+ add { RedButton.Click += value; }
+ remove { RedButton.Click -= value; }
+ }
+
+ public event RoutedEventHandler CancelInvoked
+ {
+ add { CancelButton.Click += value; }
+ remove { CancelButton.Click -= value; }
+ }
+
+ public event EventHandler