mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
System Plugin File Structure change.
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins
|
namespace Wox.Plugin.SystemPlugins.Program
|
||||||
{
|
{
|
||||||
public interface IProgramSource
|
public interface IProgramSource
|
||||||
{
|
{
|
||||||
@@ -21,9 +19,9 @@ namespace Wox.Plugin.SystemPlugins
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Program CreateEntry(string file)
|
protected SystemPlugins.Program.Program CreateEntry(string file)
|
||||||
{
|
{
|
||||||
Program p = new Program()
|
SystemPlugins.Program.Program p = new SystemPlugins.Program.Program()
|
||||||
{
|
{
|
||||||
Title = global::System.IO.Path.GetFileNameWithoutExtension(file),
|
Title = global::System.IO.Path.GetFileNameWithoutExtension(file),
|
||||||
IcoPath = file,
|
IcoPath = file,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<UserControl x:Class="Wox.Plugin.SystemPlugins.ProgramSetting"
|
<UserControl x:Class="Wox.Plugin.SystemPlugins.Program.ProgramSetting"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -1,19 +1,8 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
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.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins
|
namespace Wox.Plugin.SystemPlugins.Program
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for ProgramSetting.xaml
|
/// Interaction logic for ProgramSetting.xaml
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="Wox.Plugin.SystemPlugins.ProgramSourceSetting"
|
<Window x:Class="Wox.Plugin.SystemPlugins.Program.ProgramSourceSetting"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
@@ -1,23 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
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;
|
||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins
|
namespace Wox.Plugin.SystemPlugins.Program
|
||||||
{
|
{
|
||||||
public partial class ProgramSourceSetting : Window
|
public partial class ProgramSourceSetting : Window
|
||||||
{
|
{
|
||||||
@@ -30,7 +19,7 @@ namespace Wox.Plugin.SystemPlugins
|
|||||||
this.settingWindow = settingWidow;
|
this.settingWindow = settingWidow;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.cbType.ItemsSource = Wox.Plugin.SystemPlugins.Programs.SourceTypes.Select(o => o.Key).ToList();
|
this.cbType.ItemsSource = Programs.SourceTypes.Select(o => o.Key).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateItem(ProgramSource programSource)
|
public void UpdateItem(ProgramSource programSource)
|
||||||
@@ -115,7 +104,7 @@ namespace Wox.Plugin.SystemPlugins
|
|||||||
{
|
{
|
||||||
string item = cbType.SelectedItem as String;
|
string item = cbType.SelectedItem as String;
|
||||||
Type type;
|
Type type;
|
||||||
if (item != null && Wox.Plugin.SystemPlugins.Programs.SourceTypes.TryGetValue(item, out type))
|
if (item != null && Programs.SourceTypes.TryGetValue(item, out type))
|
||||||
{
|
{
|
||||||
var attrs = type.GetCustomAttributes(typeof(BrowsableAttribute), false);
|
var attrs = type.GetCustomAttributes(typeof(BrowsableAttribute), false);
|
||||||
if (attrs.Length > 0 && (attrs[0] as BrowsableAttribute).Browsable == false)
|
if (attrs.Length > 0 && (attrs[0] as BrowsableAttribute).Browsable == false)
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
[global::System.ComponentModel.Browsable(false)]
|
[global::System.ComponentModel.Browsable(false)]
|
||||||
public class AppPathsProgramSource: AbstractProgramSource
|
public class AppPathsProgramSource: AbstractProgramSource
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
[global::System.ComponentModel.Browsable(false)]
|
[global::System.ComponentModel.Browsable(false)]
|
||||||
public class CommonStartMenuProgramSource : FileSystemProgramSource
|
public class CommonStartMenuProgramSource : FileSystemProgramSource
|
||||||
@@ -1,16 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Wox.Infrastructure;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
using Wox.Plugin.SystemPlugins;
|
|
||||||
using Wox.Plugin.SystemPlugins.ProgramSources;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources {
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources {
|
||||||
//TODO: Create Deep Version that grabs all subfolders like FileSystemProgramSource
|
//TODO: Create Deep Version that grabs all subfolders like FileSystemProgramSource
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
public class FileSystemProgramSource : AbstractProgramSource
|
public class FileSystemProgramSource : AbstractProgramSource
|
||||||
{
|
{
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using IniParser;
|
using System.Text;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
public class PortableAppsProgramSource : AbstractProgramSource
|
public class PortableAppsProgramSource : AbstractProgramSource
|
||||||
{
|
{
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
[global::System.ComponentModel.Browsable(false)]
|
[global::System.ComponentModel.Browsable(false)]
|
||||||
public class UserStartMenuProgramSource : FileSystemProgramSource
|
public class UserStartMenuProgramSource : FileSystemProgramSource
|
||||||
@@ -1,19 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Microsoft.Win32;
|
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using Wox.Infrastructure.Storage;
|
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
using Wox.Plugin.SystemPlugins.ProgramSources;
|
using Wox.Plugin.SystemPlugins.Program.ProgramSources;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins
|
namespace Wox.Plugin.SystemPlugins.Program
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
@@ -55,36 +55,36 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CMD\CMDStorage.cs" />
|
<Compile Include="CMD\CMDStorage.cs" />
|
||||||
<Compile Include="ProgramSetting.xaml.cs">
|
<Compile Include="Program\ProgramSetting.xaml.cs">
|
||||||
<DependentUpon>ProgramSetting.xaml</DependentUpon>
|
<DependentUpon>ProgramSetting.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ProgramSourceSetting.xaml.cs">
|
<Compile Include="Program\ProgramSourceSetting.xaml.cs">
|
||||||
<DependentUpon>ProgramSourceSetting.xaml</DependentUpon>
|
<DependentUpon>ProgramSourceSetting.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ProgramSources\AppPathsProgramSource.cs" />
|
<Compile Include="Program\ProgramSources\AppPathsProgramSource.cs" />
|
||||||
<Compile Include="ProgramSources\CommonStartMenuProgramSource.cs" />
|
<Compile Include="Program\ProgramSources\CommonStartMenuProgramSource.cs" />
|
||||||
<Compile Include="ProgramSources\FileSystemFolderSourceShallow.cs" />
|
<Compile Include="Program\ProgramSources\FileSystemFolderSourceShallow.cs" />
|
||||||
<Compile Include="ProgramSources\PortableAppsProgramSource.cs" />
|
<Compile Include="Program\ProgramSources\PortableAppsProgramSource.cs" />
|
||||||
<Compile Include="IProgramSource.cs" />
|
<Compile Include="Program\IProgramSource.cs" />
|
||||||
<Compile Include="BaseSystemPlugin.cs" />
|
<Compile Include="BaseSystemPlugin.cs" />
|
||||||
<Compile Include="BrowserBookmarks.cs" />
|
<Compile Include="BrowserBookmarks.cs" />
|
||||||
<Compile Include="Calculator.cs" />
|
<Compile Include="Calculator.cs" />
|
||||||
<Compile Include="ProgramSources\FileSystemProgramSource.cs" />
|
<Compile Include="Program\ProgramSources\FileSystemProgramSource.cs" />
|
||||||
<Compile Include="ProgramSources\UserStartMenuProgramSource.cs" />
|
<Compile Include="Program\ProgramSources\UserStartMenuProgramSource.cs" />
|
||||||
<Compile Include="WebSearchesSetting.xaml.cs">
|
<Compile Include="WebSearch\WebSearchesSetting.xaml.cs">
|
||||||
<DependentUpon>WebSearchesSetting.xaml</DependentUpon>
|
<DependentUpon>WebSearchesSetting.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="WebSearchPlugin.cs" />
|
<Compile Include="WebSearch\WebSearchPlugin.cs" />
|
||||||
<Compile Include="CMD\CMD.cs" />
|
<Compile Include="CMD\CMD.cs" />
|
||||||
<Compile Include="DirectoryIndicator.cs" />
|
<Compile Include="DirectoryIndicator.cs" />
|
||||||
<Compile Include="ISystemPlugin.cs" />
|
<Compile Include="ISystemPlugin.cs" />
|
||||||
<Compile Include="Programs.cs" />
|
<Compile Include="Program\Programs.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Sys.cs" />
|
<Compile Include="Sys.cs" />
|
||||||
<Compile Include="ThirdpartyPluginIndicator.cs" />
|
<Compile Include="ThirdpartyPluginIndicator.cs" />
|
||||||
<Compile Include="SuggestionSources\Google.cs" />
|
<Compile Include="SuggestionSources\Google.cs" />
|
||||||
<Compile Include="SuggestionSources\ISuggestionSource.cs" />
|
<Compile Include="SuggestionSources\ISuggestionSource.cs" />
|
||||||
<Compile Include="WebSearchSetting.xaml.cs">
|
<Compile Include="WebSearch\WebSearchSetting.xaml.cs">
|
||||||
<DependentUpon>WebSearchSetting.xaml</DependentUpon>
|
<DependentUpon>WebSearchSetting.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -99,22 +99,19 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<Page Include="Program\ProgramSetting.xaml">
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="ProgramSetting.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ProgramSourceSetting.xaml">
|
<Page Include="Program\ProgramSourceSetting.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="WebSearchesSetting.xaml">
|
<Page Include="WebSearch\WebSearchesSetting.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="WebSearchSetting.xaml">
|
<Page Include="WebSearch\WebSearchSetting.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
Reference in New Issue
Block a user