mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
Misc
This commit is contained in:
@@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: AssemblyVersion("1.2.0.*")]
|
[assembly: AssemblyVersion("1.2.0")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0.*")]
|
[assembly: AssemblyFileVersion("1.2.0.0")]
|
||||||
[assembly: AssemblyInformationalVersion("1.2.0.*")]
|
[assembly: AssemblyInformationalVersion("1.2.0")]
|
||||||
@@ -12,7 +12,7 @@ namespace Wox.Infrastructure.Logger
|
|||||||
static Log()
|
static Log()
|
||||||
{
|
{
|
||||||
var directoryName = "Logs";
|
var directoryName = "Logs";
|
||||||
var path = Path.Combine(Wox.DataPath, directoryName);
|
var path = Path.Combine(Wox.DataPath, directoryName, Wox.Version);
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(path);
|
Directory.CreateDirectory(path);
|
||||||
@@ -21,7 +21,7 @@ namespace Wox.Infrastructure.Logger
|
|||||||
var configuration = new LoggingConfiguration();
|
var configuration = new LoggingConfiguration();
|
||||||
var target = new FileTarget();
|
var target = new FileTarget();
|
||||||
configuration.AddTarget("file", target);
|
configuration.AddTarget("file", target);
|
||||||
target.FileName = "${specialfolder:folder=ApplicationData}/" + Wox.Name + "/" + directoryName + "/${shortdate}.log";
|
target.FileName = "${specialfolder:folder=ApplicationData}/" + Wox.Name + "/" + directoryName + "/" + Wox.Version + "/${shortdate}.log";
|
||||||
var rule = new LoggingRule("*", LogLevel.Info, target);
|
var rule = new LoggingRule("*", LogLevel.Info, target);
|
||||||
configuration.LoggingRules.Add(rule);
|
configuration.LoggingRules.Add(rule);
|
||||||
LogManager.Configuration = configuration;
|
LogManager.Configuration = configuration;
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ namespace Wox
|
|||||||
|
|
||||||
private void OnActivated(object sender, EventArgs e)
|
private void OnActivated(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// todo happlebao add option in gui
|
|
||||||
if (_settings.AutoUpdates)
|
if (_settings.AutoUpdates)
|
||||||
{
|
{
|
||||||
Updater.UpdateApp();
|
Updater.UpdateApp();
|
||||||
@@ -109,7 +108,7 @@ namespace Wox
|
|||||||
// but if sessionending is not called, exit won't be called when log off / shutdown
|
// but if sessionending is not called, exit won't be called when log off / shutdown
|
||||||
if (!_disposed)
|
if (!_disposed)
|
||||||
{
|
{
|
||||||
((MainViewModel)Current.MainWindow?.DataContext)?.Save();
|
Current.Dispatcher.Invoke(() => ((MainViewModel) Current.MainWindow?.DataContext)?.Save());
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user