Archived
1
0

Development 128

This commit is contained in:
Michael Gordeev
2018-09-05 20:05:28 +03:00
parent 866b4ef373
commit 9c9b56a669
10 changed files with 275 additions and 158 deletions
+2 -2
View File
@@ -37,8 +37,8 @@
<ComboBoxItem Content="240p"/>
<ComboBoxItem Content="144p"/>
</ComboBox>
<ToggleSwitch x:Uid="/General/metered" OnContent="Notify when playing on metered connection" OffContent="Notify when playing on metered connection" Name="mobileWarning" Toggled="notification_IsEnabledChanged"/>
<ToggleSwitch x:Uid="/General/autoplay" OnContent="Play videos automatically" OffContent="Play videos automatically" Name="autoplay" Toggled="notification_IsEnabledChanged"/>
<ToggleSwitch x:Uid="/General/metered" OnContent="Notify when playing on metered connection" OffContent="Notify when playing on metered connection" Name="mobileWarning" Toggled="mobileWarning_Toggled"/>
<ToggleSwitch x:Uid="/General/autoplay" OnContent="Play videos automatically" OffContent="Play videos automatically" Name="autoplay" Toggled="autoplay_Toggled"/>
<TextBlock x:Uid="/General/notifications" Text="Notifications" FontSize="22"/>
<ToggleSwitch x:Uid="/General/newVideo" Name="newVideo" OnContent="Notify when someone of your subscriptions uploaded new video" OffContent="Notify when someone of your subscriptions uploaded new video" Toggled="notification_IsEnabledChanged"/>
+11 -2
View File
@@ -79,11 +79,20 @@ namespace FoxTube.Pages.SettingsPages
settings.Values["quality"] = quality.SelectedIndex;
}
private void mobileWarning_Toggled(object sender, RoutedEventArgs e)
{
settings.Values["moblieWarning"] = mobileWarning.IsOn;
}
private void autoplay_Toggled(object sender, RoutedEventArgs e)
{
settings.Values["videoAutoplay"] = autoplay.IsOn;
}
private void notification_IsEnabledChanged(object sender, RoutedEventArgs e)
{
settings.Values["newVideoNotification"] = newVideo.IsOn;
settings.Values["moblieWarning"] = mobileWarning.IsOn;
settings.Values["videoAutoplay"] = autoplay.IsOn;
}
private void region_SelectionChanged(object sender, SelectionChangedEventArgs e)