mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
Save icons using GUID filename
This commit is contained in:
parent
a5d63bc383
commit
10204a4526
@ -51,9 +51,9 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
|
||||
foreach (ControlPanelItem item in controlPanelItems)
|
||||
{
|
||||
if (!File.Exists(iconFolder + item.LocalizedString + fileType) && item.Icon != null)
|
||||
if (!File.Exists(iconFolder + item.GUID + fileType) && item.Icon != null)
|
||||
{
|
||||
item.Icon.ToBitmap().Save(iconFolder + item.LocalizedString + fileType);
|
||||
item.Icon.ToBitmap().Save(iconFolder + item.GUID + fileType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75,7 +75,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
Title = item.LocalizedString,
|
||||
SubTitle = item.InfoTip,
|
||||
Score = item.Score,
|
||||
IcoPath = "Images\\ControlPanelIcons\\" + item.LocalizedString + fileType,
|
||||
IcoPath = "Images\\ControlPanelIcons\\" + item.GUID + fileType,
|
||||
Action = e =>
|
||||
{
|
||||
try
|
||||
|
@ -8,16 +8,18 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
{
|
||||
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, ProcessStartInfo newExecutablePath, Icon newIcon)
|
||||
public ControlPanelItem(string newLocalizedString, string newInfoTip, string newGUID, ProcessStartInfo newExecutablePath, Icon newIcon)
|
||||
{
|
||||
LocalizedString = newLocalizedString;
|
||||
InfoTip = newInfoTip;
|
||||
ExecutablePath = newExecutablePath;
|
||||
Icon = newIcon;
|
||||
GUID = newGUID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||
|
||||
myIcon = getIcon(currentKey, size);
|
||||
|
||||
controlPanelItems.Add(new ControlPanelItem(localizedString, infoTip, executablePath, myIcon));
|
||||
controlPanelItems.Add(new ControlPanelItem(localizedString, infoTip, key, executablePath, myIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user