|
|
|
@ -7,8 +7,102 @@ using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace STranslate.Model
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class Hotkeys
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("inputTranslate")]
|
|
|
|
|
public InputTranslate InputTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("crosswordTranslate")]
|
|
|
|
|
public CrosswordTranslate CrosswordTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("screenShotTranslate")]
|
|
|
|
|
public ScreenShotTranslate ScreenShotTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("openMainWindow")]
|
|
|
|
|
public OpenMainWindow OpenMainWindow { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class InputTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class CrosswordTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class ScreenShotTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class OpenMainWindow
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class Server
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("name")]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("api")]
|
|
|
|
|
public string Api { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class ConfigModel
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 最大历史记录数量
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("maxHistoryCount")]
|
|
|
|
|
public int MaxHistoryCount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 自动识别语种标度
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("autoScale")]
|
|
|
|
|
public double AutoScale { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 取词间隔
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("wordPickupInterval")]
|
|
|
|
|
public double WordPickupInterval { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否亮色模式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("isBright")]
|
|
|
|
|
public bool IsBright { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("sourceLanguage")]
|
|
|
|
|
public string SourceLanguage { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("targetLanguage")]
|
|
|
|
|
public string TargetLanguage { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("selectServer")]
|
|
|
|
|
public int SelectServer { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("servers")]
|
|
|
|
|
public Server[] Servers { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 热键
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("hotkeys")]
|
|
|
|
|
public Hotkeys Hotkeys { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ConfigModel()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
@ -75,99 +169,5 @@ namespace STranslate.Model
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 最大历史记录数量
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("maxHistoryCount")]
|
|
|
|
|
public int MaxHistoryCount { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 自动识别语种标度
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("autoScale")]
|
|
|
|
|
public double AutoScale { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 取词间隔
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("wordPickupInterval")]
|
|
|
|
|
public double WordPickupInterval { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否亮色模式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("isBright")]
|
|
|
|
|
public bool IsBright { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("sourceLanguage")]
|
|
|
|
|
public string SourceLanguage { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("targetLanguage")]
|
|
|
|
|
public string TargetLanguage { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("selectServer")]
|
|
|
|
|
public int SelectServer { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("servers")]
|
|
|
|
|
public Server[] Servers { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 热键
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("hotkeys")]
|
|
|
|
|
public Hotkeys Hotkeys { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Hotkeys
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("inputTranslate")]
|
|
|
|
|
public InputTranslate InputTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("crosswordTranslate")]
|
|
|
|
|
public CrosswordTranslate CrosswordTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("screenShotTranslate")]
|
|
|
|
|
public ScreenShotTranslate ScreenShotTranslate { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("openMainWindow")]
|
|
|
|
|
public OpenMainWindow OpenMainWindow { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class InputTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class CrosswordTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class ScreenShotTranslate
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class OpenMainWindow
|
|
|
|
|
{
|
|
|
|
|
public byte Modifiers { get; set; }
|
|
|
|
|
public int Key { get; set; }
|
|
|
|
|
public String Text { get; set; }
|
|
|
|
|
public bool Conflict { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class Server
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("name")]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("api")]
|
|
|
|
|
public string Api { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|