diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index a2c507a4ba..354c25d6c8 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -71,10 +71,9 @@ namespace PowerLauncher var window = new MainWindow(_settings, _mainVM); API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet); PluginManager.InitializePlugins(API); - Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}"); Current.MainWindow = window; - Current.MainWindow.Title = Constant.Wox; + Current.MainWindow.Title = Constant.ExeFileName; // happlebao todo temp fix for instance code logic // load plugin before change language, because plugin language also needs be changed diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml b/src/modules/launcher/PowerLauncher/MainWindow.xaml index 128771b9cb..170ab9398d 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml @@ -7,7 +7,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:xaml="clr-namespace:Microsoft.Toolkit.Wpf.UI.XamlHost;assembly=Microsoft.Toolkit.Wpf.UI.XamlHost" - Title="Wox" + Title="PowerLaunch" Topmost="True" SizeToContent="Height" ResizeMode="NoResize" diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index 9118190f0d..bf96da4dc0 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -3,24 +3,20 @@ using System.ComponentModel; using System.Windows; using System.Windows.Input; using System.Windows.Media.Animation; -using System.Windows.Controls; -using System.Windows.Forms; using Wox.Core.Plugin; using Wox.Core.Resource; using Wox.Helper; using Wox.Infrastructure.UserSettings; using Wox.ViewModel; + using Screen = System.Windows.Forms.Screen; -using ContextMenuStrip = System.Windows.Forms.ContextMenuStrip; using DataFormats = System.Windows.DataFormats; using DragEventArgs = System.Windows.DragEventArgs; using KeyEventArgs = System.Windows.Input.KeyEventArgs; using MessageBox = System.Windows.MessageBox; using Microsoft.Toolkit.Wpf.UI.XamlHost; using Windows.UI.Xaml.Controls; -using System.Diagnostics; -using Wox.Plugin; -using Windows.UI.Xaml.Input; + namespace PowerLauncher { diff --git a/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs b/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs index c1d0cc0124..0e25009cbe 100644 --- a/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/ReportWindow.xaml.cs @@ -34,7 +34,6 @@ namespace PowerLauncher StringBuilder content = new StringBuilder(); content.AppendLine(ErrorReporting.RuntimeInfo()); - content.AppendLine(ErrorReporting.DependenciesInfo()); content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}"); content.AppendLine("Exception:"); content.AppendLine(exception.ToString()); diff --git a/src/modules/launcher/Wox.Infrastructure/Exception/ExceptionFormatter.cs b/src/modules/launcher/Wox.Infrastructure/Exception/ExceptionFormatter.cs index b95cdf1c91..80c3e95d18 100644 --- a/src/modules/launcher/Wox.Infrastructure/Exception/ExceptionFormatter.cs +++ b/src/modules/launcher/Wox.Infrastructure/Exception/ExceptionFormatter.cs @@ -66,7 +66,6 @@ namespace Wox.Infrastructure.Exception sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}"); sb.AppendLine($"* IntPtr Length: {IntPtr.Size}"); sb.AppendLine($"* x64: {Environment.Is64BitOperatingSystem}"); - sb.AppendLine($"* Everything SDK Path: {Constant.EverythingSDKPath}"); sb.AppendLine($"* CLR Version: {Environment.Version}"); sb.AppendLine($"* Installed .NET Framework: "); foreach (var result in GetFrameworkVersionFromRegistry()) diff --git a/src/modules/launcher/Wox.Infrastructure/Wox.cs b/src/modules/launcher/Wox.Infrastructure/Wox.cs index 522975441e..25012495f5 100644 --- a/src/modules/launcher/Wox.Infrastructure/Wox.cs +++ b/src/modules/launcher/Wox.Infrastructure/Wox.cs @@ -7,12 +7,12 @@ namespace Wox.Infrastructure { public static class Constant { - public const string Wox = "PowerLauncher"; + public const string ExeFileName = "PowerLauncher"; public const string Plugins = "Plugins"; private static readonly Assembly Assembly = Assembly.GetExecutingAssembly(); public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location.NonNull()).ToString(); - public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, Wox + ".exe"); + public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, ExeFileName + ".exe"); public static bool IsPortableMode; public const string PortableFolderName = "UserData"; @@ -26,7 +26,7 @@ namespace Wox.Infrastructure } else { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Wox); + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ExeFileName); } } @@ -39,7 +39,5 @@ namespace Wox.Infrastructure public static readonly int ThumbnailSize = 64; public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.png"); public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.png"); - - public static string EverythingSDKPath; } } diff --git a/src/modules/launcher/Wox/App.xaml.cs b/src/modules/launcher/Wox/App.xaml.cs index 01e35d2d67..8a8dc80d8d 100644 --- a/src/modules/launcher/Wox/App.xaml.cs +++ b/src/modules/launcher/Wox/App.xaml.cs @@ -65,10 +65,9 @@ namespace Wox var window = new MainWindow(_settings, _mainVM); API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet); PluginManager.InitializePlugins(API); - Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}"); Current.MainWindow = window; - Current.MainWindow.Title = Constant.Wox; + Current.MainWindow.Title = Constant.ExeFileName; // happlebao todo temp fix for instance code logic // load plugin before change language, because plugin language also needs be changed diff --git a/src/modules/launcher/Wox/Helper/ErrorReporting.cs b/src/modules/launcher/Wox/Helper/ErrorReporting.cs index 2b3d91c6a0..5ea09f3532 100644 --- a/src/modules/launcher/Wox/Helper/ErrorReporting.cs +++ b/src/modules/launcher/Wox/Helper/ErrorReporting.cs @@ -12,6 +12,7 @@ namespace Wox.Helper { var logger = LogManager.GetLogger("UnHandledException"); logger.Fatal(ExceptionFormatter.FormatExcpetion(e)); + var reportWindow = new ReportWindow(e); reportWindow.Show(); } @@ -32,17 +33,11 @@ namespace Wox.Helper public static string RuntimeInfo() { - var info = $"\nWox version: {Constant.Version}" + + var info = $"\nVersion: {Constant.Version}" + $"\nOS Version: {Environment.OSVersion.VersionString}" + $"\nIntPtr Length: {IntPtr.Size}" + $"\nx64: {Environment.Is64BitOperatingSystem}"; return info; } - - public static string DependenciesInfo() - { - var info = $"\nEverything SDK Path: {Constant.EverythingSDKPath}"; - return info; - } } } diff --git a/src/modules/launcher/Wox/ReportWindow.xaml.cs b/src/modules/launcher/Wox/ReportWindow.xaml.cs index ac7e986fda..4485874042 100644 --- a/src/modules/launcher/Wox/ReportWindow.xaml.cs +++ b/src/modules/launcher/Wox/ReportWindow.xaml.cs @@ -34,7 +34,6 @@ namespace Wox StringBuilder content = new StringBuilder(); content.AppendLine(ErrorReporting.RuntimeInfo()); - content.AppendLine(ErrorReporting.DependenciesInfo()); content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}"); content.AppendLine("Exception:"); content.AppendLine(exception.ToString()); diff --git a/src/modules/launcher/Wox/ViewModel/MainViewModel.cs b/src/modules/launcher/Wox/ViewModel/MainViewModel.cs index aa5f1ba516..96445068ca 100644 --- a/src/modules/launcher/Wox/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/Wox/ViewModel/MainViewModel.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; +using System.Windows.Media; using NHotkey; using NHotkey.Wpf; using Wox.Core.Plugin; @@ -196,6 +197,9 @@ namespace Wox.ViewModel #region ViewModel Properties + public Brush MainWindowBackground { get; set; } + public Brush MainWindowBorderBrush { get; set; } + public ResultsViewModel Results { get; private set; } public ResultsViewModel ContextMenu { get; private set; } public ResultsViewModel History { get; private set; }