From 4cb9bdd8cbdc6c2c1f25d01a4d431eac74b1599b Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 22 Oct 2018 21:24:26 +0300 Subject: [PATCH] Notification center has been cut off --- FoxTube/Controls/NotificationsCenter.xaml | 23 ----- FoxTube/Controls/NotificationsCenter.xaml.cs | 93 -------------------- FoxTube/FoxTube.csproj | 7 -- FoxTube/Pages/MainPage.xaml | 87 ++++++------------ FoxTube/Pages/MainPage.xaml.cs | 34 +++---- 5 files changed, 39 insertions(+), 205 deletions(-) delete mode 100644 FoxTube/Controls/NotificationsCenter.xaml delete mode 100644 FoxTube/Controls/NotificationsCenter.xaml.cs diff --git a/FoxTube/Controls/NotificationsCenter.xaml b/FoxTube/Controls/NotificationsCenter.xaml deleted file mode 100644 index d8261ed..0000000 --- a/FoxTube/Controls/NotificationsCenter.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - + + @@ -70,47 +80,6 @@ - - - - - - - - - - - - - - - - - diff --git a/FoxTube/Pages/MainPage.xaml.cs b/FoxTube/Pages/MainPage.xaml.cs index c65796a..1717536 100644 --- a/FoxTube/Pages/MainPage.xaml.cs +++ b/FoxTube/Pages/MainPage.xaml.cs @@ -40,8 +40,7 @@ namespace FoxTube public DownloadAgent Agent = new DownloadAgent(); ApplicationDataContainer settings = ApplicationData.Current.LocalSettings; - - NotificationsCenter notificationsCenter = new NotificationsCenter(); + Sender s = Sender.None; public MainPage() { @@ -111,7 +110,6 @@ namespace FoxTube } catch { } } - notificationsCenter.Initialize(); SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged; SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged; @@ -191,8 +189,8 @@ namespace FoxTube { Userinfoplus info = await new Oauth2Service(SecretsVault.Initializer).Userinfo.Get().ExecuteAsync(); - ToolTipService.SetToolTip(avatar, new ToolTip() { Content = info.Name }); - (avatar.Content as PersonPicture).ProfilePicture = new BitmapImage(new Uri(info.Picture)); + myName.Text = info.Name; + ((avatar.Content as StackPanel).Children[0] as PersonPicture).ProfilePicture = new BitmapImage(new Uri(info.Picture)); } catch { } avatar.Visibility = Visibility.Visible; @@ -256,16 +254,6 @@ namespace FoxTube GoToVideo((videoPlaceholder.Content as VideoPage).videoId); } - public void GotNotification() - { - notificationMenu.Content = "\xED0C"; - } - - public void notificationMenu_Click(object sender, RoutedEventArgs e) - { - notificationMenu.Content = "\xED0D"; - } - private async void feedback_Click(object sender, RoutedEventArgs e) { await Launcher.LaunchUriAsync(new Uri("feedback-hub:")); @@ -502,14 +490,14 @@ namespace FoxTube { Dictionary switchCase = new Dictionary() { - { typeof(Settings), () => header.Text = "Settings" }, - { typeof(ChannelPage), () => header.Text = "Channel" }, - { typeof(PlaylistPage), () => header.Text = "Playlist" }, - { typeof(Search), () => header.Text = "Search" }, - { typeof(Subscriptions), () => header.Text = "Subscriptions" }, - { typeof(History), () => header.Text = "History" }, - { typeof(Home), () => header.Text = "Home" }, - { typeof(Downloads), () => header.Text = "Downloads" } + { typeof(Settings), () => nav.Header = "Settings" }, + { typeof(ChannelPage), () => nav.Header = "Channel" }, + { typeof(PlaylistPage), () => nav.Header = "Playlist" }, + { typeof(Search), () => nav.Header = "Search" }, + { typeof(Subscriptions), () => nav.Header = "Subscriptions" }, + { typeof(History), () => nav.Header = "History" }, + { typeof(Home), () => nav.Header = "Home" }, + { typeof(Downloads), () => nav.Header = "Downloads" } }; try { switchCase[e.SourcePageType](); }