mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Refactoring Refactoring icon, part 2
1. Add baidu, fix #576, #582 2. Refactoring
This commit is contained in:
@@ -1,12 +1,35 @@
|
||||
using System;
|
||||
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; }
|
||||
public string IconPath { get; set; }
|
||||
[NotNull]
|
||||
private string _icon = DefaultIcon;
|
||||
|
||||
[NotNull]
|
||||
public string Icon
|
||||
{
|
||||
get { return _icon; }
|
||||
set
|
||||
{
|
||||
_icon = value;
|
||||
IconPath = Path.Combine(WebSearchPlugin.PluginDirectory, WebSearchPlugin.ImageDirectory, value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// All icon should be put under Images directory
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
[JsonIgnore]
|
||||
internal string IconPath { get; private set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user