Flow.Launcher/Plugins/Wox.Plugin.Calculator/ViewModels/SettingsViewModel.cs
Jeremy Wu 782c73e471 Merge in branch 'master' up to commit 24cf015
commit: 24cf015b0a9b36503efbd83c9c9ed3c64da10f18- 24cf015b0a
2020-03-31 22:00:09 +11:00

30 lines
733 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wox.Infrastructure.Storage;
using Wox.Infrastructure.UserSettings;
namespace Wox.Plugin.Caculator.ViewModels
{
public class SettingsViewModel : BaseModel, ISavable
{
private readonly PluginJsonStorage<Settings> _storage;
public SettingsViewModel()
{
_storage = new PluginJsonStorage<Settings>();
Settings = _storage.Load();
}
public Settings Settings { get; set; }
public IEnumerable<int> MaxDecimalPlacesRange => Enumerable.Range(1, 20);
public void Save()
{
_storage.Save();
}
}
}