mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 20:19:17 +08:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System.IO;
|
|
using JetBrains.Annotations;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace Wox.Plugin.WebSearch
|
|
{
|
|
public class WebSearch
|
|
{
|
|
public const string DefaultIcon = "web_search.png";
|
|
public string Title { get; set; }
|
|
public string ActionKeyword { get; set; }
|
|
[NotNull]
|
|
private string _icon = DefaultIcon;
|
|
|
|
[NotNull]
|
|
public string Icon
|
|
{
|
|
get { return _icon; }
|
|
set
|
|
{
|
|
_icon = value;
|
|
IconPath = Path.Combine(Main.PluginDirectory, Main.ImageDirectory, value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// All icon should be put under Images directory
|
|
/// </summary>
|
|
[NotNull]
|
|
[JsonIgnore]
|
|
internal string IconPath { get; private set; } = Path.Combine
|
|
(
|
|
Main.PluginDirectory, Main.ImageDirectory, DefaultIcon
|
|
);
|
|
|
|
public string Url { get; set; }
|
|
public bool Enabled { get; set; }
|
|
}
|
|
} |