2020-03-30 17:02:25 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.Json;
|
2020-04-02 21:08:56 +08:00
|
|
|
|
using System.Text.Json.Serialization;
|
2020-03-30 17:02:25 +08:00
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public class PowerPreviewSettings : BasePTModuleSettings
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public PowerPreviewProperties properties { get; set; }
|
2020-03-30 17:02:25 +08:00
|
|
|
|
|
|
|
|
|
public PowerPreviewSettings()
|
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
this.properties = new PowerPreviewProperties();
|
2020-03-30 17:02:25 +08:00
|
|
|
|
this.version = "1";
|
|
|
|
|
this.name = "_unset_";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PowerPreviewSettings(string ptName)
|
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
this.properties = new PowerPreviewProperties();
|
2020-03-30 17:02:25 +08:00
|
|
|
|
this.version = "1";
|
|
|
|
|
this.name = ptName;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public override string ToJsonString()
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
return JsonSerializer.Serialize(this);
|
2020-03-30 17:02:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public class PowerPreviewProperties
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public BoolProperty IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL { get; set; }
|
|
|
|
|
public BoolProperty PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID { get; set; }
|
|
|
|
|
|
|
|
|
|
public PowerPreviewProperties()
|
|
|
|
|
{
|
|
|
|
|
this.IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL = new BoolProperty();
|
|
|
|
|
this.PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID = new BoolProperty();
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-30 17:02:25 +08:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public class SndPowerPreviewSettings
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
[JsonPropertyName("File Explorer Preview")]
|
|
|
|
|
public PowerPreviewSettings File_Explorer_Preview { get; set; }
|
2020-03-30 17:02:25 +08:00
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public SndPowerPreviewSettings(PowerPreviewSettings settings)
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
2020-04-02 21:08:56 +08:00
|
|
|
|
this.File_Explorer_Preview = settings;
|
2020-03-30 17:02:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public string ToJsonString()
|
2020-03-30 17:02:25 +08:00
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|