From 1867e56739fc23591291cc1b0b23f27415f49160 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Sun, 22 May 2016 05:51:00 +0100 Subject: [PATCH] misc --- .../Exception/ExceptionFormatter.cs | 3 ++- Wox/ViewModel/SettingWindowViewModel.cs | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Wox.Infrastructure/Exception/ExceptionFormatter.cs b/Wox.Infrastructure/Exception/ExceptionFormatter.cs index 5c472b5fc9..31f548ae8d 100644 --- a/Wox.Infrastructure/Exception/ExceptionFormatter.cs +++ b/Wox.Infrastructure/Exception/ExceptionFormatter.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Xml; @@ -63,7 +64,7 @@ namespace Wox.Infrastructure.Exception sb.Append("* Command Line: "); sb.AppendLine(Environment.CommandLine); sb.Append("* Timestamp: "); - sb.AppendLine(XmlConvert.ToString(DateTime.Now)); + sb.AppendLine(DateTime.Now.ToString(CultureInfo.InvariantCulture)); sb.Append("* IntPtr Length: "); sb.AppendLine(IntPtr.Size.ToString()); sb.Append("* System Version: "); diff --git a/Wox/ViewModel/SettingWindowViewModel.cs b/Wox/ViewModel/SettingWindowViewModel.cs index cc0c6ae609..cd1a21f0af 100644 --- a/Wox/ViewModel/SettingWindowViewModel.cs +++ b/Wox/ViewModel/SettingWindowViewModel.cs @@ -21,12 +21,11 @@ namespace Wox.ViewModel private readonly JsonStrorage _storage; private readonly Dictionary _featureControls = new Dictionary(); + public Tab SelectedTab { get; set; } = Tab.General; public List Languages => InternationalizationManager.Instance.LoadAvailableLanguages(); public IEnumerable MaxResultsRange => Enumerable.Range(2, 16); - public Tab SelectedTab { get; set; } = Tab.General; public PluginViewModel SelectedPlugin { get; set; } - - public IList MetadataViewModels + public IList PluginViewModels { get { @@ -56,12 +55,6 @@ namespace Wox.ViewModel } } - public SettingWindowViewModel() - { - _storage = new JsonStrorage(); - Settings = _storage.Load(); - } - public Control SettingProvider { get @@ -100,6 +93,14 @@ namespace Wox.ViewModel } } + public SettingWindowViewModel() + { + _storage = new JsonStrorage(); + Settings = _storage.Load(); + } + + + public void Save() {