mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
Migrate files from Wox to PowerLauncher (#5014)
* Moved all files from Wox to Powerlauncher * Removed Wox project * Changed namespace for imported files * Resolved errors for VM * Added build dependency order * Fixed errors in helper class * Remove Wox files * Fixed errors in SingleInstance class * Fixed wox.tests * Fixed MSI * Removed obsolete methods from PublicAPI * nit fixes * Throw null exception * Fix merge conflict
This commit is contained in:
committed by
GitHub
parent
177546bab6
commit
c85cd4ac24
@@ -0,0 +1,45 @@
|
||||
using System.Globalization;
|
||||
using Wox.Core.Resource;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Infrastructure.UserSettings;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace PowerLauncher.ViewModel
|
||||
{
|
||||
public class SettingWindowViewModel : BaseModel
|
||||
{
|
||||
private readonly WoxJsonStorage<Settings> _storage;
|
||||
|
||||
public SettingWindowViewModel()
|
||||
{
|
||||
_storage = new WoxJsonStorage<Settings>();
|
||||
Settings = _storage.Load();
|
||||
Settings.PropertyChanged += (s, e) =>
|
||||
{
|
||||
if (e.PropertyName == nameof(Settings.ActivateTimes))
|
||||
{
|
||||
OnPropertyChanged(nameof(ActivatedTimes));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_storage.Save();
|
||||
}
|
||||
|
||||
#region general
|
||||
|
||||
private static Internationalization _translater => InternationalizationManager.Instance;
|
||||
|
||||
#endregion
|
||||
|
||||
#region about
|
||||
|
||||
public string ActivatedTimes => string.Format(CultureInfo.InvariantCulture, _translater.GetTranslation("about_activate_times"), Settings.ActivateTimes);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user