Let user disable auto-updates

This commit is contained in:
Alexey Golub
2018-02-25 18:22:55 +02:00
parent 4540134a98
commit 9988300942
6 changed files with 37 additions and 1 deletions

View File

@@ -2,6 +2,8 @@
{
public interface ISettingsViewModel
{
bool IsAutoUpdateEnabled { get; set; }
string DateFormat { get; set; }
int MessageGroupLimit { get; set; }
}

View File

@@ -8,6 +8,12 @@ namespace DiscordChatExporter.Gui.ViewModels
{
private readonly ISettingsService _settingsService;
public bool IsAutoUpdateEnabled
{
get => _settingsService.IsAutoUpdateEnabled;
set => _settingsService.IsAutoUpdateEnabled = value;
}
public string DateFormat
{
get => _settingsService.DateFormat;

View File

@@ -21,6 +21,23 @@ UserControl "DiscordChatExporter.Gui.Views.SettingsDialog" {
Text: bind MessageGroupLimit
}
// Auto-update
DockPanel {
LastChildFill: false
TextBlock {
Margin: [16, 8, 16, 8]
DockPanel.Dock: Left
Text: "Auto-updates"
}
ToggleButton {
Margin: [16, 8, 16, 8]
DockPanel.Dock: Right
IsChecked: bind IsAutoUpdateEnabled
}
}
// Save
Button {
Margin: 8