Archived
1
0

Optimizing, debugging, decorating

This commit is contained in:
Michael Gordeev
2019-02-08 12:50:43 +03:00
parent 9548be15f3
commit cc49cf9966
34 changed files with 681 additions and 730 deletions
+7 -7
View File
@@ -7,6 +7,7 @@ using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;
using YoutubeExplode.Models.MediaStreams;
using System;
using Windows.Globalization;
namespace FoxTube.Pages.SettingsPages
{
@@ -80,7 +81,7 @@ namespace FoxTube.Pages.SettingsPages
{
if (SettingsStorage.Language == (language.SelectedItem as ComboBoxItem).Tag.ToString())
return;
ApplicationLanguages.PrimaryLanguageOverride = (language.SelectedItem as ComboBoxItem).Tag.ToString();
SettingsStorage.Language = (language.SelectedItem as ComboBoxItem).Tag.ToString();
restartNote.Visibility = Visibility.Visible;
}
@@ -125,21 +126,20 @@ namespace FoxTube.Pages.SettingsPages
if (sender == light && SettingsStorage.Theme != 0)
{
SettingsStorage.Theme = 0;
Methods.MainPage.RequestedTheme = ElementTheme.Light;
Application.Current.RequestedTheme = ApplicationTheme.Light;
}
else if (sender == dark && SettingsStorage.Theme != 1)
{
SettingsStorage.Theme = 1;
Methods.MainPage.RequestedTheme = ElementTheme.Dark;
Application.Current.RequestedTheme = ApplicationTheme.Dark;
}
else if (sender == system && SettingsStorage.Theme != 2)
{
SettingsStorage.Theme = 2;
Color uiTheme = new Windows.UI.ViewManagement.UISettings().GetColorValue(Windows.UI.ViewManagement.UIColorType.Background);
if (uiTheme == Colors.Black)
Methods.MainPage.RequestedTheme = ElementTheme.Dark;
if (new Windows.UI.ViewManagement.UISettings().GetColorValue(Windows.UI.ViewManagement.UIColorType.Background) == Colors.Black)
Application.Current.RequestedTheme = ApplicationTheme.Dark;
else
Methods.MainPage.RequestedTheme = ElementTheme.Light;
Application.Current.RequestedTheme = ApplicationTheme.Light;
}
Methods.MainPage.SetTitleBar();
}