From 7297c1be39af7865d833c0767841cf3c6115602e Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 2 Dec 2021 22:00:21 +1100 Subject: [PATCH] remove ControlPanel plugin --- Flow.Launcher.sln | 16 - .../ControlPanelItem.cs | 25 -- .../ControlPanelList.cs | 339 ------------------ .../Flow.Launcher.Plugin.ControlPanel.csproj | 58 --- .../Images/ControlPanel.png | Bin 1373 -> 0 bytes .../Languages/de.xaml | 8 - .../Languages/en.xaml | 8 - .../Languages/pl.xaml | 8 - .../Languages/sk.xaml | 8 - .../Languages/tr.xaml | 8 - .../Languages/zh-cn.xaml | 8 - .../Languages/zh-tw.xaml | 8 - .../Flow.Launcher.Plugin.ControlPanel/Main.cs | 99 ----- .../plugin.json | 12 - 14 files changed, 605 deletions(-) delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelItem.cs delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelList.cs delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Flow.Launcher.Plugin.ControlPanel.csproj delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Images/ControlPanel.png delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/de.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/en.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/pl.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/sk.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/tr.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-cn.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-tw.xaml delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/Main.cs delete mode 100644 Plugins/Flow.Launcher.Plugin.ControlPanel/plugin.json diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index ef4a0519e..b8deae553 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{3A73 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher", "Flow.Launcher\Flow.Launcher.csproj", "{DB90F671-D861-46BB-93A3-F1304F5BA1C5}" ProjectSection(ProjectDependencies) = postProject - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} = {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} {4792A74A-0CEA-4173-A8B2-30E6764C6217} = {4792A74A-0CEA-4173-A8B2-30E6764C6217} {FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {FDB3555B-58EF-4AE6-B5F1-904719637AB4} @@ -36,8 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Progra EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.WebSearch", "Plugins\Flow.Launcher.Plugin.WebSearch\Flow.Launcher.Plugin.WebSearch.csproj", "{403B57F2-1856-4FC7-8A24-36AB346B763E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.ControlPanel", "Plugins\Flow.Launcher.Plugin.ControlPanel\Flow.Launcher.Plugin.ControlPanel.csproj", "{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.PluginIndicator", "Plugins\Flow.Launcher.Plugin.PluginIndicator\Flow.Launcher.Plugin.PluginIndicator.csproj", "{FDED22C8-B637-42E8-824A-63B5B6E05A3A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Sys", "Plugins\Flow.Launcher.Plugin.Sys\Flow.Launcher.Plugin.Sys.csproj", "{0B9DE348-9361-4940-ADB6-F5953BFFCCEC}" @@ -165,18 +162,6 @@ Global {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x64.Build.0 = Release|Any CPU {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.ActiveCfg = Release|Any CPU {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.Build.0 = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.ActiveCfg = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.Build.0 = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.ActiveCfg = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.Build.0 = Debug|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.Build.0 = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.ActiveCfg = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.Build.0 = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.ActiveCfg = Release|Any CPU - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.Build.0 = Release|Any CPU {FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -305,7 +290,6 @@ Global GlobalSection(NestedProjects) = preSolution {FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {403B57F2-1856-4FC7-8A24-36AB346B763E} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {FDED22C8-B637-42E8-824A-63B5B6E05A3A} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {A3DCCBCA-ACC1-421D-B16E-210896234C26} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelItem.cs b/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelItem.cs deleted file mode 100644 index d821107b6..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelItem.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Diagnostics; -using System.Drawing; - -namespace Flow.Launcher.Plugin.ControlPanel -{ - //from:https://raw.githubusercontent.com/CoenraadS/Windows-Control-Panel-Items - public class ControlPanelItem - { - public string LocalizedString { get; private set; } - public string InfoTip { get; private set; } - public string GUID { get; private set; } - public ProcessStartInfo ExecutablePath { get; private set; } - public Icon Icon { get; private set; } - public int Score { get; set; } - - public ControlPanelItem(string newLocalizedString, string newInfoTip, string newGUID, ProcessStartInfo newExecutablePath, Icon newIcon) - { - LocalizedString = newLocalizedString; - InfoTip = newInfoTip; - ExecutablePath = newExecutablePath; - Icon = newIcon; - GUID = newGUID; - } - } -} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelList.cs b/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelList.cs deleted file mode 100644 index 70afda536..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/ControlPanelList.cs +++ /dev/null @@ -1,339 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Text; -using Microsoft.Win32; - -namespace Flow.Launcher.Plugin.ControlPanel -{ - //from:https://raw.githubusercontent.com/CoenraadS/Windows-Control-Panel-Items - public static class ControlPanelList - { - private const uint GROUP_ICON = 14; - private const uint LOAD_LIBRARY_AS_DATAFILE = 0x00000002; - private const string CONTROL = @"%SystemRoot%\System32\control.exe"; - - private delegate bool EnumResNameDelegate( - IntPtr hModule, - IntPtr lpszType, - IntPtr lpszName, - IntPtr lParam); - - [DllImport("kernel32.dll", EntryPoint = "EnumResourceNamesW", CharSet = CharSet.Unicode, SetLastError = true)] - static extern bool EnumResourceNamesWithID(IntPtr hModule, uint lpszType, EnumResNameDelegate lpEnumFunc, IntPtr lParam); - - [DllImport("kernel32.dll", SetLastError = true)] - static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags); - - [DllImport("kernel32.dll", SetLastError = true)] - static extern bool FreeLibrary(IntPtr hModule); - - [DllImport("user32.dll", CharSet = CharSet.Auto)] - static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] - static extern IntPtr LoadImage(IntPtr hinst, IntPtr lpszName, uint uType, - int cxDesired, int cyDesired, uint fuLoad); - - [DllImport("user32.dll", CharSet = CharSet.Auto)] - static extern bool DestroyIcon(IntPtr handle); - - [DllImport("kernel32.dll")] - static extern IntPtr FindResource(IntPtr hModule, IntPtr lpName, IntPtr lpType); - - static IntPtr defaultIconPtr; - - - static RegistryKey nameSpace = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); - static RegistryKey clsid = Registry.ClassesRoot.OpenSubKey("CLSID"); - - public static List Create(uint iconSize) - { - int size = (int)iconSize; - RegistryKey currentKey; - ProcessStartInfo executablePath; - List controlPanelItems = new List(); - string localizedString; - string infoTip; - Icon myIcon; - - foreach (string key in nameSpace.GetSubKeyNames()) - { - currentKey = clsid.OpenSubKey(key); - if (currentKey != null) - { - executablePath = getExecutablePath(currentKey); - - if (!(executablePath == null)) //Cannot have item without executable path - { - localizedString = getLocalizedString(currentKey); - - if (!string.IsNullOrEmpty(localizedString))//Cannot have item without Title - { - infoTip = getInfoTip(currentKey); - - myIcon = getIcon(currentKey, size); - - controlPanelItems.Add(new ControlPanelItem(localizedString, infoTip, key, executablePath, myIcon)); - } - } - } - } - - return controlPanelItems; - } - - private static ProcessStartInfo getExecutablePath(RegistryKey currentKey) - { - ProcessStartInfo executablePath = new ProcessStartInfo(); - string applicationName; - - if (currentKey.GetValue("System.ApplicationName") != null) - { - //CPL Files (usually native MS items) - applicationName = currentKey.GetValue("System.ApplicationName").ToString(); - executablePath.FileName = Environment.ExpandEnvironmentVariables(CONTROL); - executablePath.Arguments = "-name " + applicationName; - } - else if (currentKey.OpenSubKey("Shell\\Open\\Command") != null && currentKey.OpenSubKey("Shell\\Open\\Command").GetValue(null) != null) - { - //Other files (usually third party items) - string input = "\"" + Environment.ExpandEnvironmentVariables(currentKey.OpenSubKey("Shell\\Open\\Command").GetValue(null).ToString()) + "\""; - executablePath.FileName = "cmd.exe"; - executablePath.Arguments = "/C " + input; - executablePath.WindowStyle = ProcessWindowStyle.Hidden; - } - else - { - return null; - } - - return executablePath; - } - - private static string getLocalizedString(RegistryKey currentKey) - { - IntPtr dataFilePointer; - string[] localizedStringRaw; - uint stringTableIndex; - StringBuilder resource; - string localizedString; - - if (currentKey.GetValue("LocalizedString") != null) - { - localizedStringRaw = currentKey.GetValue("LocalizedString").ToString().Split(new[] { ",-" }, StringSplitOptions.None); - - if (localizedStringRaw.Length > 1) - { - if (localizedStringRaw[0][0] == '@') - { - localizedStringRaw[0] = localizedStringRaw[0].Substring(1); - } - - localizedStringRaw[0] = Environment.ExpandEnvironmentVariables(localizedStringRaw[0]); - - dataFilePointer = LoadLibraryEx(localizedStringRaw[0], IntPtr.Zero, LOAD_LIBRARY_AS_DATAFILE); //Load file with strings - - stringTableIndex = sanitizeUint(localizedStringRaw[1]); - - resource = new StringBuilder(255); - LoadString(dataFilePointer, stringTableIndex, resource, resource.Capacity + 1); //Extract needed string - FreeLibrary(dataFilePointer); - - localizedString = resource.ToString(); - - //Some apps don't return a string, although they do have a stringIndex. Use Default value. - - if (String.IsNullOrEmpty(localizedString)) - { - if (currentKey.GetValue(null) != null) - { - localizedString = currentKey.GetValue(null).ToString(); - } - else - { - return null; //Cannot have item without title. - } - } - } - else - { - localizedString = localizedStringRaw[0]; - } - } - else if (currentKey.GetValue(null) != null) - { - localizedString = currentKey.GetValue(null).ToString(); - } - else - { - return null; //Cannot have item without title. - } - return localizedString; - } - - private static string getInfoTip(RegistryKey currentKey) - { - IntPtr dataFilePointer; - string[] infoTipRaw; - uint stringTableIndex; - StringBuilder resource; - string infoTip = ""; - - if (currentKey.GetValue("InfoTip") != null) - { - infoTipRaw = currentKey.GetValue("InfoTip").ToString().Split(new[] { ",-" }, StringSplitOptions.None); - - if (infoTipRaw.Length == 2) - { - if (infoTipRaw[0][0] == '@') - { - infoTipRaw[0] = infoTipRaw[0].Substring(1); - } - infoTipRaw[0] = Environment.ExpandEnvironmentVariables(infoTipRaw[0]); - - dataFilePointer = LoadLibraryEx(infoTipRaw[0], IntPtr.Zero, LOAD_LIBRARY_AS_DATAFILE); //Load file with strings - - stringTableIndex = sanitizeUint(infoTipRaw[1]); - - resource = new StringBuilder(255); - LoadString(dataFilePointer, stringTableIndex, resource, resource.Capacity + 1); //Extract needed string - FreeLibrary(dataFilePointer); - - infoTip = resource.ToString(); - } - else - { - infoTip = currentKey.GetValue("InfoTip").ToString(); - } - } - else - { - infoTip = ""; - } - - return infoTip; - } - - private static Icon getIcon(RegistryKey currentKey, int iconSize) - { - IntPtr iconPtr = IntPtr.Zero; - List iconString; - IntPtr dataFilePointer; - IntPtr iconIndex; - Icon myIcon = null; - - if (currentKey.OpenSubKey("DefaultIcon") != null) - { - if (currentKey.OpenSubKey("DefaultIcon").GetValue(null) != null) - { - iconString = new List(currentKey.OpenSubKey("DefaultIcon").GetValue(null).ToString().Split(new[] { ',' }, 2)); - if (string.IsNullOrEmpty(iconString[0])) - { - // fallback to default icon - return null; - } - - if (iconString[0][0] == '@') - { - iconString[0] = iconString[0].Substring(1); - } - - dataFilePointer = LoadLibraryEx(iconString[0], IntPtr.Zero, LOAD_LIBRARY_AS_DATAFILE); - - if (iconString.Count == 2) - { - iconIndex = (IntPtr)sanitizeUint(iconString[1]); - - iconPtr = LoadImage(dataFilePointer, iconIndex, 1, iconSize, iconSize, 0); - } - - if (iconPtr == IntPtr.Zero) - { - defaultIconPtr = IntPtr.Zero; - EnumResourceNamesWithID(dataFilePointer, GROUP_ICON, EnumRes, IntPtr.Zero); //Iterate through resources. - - iconPtr = LoadImage(dataFilePointer, defaultIconPtr, 1, iconSize, iconSize, 0); - } - - FreeLibrary(dataFilePointer); - - if (iconPtr != IntPtr.Zero) - { - try - { - myIcon = Icon.FromHandle(iconPtr); - myIcon = (Icon)myIcon.Clone(); //Remove pointer dependancy. - } - catch - { - //Silently fail for now. - } - } - } - } - - if (iconPtr != IntPtr.Zero) - { - DestroyIcon(iconPtr); - } - return myIcon; - } - - private static uint sanitizeUint(string args) //Remove all chars before and after first set of digits. - { - int x = 0; - - while (x < args.Length && !Char.IsDigit(args[x])) - { - args = args.Substring(1); - } - - x = 0; - - while (x < args.Length && Char.IsDigit(args[x])) - { - x++; - } - - if (x < args.Length) - { - args = args.Remove(x); - } - - /*If the logic is correct, this should never through an exception. - * If there is an exception, then need to analyze what the input is. - * Returning the wrong number will cause more errors */ - return Convert.ToUInt32(args); - } - - private static bool IS_INTRESOURCE(IntPtr value) - { - if (((uint)value) > ushort.MaxValue) - return false; - return true; - } - - private static uint GET_RESOURCE_ID(IntPtr value) - { - if (IS_INTRESOURCE(value)) - return (uint)value; - throw new NotSupportedException("value is not an ID!"); - } - - private static string GET_RESOURCE_NAME(IntPtr value) - { - if (IS_INTRESOURCE(value)) - return value.ToString(); - return Marshal.PtrToStringUni(value); - } - - private static bool EnumRes(IntPtr hModule, IntPtr lpszType, IntPtr lpszName, IntPtr lParam) - { - defaultIconPtr = lpszName; - return false; - } - } -} diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Flow.Launcher.Plugin.ControlPanel.csproj b/Plugins/Flow.Launcher.Plugin.ControlPanel/Flow.Launcher.Plugin.ControlPanel.csproj deleted file mode 100644 index ff4a10d69..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Flow.Launcher.Plugin.ControlPanel.csproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - Library - net5.0-windows - {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} - Properties - Flow.Launcher.Plugin.ControlPanel - Flow.Launcher.Plugin.ControlPanel - true - false - false - - - - true - portable - false - ..\..\Output\Debug\Plugins\Flow.Launcher.Plugin.ControlPanel\ - DEBUG;TRACE - prompt - 4 - false - - - - pdbonly - true - ..\..\Output\Release\Plugins\Flow.Launcher.Plugin.ControlPanel\ - TRACE - prompt - 4 - false - - - - - PreserveNewest - - - - - - - - - - - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Images/ControlPanel.png b/Plugins/Flow.Launcher.Plugin.ControlPanel/Images/ControlPanel.png deleted file mode 100644 index 1a69112f39e84b5d9f636856c567c00717b7241a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1373 zcmV-j1)}2sI zX-vAPHBC*^q-pB1x5Pi78{4>RyKB1W#!VAbX*4yxX>5s#iVV-) zpc4^hm>UiyJgYC?d(Qhl&pGG$zW19E5{U$B0b;QU6bkD?RvXrZtTwC}Arios-(CG6 zLAJA%jkK!7#mk#!-f4LJ*$oSI?U-4Cmz>CD*N@pyt8w+0y)^fTt4CK`=#s`CtU zl7>lZB{L1J$RB=$s4mWWkx|w0CjmMx-sb7_EV3+9SLeWJG(acRY^|p<9Om)03rya+ zLgeHrEREY!=JJj{;q1?y854Zt$hPD-G!x-KOI>b41_u3{>*&H}E2E{Q0rg8yTxT?5 ztF6W1bmHylW#aUwJb3Rj9PLMz%x5n*aqR6q84HQb%_YZLvnl0uX@$(rM!0aPo2sgf zR99D}Ehwr~)HH5Kr`HiZ`z@i?R&?dIMb~MyYN|GtEyq7=q&53*f80fqG*ne>%s8RL z>BMX{pq%+CZ*tinrI4wqAa2hioK7c#AY_%ax?w97BX6T~eEuo4S`7w6 zN!CgACKE!5k(oQUG1hHa5X;o;meLZMU9}75ax%Nm{}hA4ux!DRo?cXH&7yfB7A4`i zw`e|7v&Rz&V)6Kbxtz@YWMT%LPM5aWNZUIpW0R9p1UHmX@zVTCnLVYDveFU;ho7ds zd8F-F%2-cNFPm!2xiiZWDa|h1%_xeJb7DnNknOKdNXj=N+bx8{5fo)6Yr`wb4B>DD z*=|`Bd*wU3#j=5VX9XUQhvw#{jF;dS;e*@w;itdxdPkSt z*`LGf9VHfvaQNW1CF4ce+4Xu2?T4E1dPnK&a}$lGKGH{{G5Y%4c)g>vA8JCcU%Vu* zB$jO&w`{U=;`n|#F5afAs|#6{F><-7gRbC@6}8&*#Hz(sSbYer#pN6({~OGHT;( zWk%kAcYpFc(%=6m`F7N535VUpzTI1B-LVN#Oz)+1W`EJxOChf|{y9WZz}2!DSIcH# z{)7l%wPd%Vr8E1B#$F0Jn>`(}6_6xT472~Aux5m;$S(!sJ|B;UhZ!I9F)=mfIuL?!-0OfJO8D=sfnGhA3%}{ zSH57GrY9%({oFZJz~0@vuv!=PSrxJam~ZcU?zuTXG{l=nk7BZx7NmYsNH7>?{BioW zJrxp(IR9KYk4`P&YTcQ(FSA-LwC#0q?Z!?1{N+6R+TTJDa9v$n-;q%(AC#Pe#q9APDSiZshXSPX7A!5*kxwPIUo9QHTNv`To!T$rs<)<7)N8 zmK}{M`Pt`_DSW;$x^CT>6Qj|}@4x;$x2O0Fc`v_ljpS0P#5udYJnMVy_HtAzaW1Zr zT>0`SgxOtMomMq)e=w(;wK}aT7!10Aj(kWILWmd+g|6Qp9Lg(4z9jPY$ZElwX;IdN ftTwC*S#9_az!9QQE$iOu00000NkvXXu0mjfopF^M diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/de.xaml deleted file mode 100644 index d4bda14ac..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/de.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - Systemsteuerung - Suche in der Systemsteuerung - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/en.xaml deleted file mode 100644 index 70b046174..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/en.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - Control Panel - Search within the Control Panel - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/pl.xaml deleted file mode 100644 index 1b731120e..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/pl.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - Panel sterowania - Szybie wyszukiwanie ustawień w panelu sterowania - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/sk.xaml deleted file mode 100644 index 3b9249b78..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/sk.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - Ovládací panel - Vyhľadáva položky Ovládacieho panela - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/tr.xaml deleted file mode 100644 index 7564b5c95..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/tr.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - Denetim Masası - Denetim Masası'nda arama yapın. - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-cn.xaml deleted file mode 100644 index 35d45260d..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-cn.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - 控制面板 - 搜索控制面板 - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-tw.xaml deleted file mode 100644 index daa97d4a3..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Languages/zh-tw.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - 控制台 - 搜尋控制台 - - diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/Main.cs b/Plugins/Flow.Launcher.Plugin.ControlPanel/Main.cs deleted file mode 100644 index 9a721cc17..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/Main.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Flow.Launcher.Infrastructure; - -namespace Flow.Launcher.Plugin.ControlPanel -{ - public class Main : IPlugin, IPluginI18n - { - private PluginInitContext context; - private List controlPanelItems = new List(); - private string iconFolder; - private string fileType; - - public void Init(PluginInitContext context) - { - this.context = context; - controlPanelItems = ControlPanelList.Create(48); - iconFolder = Path.Combine(context.CurrentPluginMetadata.PluginDirectory, @"Images\ControlPanelIcons\"); - fileType = ".bmp"; - - if (!Directory.Exists(iconFolder)) - { - Directory.CreateDirectory(iconFolder); - } - - foreach (ControlPanelItem item in controlPanelItems) - { - if (!File.Exists(iconFolder + item.GUID + fileType) && item.Icon != null) - { - item.Icon.ToBitmap().Save(iconFolder + item.GUID + fileType); - } - } - } - - public List Query(Query query) - { - List results = new List(); - - foreach (var item in controlPanelItems) - { - var titleMatch = StringMatcher.FuzzySearch(query.Search, item.LocalizedString); - var subTitleMatch = StringMatcher.FuzzySearch(query.Search, item.InfoTip); - - item.Score = Math.Max(titleMatch.Score, subTitleMatch.Score); - if (item.Score > 0) - { - var result = new Result - { - Title = item.LocalizedString, - SubTitle = item.InfoTip, - Score = item.Score, - IcoPath = Path.Combine(context.CurrentPluginMetadata.PluginDirectory, - @"Images\\ControlPanelIcons\\" + item.GUID + fileType), - Action = e => - { - try - { - Process.Start(item.ExecutablePath); - } - catch (Exception) - { - //Silently Fail for now.. todo - } - return true; - } - }; - - if (item.Score == titleMatch.Score) - { - result.TitleHighlightData = titleMatch.MatchData; - } - else - { - result.SubTitleHighlightData = subTitleMatch.MatchData; - } - - results.Add(result); - } - } - - List panelItems = results.OrderByDescending(o => o.Score).Take(5).ToList(); - return panelItems; - } - - public string GetTranslatedPluginTitle() - { - return context.API.GetTranslation("flowlauncher_plugin_controlpanel_plugin_name"); - } - - public string GetTranslatedPluginDescription() - { - return context.API.GetTranslation("flowlauncher_plugin_controlpanel_plugin_description"); - } - } -} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ControlPanel/plugin.json b/Plugins/Flow.Launcher.Plugin.ControlPanel/plugin.json deleted file mode 100644 index 23f35e9ac..000000000 --- a/Plugins/Flow.Launcher.Plugin.ControlPanel/plugin.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ID": "209621585B9B4D81813913C507C058C6", - "ActionKeyword": "*", - "Name": "Control Panel", - "Description": "Search within the Control Panel.", - "Author": "CoenraadS", - "Version": "1.1.2", - "Language": "csharp", - "Website": "https://github.com/Flow-Launcher/Flow.Launcher", - "ExecuteFileName": "Flow.Launcher.Plugin.ControlPanel.dll", - "IcoPath": "Images\\ControlPanel.png" -}