mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-26 19:23:48 +00:00
Add command line interface and change solution structure (#26)
This commit is contained in:
28
DiscordChatExporter.Gui/ViewModels/SettingsViewModel.cs
Normal file
28
DiscordChatExporter.Gui/ViewModels/SettingsViewModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using DiscordChatExporter.Core.Services;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Gui.ViewModels
|
||||
{
|
||||
public class SettingsViewModel : ViewModelBase, ISettingsViewModel
|
||||
{
|
||||
private readonly ISettingsService _settingsService;
|
||||
|
||||
public string DateFormat
|
||||
{
|
||||
get => _settingsService.DateFormat;
|
||||
set => _settingsService.DateFormat = value;
|
||||
}
|
||||
|
||||
public int MessageGroupLimit
|
||||
{
|
||||
get => _settingsService.MessageGroupLimit;
|
||||
set => _settingsService.MessageGroupLimit = value.ClampMin(0);
|
||||
}
|
||||
|
||||
public SettingsViewModel(ISettingsService settingsService)
|
||||
{
|
||||
_settingsService = settingsService;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user