mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Merge master
This commit is contained in:
@@ -50,10 +50,16 @@ namespace Wox
|
||||
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
|
||||
}
|
||||
|
||||
public bool OnActivate(IList<string> args)
|
||||
public void OnActivate(IList<string> args)
|
||||
{
|
||||
CommandArgsFactory.Execute(args);
|
||||
return true;
|
||||
if (args.Count > 0 && args[0] == SingleInstance<App>.Restart)
|
||||
{
|
||||
Window.CloseApp();
|
||||
}
|
||||
else
|
||||
{
|
||||
CommandArgsFactory.Execute(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Wox.Helper;
|
||||
|
||||
namespace Wox.CommandArgs
|
||||
{
|
||||
@@ -20,7 +21,8 @@ namespace Wox.CommandArgs
|
||||
|
||||
public static void Execute(IList<string> args)
|
||||
{
|
||||
if (args.Count > 0)
|
||||
// todo restart command line args?
|
||||
if (args.Count > 0 && args[0] != SingleInstance<App>.Restart)
|
||||
{
|
||||
string command = args[0];
|
||||
ICommandArg cmd = commandArgs.FirstOrDefault(o => o.Command.ToLower() == command);
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SingleInstance.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>
|
||||
// This class checks to make sure that only one instance of
|
||||
// this application is running at a time.
|
||||
// </summary>
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -23,7 +13,8 @@ using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
|
||||
//http://blogs.microsoft.co.il/arik/2010/05/28/wpf-single-instance-application/
|
||||
// http://blogs.microsoft.co.il/arik/2010/05/28/wpf-single-instance-application/
|
||||
// modified to allow single instace restart
|
||||
namespace Wox.Helper
|
||||
{
|
||||
internal enum WM
|
||||
@@ -194,7 +185,7 @@ namespace Wox.Helper
|
||||
|
||||
public interface ISingleInstanceApp
|
||||
{
|
||||
bool OnActivate(IList<string> args);
|
||||
void OnActivate(IList<string> args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -212,6 +203,8 @@ namespace Wox.Helper
|
||||
where TApplication: Application , ISingleInstanceApp
|
||||
|
||||
{
|
||||
public const string Restart = "Restart";
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
@@ -237,7 +230,7 @@ namespace Wox.Helper
|
||||
/// <summary>
|
||||
/// Application mutex.
|
||||
/// </summary>
|
||||
private static Mutex singleInstanceMutex;
|
||||
internal static Mutex singleInstanceMutex;
|
||||
|
||||
/// <summary>
|
||||
/// IPC channel for communications.
|
||||
@@ -273,6 +266,8 @@ namespace Wox.Helper
|
||||
public static bool InitializeAsFirstInstance( string uniqueName )
|
||||
{
|
||||
commandLineArgs = GetCommandLineArgs(uniqueName);
|
||||
//remove execute path itself
|
||||
commandLineArgs.RemoveAt(0);
|
||||
|
||||
// Build unique application Id and the IPC channel name.
|
||||
string applicationIdentifier = uniqueName + Environment.UserName;
|
||||
@@ -285,13 +280,21 @@ namespace Wox.Helper
|
||||
if (firstInstance)
|
||||
{
|
||||
CreateRemoteService(channelName);
|
||||
return true;
|
||||
}
|
||||
// Restart
|
||||
else if (commandLineArgs.Count > 0 && commandLineArgs[0] == Restart)
|
||||
{
|
||||
SignalFirstInstance(channelName, commandLineArgs);
|
||||
singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(10));
|
||||
CreateRemoteService(channelName);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SignalFirstInstance(channelName, commandLineArgs);
|
||||
return false;
|
||||
}
|
||||
|
||||
return firstInstance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -299,11 +302,7 @@ namespace Wox.Helper
|
||||
/// </summary>
|
||||
public static void Cleanup()
|
||||
{
|
||||
if (singleInstanceMutex != null)
|
||||
{
|
||||
singleInstanceMutex.Close();
|
||||
singleInstanceMutex = null;
|
||||
}
|
||||
singleInstanceMutex?.ReleaseMutex();
|
||||
|
||||
if (channel != null)
|
||||
{
|
||||
@@ -442,8 +441,7 @@ namespace Wox.Helper
|
||||
{
|
||||
return;
|
||||
}
|
||||
//remove execute path itself
|
||||
args.RemoveAt(0);
|
||||
|
||||
((TApplication)Application.Current).OnActivate(args);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<system:String x:Key="windowMode">Window Mode</system:String>
|
||||
<system:String x:Key="opacity">Opacity</system:String>
|
||||
|
||||
|
||||
<!--Setting Hotkey-->
|
||||
<system:String x:Key="hotkey">Hotkey</system:String>
|
||||
<system:String x:Key="woxHotkey">Wox Hotkey</system:String>
|
||||
|
||||
128
Wox/Languages/fr.xaml
Normal file
128
Wox/Languages/fr.xaml
Normal file
@@ -0,0 +1,128 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!--MainWindow-->
|
||||
<system:String x:Key="registerHotkeyFailed">Échec lors de l'enregistrement du raccourci : {0}</system:String>
|
||||
<system:String x:Key="couldnotStartCmd">Impossible de lancer {0}</system:String>
|
||||
<system:String x:Key="invalidWoxPluginFileFormat">Le format de fichier n'est pas un plugin wox valide</system:String>
|
||||
<system:String x:Key="setAsTopMostInThisQuery">Définir en tant que favori pour cette requête</system:String>
|
||||
<system:String x:Key="cancelTopMostInThisQuery">Annuler le favori</system:String>
|
||||
<system:String x:Key="executeQuery">Lancer la requête : {0}</system:String>
|
||||
<system:String x:Key="lastExecuteTime">Dernière exécution : {0}</system:String>
|
||||
<system:String x:Key="iconTrayOpen">Ouvrir</system:String>
|
||||
<system:String x:Key="iconTraySettings">Paramètres</system:String>
|
||||
<system:String x:Key="iconTrayAbout">À propos</system:String>
|
||||
<system:String x:Key="iconTrayExit">Quitter</system:String>
|
||||
|
||||
<!--Setting General-->
|
||||
<system:String x:Key="woxsettings">Paramètres - Wox</system:String>
|
||||
<system:String x:Key="general">Général</system:String>
|
||||
<system:String x:Key="startWoxOnSystemStartup">Lancer Wox au démarrage du système</system:String>
|
||||
<system:String x:Key="hideWoxWhenLoseFocus">Cacher Wox lors de la perte de focus</system:String>
|
||||
<system:String x:Key="dontPromptUpdateMsg">Ne pas afficher le message de mise à jour pour les nouvelles versions</system:String>
|
||||
<system:String x:Key="rememberLastLocation">Se souvenir du dernier emplacement de la fenêtre</system:String>
|
||||
<system:String x:Key="language">Langue</system:String>
|
||||
<system:String x:Key="maxShowResults">Résultats à afficher</system:String>
|
||||
<system:String x:Key="ignoreHotkeysOnFullscreen">Ignore les raccourcis lorsqu'une application est en plein écran</system:String>
|
||||
|
||||
<!--Setting Plugin-->
|
||||
<system:String x:Key="plugin">Modules</system:String>
|
||||
<system:String x:Key="browserMorePlugins">Trouver plus de modules</system:String>
|
||||
<system:String x:Key="disable">Désactivé</system:String>
|
||||
<system:String x:Key="actionKeywords">Mot-clé d'action :</system:String>
|
||||
<system:String x:Key="pluginDirectory">Répertoire</system:String>
|
||||
<system:String x:Key="author">Auteur </system:String>
|
||||
<system:String x:Key="plugin_init_time">Chargement : {0}ms</system:String>
|
||||
<system:String x:Key="plugin_query_time">Utilisation : {0}ms</system:String>
|
||||
|
||||
<!--Setting Theme-->
|
||||
<system:String x:Key="theme">Thème</system:String>
|
||||
<system:String x:Key="browserMoreThemes">Trouver plus de thèmes</system:String>
|
||||
<system:String x:Key="helloWox">Hello Wox</system:String>
|
||||
<system:String x:Key="queryBoxFont">Police (barre de recherche)</system:String>
|
||||
<system:String x:Key="resultItemFont">Police (liste des résultats) </system:String>
|
||||
<system:String x:Key="windowMode">Mode fenêtré</system:String>
|
||||
<system:String x:Key="opacity">Opacité</system:String>
|
||||
|
||||
<!--Setting Hotkey-->
|
||||
<system:String x:Key="hotkey">Raccourcis</system:String>
|
||||
<system:String x:Key="woxHotkey">Ouvrir Wox</system:String>
|
||||
<system:String x:Key="customQueryHotkey">Requêtes personnalisées</system:String>
|
||||
<system:String x:Key="delete">Supprimer</system:String>
|
||||
<system:String x:Key="edit">Éditer</system:String>
|
||||
<system:String x:Key="add">Ajouter</system:String>
|
||||
<system:String x:Key="pleaseSelectAnItem">Veuillez sélectionner un élément</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">Voulez-vous vraiment supprimer {0} raccourci(s) ?</system:String>
|
||||
|
||||
<!--Setting Proxy-->
|
||||
<system:String x:Key="proxy">Proxy</system:String>
|
||||
<system:String x:Key="enableProxy">Activer le proxy</system:String>
|
||||
<system:String x:Key="server">Serveur</system:String>
|
||||
<system:String x:Key="port">Port</system:String>
|
||||
<system:String x:Key="userName">Utilisateur</system:String>
|
||||
<system:String x:Key="password">Mot de passe</system:String>
|
||||
<system:String x:Key="testProxy">Tester</system:String>
|
||||
<system:String x:Key="save">Sauvegarder</system:String>
|
||||
<system:String x:Key="serverCantBeEmpty">Un serveur doit être indiqué</system:String>
|
||||
<system:String x:Key="portCantBeEmpty">Un port doit être indiqué</system:String>
|
||||
<system:String x:Key="invalidPortFormat">Format invalide pour : port</system:String>
|
||||
<system:String x:Key="saveProxySuccessfully">Proxy sauvegardé avec succès</system:String>
|
||||
<system:String x:Key="proxyIsCorrect">Le proxy est valide</system:String>
|
||||
<system:String x:Key="proxyConnectFailed">Connection au proxy échouée</system:String>
|
||||
|
||||
<!--Setting About-->
|
||||
<system:String x:Key="about">À propos</system:String>
|
||||
<system:String x:Key="website">Site Web</system:String>
|
||||
<system:String x:Key="version">Version</system:String>
|
||||
<system:String x:Key="about_activate_times">Vous avez utilisé Wox {0} fois</system:String>
|
||||
|
||||
<!--Action Keyword Setting Dialog-->
|
||||
<system:String x:Key="oldActionKeywords">Ancien mot-clé d'action</system:String>
|
||||
<system:String x:Key="newActionKeywords">Nouveau mot-clé d'action</system:String>
|
||||
<system:String x:Key="cancel">Annuler</system:String>
|
||||
<system:String x:Key="done">Terminé</system:String>
|
||||
<system:String x:Key="cannotFindSpecifiedPlugin">Impossible de trouver le module spécifié</system:String>
|
||||
<system:String x:Key="newActionKeywordsCannotBeEmpty">Le nouveau mot-clé d'action doit être spécifié</system:String>
|
||||
<system:String x:Key="newActionKeywordsHasBeenAssigned">Le nouveau mot-clé d'action a été assigné à un autre module, veuillez en choisir un autre</system:String>
|
||||
<system:String x:Key="succeed">Ajouté</system:String>
|
||||
<system:String x:Key="actionkeyword_tips">Utilisez * si vous ne souhaitez pas utiliser de mot-clé spécifique</system:String>
|
||||
|
||||
|
||||
<!--Custom Query Hotkey Dialog-->
|
||||
<system:String x:Key="preview">Aperçu</system:String>
|
||||
<system:String x:Key="hotkeyIsNotUnavailable">Le raccourci n'est pas disponible, choisissez en un autre</system:String>
|
||||
<system:String x:Key="invalidPluginHotkey">Raccourci invalide</system:String>
|
||||
<system:String x:Key="update">Actualiser</system:String>
|
||||
|
||||
<!--Hotkey Control-->
|
||||
<system:String x:Key="hotkeyUnavailable">Raccourci non disponible</system:String>
|
||||
|
||||
|
||||
<!--Crash Reporter-->
|
||||
<system:String x:Key="reportWindow_version">Version</system:String>
|
||||
<system:String x:Key="reportWindow_time">Time</system:String>
|
||||
<system:String x:Key="reportWindow_reproduce">Please tell us how application crashed so we can fix it</system:String>
|
||||
<system:String x:Key="reportWindow_send_report">Send Report</system:String>
|
||||
<system:String x:Key="reportWindow_cancel">Cancel</system:String>
|
||||
<system:String x:Key="reportWindow_general">General</system:String>
|
||||
<system:String x:Key="reportWindow_exceptions">Exceptions</system:String>
|
||||
<system:String x:Key="reportWindow_exception_type">Exception Type</system:String>
|
||||
<system:String x:Key="reportWindow_source">Source</system:String>
|
||||
<system:String x:Key="reportWindow_stack_trace">Stack Trace</system:String>
|
||||
<system:String x:Key="reportWindow_sending">Sending</system:String>
|
||||
<system:String x:Key="reportWindow_report_succeed">Report succeed</system:String>
|
||||
<system:String x:Key="reportWindow_report_failed">Report failed</system:String>
|
||||
<system:String x:Key="reportWindow_wox_got_an_error">Wox a rencontré une erreur</system:String>
|
||||
|
||||
<!--update-->
|
||||
<system:String x:Key="update_wox_update_new_version_available">Wox version v{0} est disponible</system:String>
|
||||
<system:String x:Key="update_wox_update_error">Une erreur s'est produite lors de l'installation de la mise à jour</system:String>
|
||||
<system:String x:Key="update_wox_update">Mettre à jour</system:String>
|
||||
<system:String x:Key="update_wox_update_cancel">Annuler</system:String>
|
||||
<system:String x:Key="update_wox_update_restart_wox_tip">Wox doit redémarrer pour installer cette mise à jour</system:String>
|
||||
<system:String x:Key="update_wox_update_upadte_files">Les fichiers suivants seront mis à jour</system:String>
|
||||
<system:String x:Key="update_wox_update_files">Fichiers mis à jour</system:String>
|
||||
<system:String x:Key="update_wox_update_upadte_description">Description de la mise à jour</system:String>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -43,7 +43,7 @@
|
||||
<system:String x:Key="resultItemFont">结果项字体</system:String>
|
||||
<system:String x:Key="windowMode">窗口模式</system:String>
|
||||
<system:String x:Key="opacity">透明度</system:String>
|
||||
|
||||
|
||||
<!--设置,热键-->
|
||||
<system:String x:Key="hotkey">热键</system:String>
|
||||
<system:String x:Key="woxHotkey">Wox激活热键</system:String>
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
AllowDrop="True"
|
||||
ShowInTaskbar="False"
|
||||
Style="{DynamicResource WindowStyle}"
|
||||
Icon="Images\app.png">
|
||||
Icon="Images\app.png"
|
||||
AllowsTransparency="True"
|
||||
>
|
||||
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="Border_OnMouseDown">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBox Style="{DynamicResource QueryBoxStyle}" PreviewDragOver="TbQuery_OnPreviewDragOver" AllowDrop="True"
|
||||
|
||||
@@ -10,7 +10,6 @@ using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media.Animation;
|
||||
using NHotkey;
|
||||
@@ -26,14 +25,10 @@ using Wox.Infrastructure.Hotkey;
|
||||
using Wox.Plugin;
|
||||
using Wox.Storage;
|
||||
using ContextMenu = System.Windows.Forms.ContextMenu;
|
||||
using DataFormats = System.Windows.DataFormats;
|
||||
using DragEventArgs = System.Windows.DragEventArgs;
|
||||
using IDataObject = System.Windows.IDataObject;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
using NotifyIcon = System.Windows.Forms.NotifyIcon;
|
||||
using Screen = System.Windows.Forms.Screen;
|
||||
using MenuItem = System.Windows.Forms.MenuItem;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using Stopwatch = Wox.Infrastructure.Stopwatch;
|
||||
using ToolTip = System.Windows.Controls.ToolTip;
|
||||
|
||||
namespace Wox
|
||||
{
|
||||
@@ -85,12 +80,18 @@ namespace Wox
|
||||
|
||||
public void CloseApp()
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
notifyIcon.Visible = false;
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
public void RestarApp()
|
||||
{
|
||||
ProcessStartInfo info = new ProcessStartInfo
|
||||
{
|
||||
notifyIcon.Visible = false;
|
||||
Close();
|
||||
Environment.Exit(0);
|
||||
}));
|
||||
FileName = Application.ResourceAssembly.Location,
|
||||
Arguments = SingleInstance<App>.Restart
|
||||
};
|
||||
Process.Start(info);
|
||||
}
|
||||
|
||||
public void HideApp()
|
||||
@@ -198,16 +199,12 @@ namespace Wox
|
||||
pnlResult.ItemDropEvent += pnlResult_ItemDropEvent;
|
||||
pnlContextMenu.LeftMouseClickEvent += SelectResult;
|
||||
pnlResult.RightMouseClickEvent += pnlResult_RightMouseClickEvent;
|
||||
Closing += MainWindow_Closing;
|
||||
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
InternationalizationManager.Instance.ChangeLanguage(UserSettingStorage.Instance.Language);
|
||||
|
||||
SetHotkey(UserSettingStorage.Instance.Hotkey, OnHotkey);
|
||||
SetCustomPluginHotkey();
|
||||
InitialTray();
|
||||
|
||||
Closing += MainWindow_Closing;
|
||||
|
||||
}
|
||||
|
||||
void pnlResult_ItemDropEvent(Result result, IDataObject dropDataObject, DragEventArgs args)
|
||||
@@ -250,6 +247,9 @@ namespace Wox
|
||||
|
||||
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
InternationalizationManager.Instance.ChangeLanguage(UserSettingStorage.Instance.Language);
|
||||
|
||||
Left = GetWindowsLeft();
|
||||
Top = GetWindowsTop();
|
||||
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
|
||||
[assembly: AssemblyTitle("Wox")]
|
||||
[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Wox")]
|
||||
[assembly: AssemblyCopyright("The MIT License (MIT)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None,
|
||||
ResourceDictionaryLocation.SourceAssembly
|
||||
)]
|
||||
[assembly: AssemblyVersion("1.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.0")]
|
||||
[assembly: Exceptionless.Configuration.Exceptionless("e0b256fbe9384498ba89aae2a6b7f8ab")]
|
||||
@@ -440,9 +440,7 @@ namespace Wox
|
||||
private void ThemeComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
string themeName = themeComboBox.SelectedItem.ToString();
|
||||
UserSettingStorage.Instance.Theme = themeName;
|
||||
DelayChangeTheme();
|
||||
UserSettingStorage.Instance.Save();
|
||||
ThemeManager.Theme.ChangeTheme(themeName);
|
||||
}
|
||||
|
||||
private void CbQueryBoxFont_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -451,16 +449,8 @@ namespace Wox
|
||||
string queryBoxFontName = cbQueryBoxFont.SelectedItem.ToString();
|
||||
UserSettingStorage.Instance.QueryBoxFont = queryBoxFontName;
|
||||
this.cbQueryBoxFontFaces.SelectedItem = ((FontFamily)cbQueryBoxFont.SelectedItem).ChooseRegularFamilyTypeface();
|
||||
DelayChangeTheme();
|
||||
UserSettingStorage.Instance.Save();
|
||||
}
|
||||
|
||||
private void DelayChangeTheme()
|
||||
{
|
||||
Dispatcher.DelayInvoke("delayChangeTheme", () =>
|
||||
{
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}, TimeSpan.FromMilliseconds(100));
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
|
||||
private void CbQueryBoxFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -480,7 +470,7 @@ namespace Wox
|
||||
UserSettingStorage.Instance.QueryBoxFontWeight = typeface.Weight.ToString();
|
||||
UserSettingStorage.Instance.QueryBoxFontStyle = typeface.Style.ToString();
|
||||
UserSettingStorage.Instance.Save();
|
||||
DelayChangeTheme();
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,9 +480,8 @@ namespace Wox
|
||||
string resultItemFont = cbResultItemFont.SelectedItem.ToString();
|
||||
UserSettingStorage.Instance.ResultItemFont = resultItemFont;
|
||||
this.cbResultItemFontFaces.SelectedItem = ((FontFamily)cbResultItemFont.SelectedItem).ChooseRegularFamilyTypeface();
|
||||
|
||||
UserSettingStorage.Instance.Save();
|
||||
DelayChangeTheme();
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
|
||||
private void CbResultItemFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -510,7 +499,7 @@ namespace Wox
|
||||
UserSettingStorage.Instance.ResultItemFontWeight = typeface.Weight.ToString();
|
||||
UserSettingStorage.Instance.ResultItemFontStyle = typeface.Style.ToString();
|
||||
UserSettingStorage.Instance.Save();
|
||||
DelayChangeTheme();
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
58
Wox/Themes/BlurBlack.xaml
Normal file
58
Wox/Themes/BlurBlack.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
<Setter Property="Background" Value="#01000001" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="Black" Opacity="0.3"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="Black" Opacity="0.3"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Color x:Key="ItemSelectedBackgroundColor">#356ef3</Color>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
58
Wox/Themes/BlurWhite.xaml
Normal file
58
Wox/Themes/BlurWhite.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#FF000000" />
|
||||
<Setter Property="Background" Value="#01FFFFFF" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="White" Opacity="0.1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="White" Opacity="0.1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#FF000000"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FF000000"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
</Style>
|
||||
<Color x:Key="ItemSelectedBackgroundColor">#356ef3</Color>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -14,6 +14,8 @@
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
</Style>
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NHotkey, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
@@ -114,6 +114,9 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="CommandArgs\ToggleCommandArg.cs" />
|
||||
<Compile Include="Converters\ConvertorBase.cs" />
|
||||
<Compile Include="Converters\ImagePathConverter.cs" />
|
||||
@@ -217,6 +220,11 @@
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Languages\fr.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -272,6 +280,16 @@
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Page Include="Themes\BlurBlack.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="Themes\BlurWhite.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="WoxUpdate.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<package id="Exceptionless" version="1.5.2121" targetFramework="net452" />
|
||||
<package id="InputSimulator" version="1.0.4.0" targetFramework="net452" />
|
||||
<package id="MarkdownSharp" version="1.13.0.0" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="NHotkey" version="1.2.1" targetFramework="net452" />
|
||||
<package id="NHotkey.Wpf" version="1.2.1" targetFramework="net452" />
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
|
||||
|
||||
Reference in New Issue
Block a user