mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
remove unused codes
This commit is contained in:
@@ -6,7 +6,6 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Noesis.Javascript;
|
|
||||||
using WinAlfred.Commands;
|
using WinAlfred.Commands;
|
||||||
using WinAlfred.Helper;
|
using WinAlfred.Helper;
|
||||||
using WinAlfred.Plugin;
|
using WinAlfred.Plugin;
|
||||||
@@ -65,30 +64,6 @@ namespace WinAlfred
|
|||||||
|
|
||||||
private void TextBoxBase_OnTextChanged(object sender, TextChangedEventArgs e)
|
private void TextBoxBase_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Initialize a context
|
|
||||||
using (JavascriptContext context = new JavascriptContext())
|
|
||||||
{
|
|
||||||
|
|
||||||
// Setting external parameters for the context
|
|
||||||
context.SetParameter("message", "Hello World !");
|
|
||||||
context.SetParameter("number", 1);
|
|
||||||
|
|
||||||
// Script
|
|
||||||
string script = @"
|
|
||||||
var i;
|
|
||||||
for (i = 0; i < 5; i++)
|
|
||||||
console.Print(message + ' (' + i + ')');
|
|
||||||
number += i;
|
|
||||||
";
|
|
||||||
|
|
||||||
// Running the script
|
|
||||||
context.Run(script);
|
|
||||||
|
|
||||||
// Getting a parameter
|
|
||||||
MessageBox.Show("number: " + context.GetParameter("number"));
|
|
||||||
}
|
|
||||||
|
|
||||||
//MessageBox.Show("s");
|
//MessageBox.Show("s");
|
||||||
resultCtrl.Dirty = true;
|
resultCtrl.Dirty = true;
|
||||||
////auto clear results after 50ms if there are any results returned by plugins
|
////auto clear results after 50ms if there are any results returned by plugins
|
||||||
@@ -125,9 +100,6 @@ namespace WinAlfred
|
|||||||
Plugins.Init(this);
|
Plugins.Init(this);
|
||||||
cmdDispatcher = new Command(this);
|
cmdDispatcher = new Command(this);
|
||||||
InitialTray();
|
InitialTray();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TbQuery_OnPreviewKeyDown(object sender, KeyEventArgs e)
|
private void TbQuery_OnPreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
|
|||||||
@@ -65,9 +65,6 @@
|
|||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Noesis.Javascript">
|
|
||||||
<HintPath>C:\Users\Scott\Desktop\x64\Noesis.Javascript.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="ReachFramework" />
|
<Reference Include="ReachFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
|||||||
Reference in New Issue
Block a user