mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Optimize files.
This commit is contained in:
@@ -51,10 +51,6 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Pythonnet.Runtime\Python.Runtime.csproj">
|
|
||||||
<Project>{097B4AC0-74E9-4C58-BCF8-C69746EC8271}</Project>
|
|
||||||
<Name>Python.Runtime</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||||
<Project>{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}</Project>
|
<Project>{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}</Project>
|
||||||
<Name>Wox.Infrastructure</Name>
|
<Name>Wox.Infrastructure</Name>
|
||||||
|
|||||||
14
Wox.sln
14
Wox.sln
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2013
|
# Visual Studio 2013
|
||||||
VisualStudioVersion = 12.0.21005.1
|
VisualStudioVersion = 12.0.30110.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Test", "Wox.Test\Wox.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Test", "Wox.Test\Wox.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox", "Wox\Wox.csproj", "{D
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.SystemPlugins", "Wox.Plugin.SystemPlugins\Wox.Plugin.SystemPlugins.csproj", "{69CE0206-CB41-453D-88AF-DF86092EF9B8}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.SystemPlugins", "Wox.Plugin.SystemPlugins\Wox.Plugin.SystemPlugins.csproj", "{69CE0206-CB41-453D-88AF-DF86092EF9B8}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Runtime", "Pythonnet.Runtime\Python.Runtime.csproj", "{097B4AC0-74E9-4C58-BCF8-C69746EC8271}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Infrastructure", "Wox.Infrastructure\Wox.Infrastructure.csproj", "{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Infrastructure", "Wox.Infrastructure\Wox.Infrastructure.csproj", "{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.UAC", "Wox.UAC\Wox.UAC.csproj", "{C9BC17A0-C2BC-4185-AC1F-32E3352C1233}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.UAC", "Wox.UAC\Wox.UAC.csproj", "{C9BC17A0-C2BC-4185-AC1F-32E3352C1233}"
|
||||||
@@ -23,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.PluginManagement
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.BrowserBookmark", "Plugins\Wox.Plugin.BrowserBookmark\Wox.Plugin.BrowserBookmark.csproj", "{9B130CC5-14FB-41FF-B310-0A95B6894C37}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.BrowserBookmark", "Plugins\Wox.Plugin.BrowserBookmark\Wox.Plugin.BrowserBookmark.csproj", "{9B130CC5-14FB-41FF-B310-0A95B6894C37}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Runtime", "Pythonnet.Runtime\Python.Runtime.csproj", "{097B4AC0-74E9-4C58-BCF8-C69746EC8271}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -45,10 +45,6 @@ Global
|
|||||||
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{69CE0206-CB41-453D-88AF-DF86092EF9B8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -65,6 +61,10 @@ Global
|
|||||||
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -1,17 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using Wox.Infrastructure;
|
|
||||||
using Wox.Infrastructure.Storage;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox
|
namespace Wox
|
||||||
@@ -22,7 +11,6 @@ namespace Wox
|
|||||||
private bool update;
|
private bool update;
|
||||||
private CustomPluginHotkey updateCustomHotkey;
|
private CustomPluginHotkey updateCustomHotkey;
|
||||||
|
|
||||||
|
|
||||||
public CustomPluginHotkeySetting(SettingWindow settingWidow)
|
public CustomPluginHotkeySetting(SettingWindow settingWidow)
|
||||||
{
|
{
|
||||||
this.settingWidow = settingWidow;
|
this.settingWidow = settingWidow;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -11,7 +9,6 @@ using System.Windows.Forms;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Shapes;
|
|
||||||
using WindowsInput;
|
using WindowsInput;
|
||||||
using WindowsInput.Native;
|
using WindowsInput.Native;
|
||||||
using NHotkey;
|
using NHotkey;
|
||||||
@@ -23,19 +20,16 @@ using Wox.Infrastructure.Storage;
|
|||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.PluginLoader;
|
using Wox.PluginLoader;
|
||||||
using Wox.Properties;
|
|
||||||
using Application = System.Windows.Application;
|
using Application = System.Windows.Application;
|
||||||
using Brushes = System.Windows.Media.Brushes;
|
using Brushes = System.Windows.Media.Brushes;
|
||||||
using Color = System.Windows.Media.Color;
|
using Color = System.Windows.Media.Color;
|
||||||
using ContextMenu = System.Windows.Forms.ContextMenu;
|
using ContextMenu = System.Windows.Forms.ContextMenu;
|
||||||
using Control = System.Windows.Controls.Control;
|
|
||||||
using FontFamily = System.Windows.Media.FontFamily;
|
using FontFamily = System.Windows.Media.FontFamily;
|
||||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||||
using MenuItem = System.Windows.Forms.MenuItem;
|
using MenuItem = System.Windows.Forms.MenuItem;
|
||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
using MouseButton = System.Windows.Input.MouseButton;
|
using MouseButton = System.Windows.Input.MouseButton;
|
||||||
using Path = System.IO.Path;
|
using Path = System.IO.Path;
|
||||||
using Point = System.Drawing.Point;
|
|
||||||
using Rectangle = System.Drawing.Rectangle;
|
using Rectangle = System.Drawing.Rectangle;
|
||||||
using TextBox = System.Windows.Controls.TextBox;
|
using TextBox = System.Windows.Controls.TextBox;
|
||||||
using ToolTip = System.Windows.Controls.ToolTip;
|
using ToolTip = System.Windows.Controls.ToolTip;
|
||||||
@@ -45,10 +39,6 @@ namespace Wox {
|
|||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
private static readonly object locker = new object();
|
|
||||||
public static bool initialized = false;
|
|
||||||
|
|
||||||
private static readonly List<Result> waitShowResultList = new List<Result>();
|
|
||||||
private readonly GlobalHotkey globalHotkey = new GlobalHotkey();
|
private readonly GlobalHotkey globalHotkey = new GlobalHotkey();
|
||||||
private readonly KeyboardSimulator keyboardSimulator = new KeyboardSimulator(new InputSimulator());
|
private readonly KeyboardSimulator keyboardSimulator = new KeyboardSimulator(new InputSimulator());
|
||||||
private readonly Storyboard progressBarStoryboard = new Storyboard();
|
private readonly Storyboard progressBarStoryboard = new Storyboard();
|
||||||
@@ -112,9 +102,8 @@ namespace Wox {
|
|||||||
|
|
||||||
public MainWindow() {
|
public MainWindow() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
initialized = true;
|
|
||||||
|
|
||||||
if (UserSettingStorage.Instance.OpacityMode == OpacityMode.LayeredWindow)
|
if (UserSettingStorage.Instance.OpacityMode == OpacityMode.LayeredWindow)
|
||||||
this.AllowsTransparency = true;
|
this.AllowsTransparency = true;
|
||||||
|
|
||||||
System.Net.WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
|
System.Net.WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
|
||||||
@@ -466,18 +455,13 @@ namespace Wox {
|
|||||||
queryHasReturn = true;
|
queryHasReturn = true;
|
||||||
progressBar.Dispatcher.Invoke(new Action(StopProgress));
|
progressBar.Dispatcher.Invoke(new Action(StopProgress));
|
||||||
if (list.Count > 0) {
|
if (list.Count > 0) {
|
||||||
//todo:this should be opened to users, it's their choice to use it or not in their workflows
|
|
||||||
list.ForEach(
|
list.ForEach(
|
||||||
o => {
|
o => {
|
||||||
if (o.AutoAjustScore) o.Score += UserSelectedRecordStorage.Instance.GetSelectedCount(o);
|
if (o.AutoAjustScore) o.Score += UserSelectedRecordStorage.Instance.GetSelectedCount(o);
|
||||||
});
|
});
|
||||||
lock (locker) {
|
|
||||||
waitShowResultList.AddRange(list);
|
|
||||||
}
|
|
||||||
Dispatcher.DelayInvoke("ShowResult", k => resultCtrl.Dispatcher.Invoke(new Action(() => {
|
Dispatcher.DelayInvoke("ShowResult", k => resultCtrl.Dispatcher.Invoke(new Action(() => {
|
||||||
List<Result> l = waitShowResultList.Where(o => o.OriginQuery != null && o.OriginQuery.RawQuery == lastQuery).ToList();
|
List<Result> results = list.Where(o => o.OriginQuery != null && o.OriginQuery.RawQuery == lastQuery).ToList();
|
||||||
waitShowResultList.Clear();
|
resultCtrl.AddResults(results);
|
||||||
resultCtrl.AddResults(l);
|
|
||||||
})), TimeSpan.FromMilliseconds(isCMDMode ? 0 : 50));
|
})), TimeSpan.FromMilliseconds(isCMDMode ? 0 : 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user