mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
rename plugin main file, part 2
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
<Compile Include="..\..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="CMD.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="CMDHistory.cs" />
|
||||
<Compile Include="CMDSetting.xaml.cs">
|
||||
<DependentUpon>CMDSetting.xaml</DependentUpon>
|
||||
|
||||
@@ -6,7 +6,7 @@ using YAMP;
|
||||
|
||||
namespace Wox.Plugin.Caculator
|
||||
{
|
||||
public class Calculator : IPlugin, IPluginI18n
|
||||
public class Main : IPlugin, IPluginI18n
|
||||
{
|
||||
private static Regex regValidExpressChar = new Regex(
|
||||
@"^(" +
|
||||
@@ -20,7 +20,7 @@ namespace Wox.Plugin.Caculator
|
||||
private static ParseContext yampContext;
|
||||
private PluginInitContext context { get; set; }
|
||||
|
||||
static Calculator()
|
||||
static Main()
|
||||
{
|
||||
yampContext = Parser.PrimaryContext;
|
||||
Parser.InteractiveMode = false;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<Compile Include="..\..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Calculator.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Compile Include="..\..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Color.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,7 +7,7 @@ using Wox.Infrastructure;
|
||||
|
||||
namespace Wox.Plugin.ControlPanel
|
||||
{
|
||||
public class ControlPanel : IPlugin, IPluginI18n
|
||||
public class Main : IPlugin, IPluginI18n
|
||||
{
|
||||
private PluginInitContext context;
|
||||
private List<ControlPanelItem> controlPanelItems = new List<ControlPanelItem>();
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Compile Include="..\..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ControlPanel.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="ControlPanelItem.cs" />
|
||||
<Compile Include="ControlPanelList.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -9,7 +9,7 @@ using Wox.Infrastructure.Storage;
|
||||
|
||||
namespace Wox.Plugin.Folder
|
||||
{
|
||||
public class FolderPlugin : IPlugin, ISettingProvider, IPluginI18n, ISavable
|
||||
public class Main : IPlugin, ISettingProvider, IPluginI18n, ISavable
|
||||
{
|
||||
private static List<string> driverNames;
|
||||
private PluginInitContext context;
|
||||
@@ -17,7 +17,7 @@ namespace Wox.Plugin.Folder
|
||||
private readonly Settings _settings;
|
||||
private readonly PluginJsonStorage<Settings> _storage;
|
||||
|
||||
public FolderPlugin()
|
||||
public Main()
|
||||
{
|
||||
_storage = new PluginJsonStorage<Settings>();
|
||||
_settings = _storage.Load();
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="FolderLink.cs" />
|
||||
<Compile Include="FolderPlugin.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="FolderPluginSettings.xaml.cs">
|
||||
<DependentUpon>FolderPluginSettings.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wox.Core.Plugin;
|
||||
using Wox.Core.UserSettings;
|
||||
|
||||
namespace Wox.Plugin.PluginIndicator
|
||||
{
|
||||
public class PluginIndicator : IPlugin, IPluginI18n
|
||||
public class Main : IPlugin, IPluginI18n
|
||||
{
|
||||
private PluginInitContext context;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PluginIndicator.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Wox.Plugin.Program
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
Programs.IndexPrograms();
|
||||
Main.IndexPrograms();
|
||||
isIndexing = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Controls;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Infrastructure.Logger;
|
||||
@@ -14,7 +12,7 @@ using Stopwatch = Wox.Infrastructure.Stopwatch;
|
||||
|
||||
namespace Wox.Plugin.Program
|
||||
{
|
||||
public class Programs : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
|
||||
public class Main : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
|
||||
{
|
||||
private static object lockObject = new object();
|
||||
private static List<Program> _programs = new List<Program>();
|
||||
@@ -34,7 +32,7 @@ namespace Wox.Plugin.Program
|
||||
private static Settings _settings;
|
||||
private readonly PluginJsonStorage<Settings> _settingsStorage;
|
||||
|
||||
public Programs()
|
||||
public Main()
|
||||
{
|
||||
_settingsStorage = new PluginJsonStorage<Settings>();
|
||||
_settings = _settingsStorage.Load();
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Wox.Plugin.Program
|
||||
Task.Run(() =>
|
||||
{
|
||||
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Visible; });
|
||||
Programs.IndexPrograms();
|
||||
Main.IndexPrograms();
|
||||
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Hidden; });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<Compile Include="SuffixesConverter.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="ProgramIndexCache.cs" />
|
||||
<Compile Include="Programs.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="ProgramSetting.xaml.cs">
|
||||
<DependentUpon>ProgramSetting.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -13,7 +13,7 @@ using MessageBox = System.Windows.MessageBox;
|
||||
|
||||
namespace Wox.Plugin.Sys
|
||||
{
|
||||
public class Sys : IPlugin, ISettingProvider, IPluginI18n
|
||||
public class Main : IPlugin, ISettingProvider, IPluginI18n
|
||||
{
|
||||
List<Result> availableResults = new List<Result>();
|
||||
private PluginInitContext context;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Sys.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="SysSettings.xaml.cs">
|
||||
<DependentUpon>SysSettings.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace Wox.Plugin.Url
|
||||
{
|
||||
public class UrlPlugin : IPlugin, IPluginI18n
|
||||
public class Main : IPlugin, IPluginI18n
|
||||
{
|
||||
//based on https://gist.github.com/dperini/729294
|
||||
private const string urlPattern = "^" +
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UrlPlugin.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@@ -11,7 +11,7 @@ using Wox.Plugin.WebSearch.SuggestionSources;
|
||||
|
||||
namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
public class WebSearchPlugin : IPlugin, ISettingProvider, IPluginI18n, IMultipleActionKeywords, ISavable, IResultUpdated
|
||||
public class Main : IPlugin, ISettingProvider, IPluginI18n, IMultipleActionKeywords, ISavable, IResultUpdated
|
||||
{
|
||||
public PluginInitContext Context { get; private set; }
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Wox.Plugin.WebSearch
|
||||
set
|
||||
{
|
||||
_icon = value;
|
||||
IconPath = Path.Combine(WebSearchPlugin.PluginDirectory, WebSearchPlugin.ImageDirectory, value);
|
||||
IconPath = Path.Combine(Main.PluginDirectory, Main.ImageDirectory, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Wox.Plugin.WebSearch
|
||||
[JsonIgnore]
|
||||
internal string IconPath { get; private set; } = Path.Combine
|
||||
(
|
||||
WebSearchPlugin.PluginDirectory, WebSearchPlugin.ImageDirectory, DefaultIcon
|
||||
Main.PluginDirectory, Main.ImageDirectory, DefaultIcon
|
||||
);
|
||||
|
||||
public string Url { get; set; }
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Wox.Plugin.WebSearch
|
||||
private bool _isUpdate;
|
||||
private WebSearch _webSearch;
|
||||
private readonly PluginInitContext _context;
|
||||
private readonly WebSearchPlugin _plugin;
|
||||
private readonly Main _plugin;
|
||||
private readonly Settings _settings;
|
||||
|
||||
public WebSearchSetting(WebSearchesSetting settingWidow, Settings settings)
|
||||
@@ -120,7 +120,7 @@ namespace Wox.Plugin.WebSearch
|
||||
|
||||
private void SelectIconButtonOnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var directory = Path.Combine(WebSearchPlugin.PluginDirectory, WebSearchPlugin.ImageDirectory);
|
||||
var directory = Path.Combine(Main.PluginDirectory, Main.ImageDirectory);
|
||||
var dlg = new OpenFileDialog
|
||||
{
|
||||
InitialDirectory = directory,
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
private Settings _settings;
|
||||
public PluginInitContext Context { get; }
|
||||
public WebSearchPlugin Plugin { get; }
|
||||
public Main Plugin { get; }
|
||||
|
||||
public WebSearchesSetting(WebSearchPlugin plugin, Settings settings)
|
||||
public WebSearchesSetting(Main plugin, Settings settings)
|
||||
{
|
||||
Context = plugin.Context;
|
||||
Plugin = plugin;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<Compile Include="WebSearchesSetting.xaml.cs">
|
||||
<DependentUpon>WebSearchesSetting.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebSearchPlugin.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="WebSearchSetting.xaml.cs">
|
||||
<DependentUpon>WebSearchSetting.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
Reference in New Issue
Block a user