This commit is contained in:
bao-qian 2016-05-22 05:51:00 +01:00
parent 826a69c531
commit 1867e56739
2 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
@ -63,7 +64,7 @@ namespace Wox.Infrastructure.Exception
sb.Append("* Command Line: "); sb.Append("* Command Line: ");
sb.AppendLine(Environment.CommandLine); sb.AppendLine(Environment.CommandLine);
sb.Append("* Timestamp: "); sb.Append("* Timestamp: ");
sb.AppendLine(XmlConvert.ToString(DateTime.Now)); sb.AppendLine(DateTime.Now.ToString(CultureInfo.InvariantCulture));
sb.Append("* IntPtr Length: "); sb.Append("* IntPtr Length: ");
sb.AppendLine(IntPtr.Size.ToString()); sb.AppendLine(IntPtr.Size.ToString());
sb.Append("* System Version: "); sb.Append("* System Version: ");

View File

@ -21,12 +21,11 @@ namespace Wox.ViewModel
private readonly JsonStrorage<Settings> _storage; private readonly JsonStrorage<Settings> _storage;
private readonly Dictionary<ISettingProvider, Control> _featureControls = new Dictionary<ISettingProvider, Control>(); private readonly Dictionary<ISettingProvider, Control> _featureControls = new Dictionary<ISettingProvider, Control>();
public Tab SelectedTab { get; set; } = Tab.General;
public List<Language> Languages => InternationalizationManager.Instance.LoadAvailableLanguages(); public List<Language> Languages => InternationalizationManager.Instance.LoadAvailableLanguages();
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16); public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
public Tab SelectedTab { get; set; } = Tab.General;
public PluginViewModel SelectedPlugin { get; set; } public PluginViewModel SelectedPlugin { get; set; }
public IList<PluginViewModel> PluginViewModels
public IList<PluginViewModel> MetadataViewModels
{ {
get get
{ {
@ -56,12 +55,6 @@ namespace Wox.ViewModel
} }
} }
public SettingWindowViewModel()
{
_storage = new JsonStrorage<Settings>();
Settings = _storage.Load();
}
public Control SettingProvider public Control SettingProvider
{ {
get get
@ -100,6 +93,14 @@ namespace Wox.ViewModel
} }
} }
public SettingWindowViewModel()
{
_storage = new JsonStrorage<Settings>();
Settings = _storage.Load();
}
public void Save() public void Save()
{ {