PowerToys/Wox/ViewModel/SettingWindowViewModel.cs

39 lines
1.0 KiB
C#
Raw Normal View History

2016-05-22 05:44:27 +08:00
using System;
using System.Collections.Generic;
2016-05-22 06:16:32 +08:00
using System.IO;
2016-05-22 05:44:27 +08:00
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2016-05-22 06:16:32 +08:00
using System.Windows;
using System.Windows.Controls;
using Microsoft.Win32;
using Wox.Core.Plugin;
2016-05-22 05:44:27 +08:00
using Wox.Core.Resource;
using Wox.Core.UserSettings;
using Wox.Infrastructure.Storage;
namespace Wox.ViewModel
{
public class SettingWindowViewModel
{
2016-05-22 06:16:32 +08:00
private const string StartupPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
2016-05-22 05:44:27 +08:00
private readonly JsonStrorage<Settings> _storage;
public Settings Settings { get; set; }
public List<Language> Languages => InternationalizationManager.Instance.LoadAvailableLanguages();
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
public SettingWindowViewModel()
{
_storage = new JsonStrorage<Settings>();
Settings = _storage.Load();
}
public void Save()
{
_storage.Save();
}
2016-05-22 06:16:32 +08:00
2016-05-22 05:44:27 +08:00
}
}