InkCanvasForClass/Ink Canvas/Settings.cs

266 lines
11 KiB
C#
Raw Normal View History

2021-09-12 18:28:26 +08:00
using Newtonsoft.Json;
namespace Ink_Canvas
{
public class Settings
{
[JsonProperty("advanced")]
public Advanced Advanced { get; set; } = new Advanced();
2021-10-14 01:22:37 +08:00
[JsonProperty("appearance")]
public Appearance Appearance { get; set; } = new Appearance();
[JsonProperty("automation")]
public Automation Automation { get; set; } = new Automation();
[JsonProperty("behavior")]
public PowerPointSettings PowerPointSettings { get; set; } = new PowerPointSettings();
[JsonProperty("canvas")]
public Canvas Canvas { get; set; } = new Canvas();
2021-09-25 22:58:50 +08:00
[JsonProperty("gesture")]
public Gesture Gesture { get; set; } = new Gesture();
[JsonProperty("inkToShape")]
public InkToShape InkToShape { get; set; } = new InkToShape();
2021-09-12 18:28:26 +08:00
[JsonProperty("startup")]
public Startup Startup { get; set; } = new Startup();
2023-12-22 00:14:15 +08:00
[JsonProperty("randSettings")]
public RandSettings RandSettings { get; set; } = new RandSettings();
2021-09-12 18:28:26 +08:00
}
2023-05-08 19:58:14 +08:00
public class Canvas
{
[JsonProperty("inkWidth")]
public double InkWidth { get; set; } = 2.5;
2021-09-25 13:38:27 +08:00
[JsonProperty("isShowCursor")]
public bool IsShowCursor { get; set; } = false;
2021-10-14 01:22:37 +08:00
[JsonProperty("inkStyle")]
public int InkStyle { get; set; } = 0;
[JsonProperty("eraserSize")]
public int EraserSize { get; set; } = 2;
2023-07-15 15:28:10 +08:00
[JsonProperty("eraserType")]
public int EraserType { get; set; } = 0; // 0 - 图标切换模式 1 - 面积擦 2 - 线条擦
[JsonProperty("hideStrokeWhenSelecting")]
public bool HideStrokeWhenSelecting { get; set; } = true;
2023-04-05 16:05:03 +08:00
[JsonProperty("usingWhiteboard")]
public bool UsingWhiteboard { get; set; }
2023-05-08 20:37:55 +08:00
[JsonProperty("hyperbolaAsymptoteOption")]
public OptionalOperation HyperbolaAsymptoteOption { get; set; } = OptionalOperation.Ask;
}
public enum OptionalOperation
{
Yes,
No,
Ask
}
2021-09-25 22:58:50 +08:00
public class Gesture
{
[JsonIgnore]
public bool IsEnableTwoFingerGesture => IsEnableTwoFingerZoom || IsEnableTwoFingerTranslate || IsEnableTwoFingerRotation;
2023-12-22 00:14:15 +08:00
[JsonIgnore]
public bool IsEnableTwoFingerGestureTranslateOrRotation => IsEnableTwoFingerTranslate || IsEnableTwoFingerRotation;
2022-07-11 08:50:22 +08:00
[JsonProperty("isEnableTwoFingerZoom")]
public bool IsEnableTwoFingerZoom { get; set; } = true;
[JsonProperty("isEnableTwoFingerTranslate")]
public bool IsEnableTwoFingerTranslate { get; set; } = true;
2023-12-22 00:14:15 +08:00
[JsonProperty("AutoSwitchTwoFingerGesture")]
public bool AutoSwitchTwoFingerGesture { get; set; } = true;
2021-09-25 22:58:50 +08:00
[JsonProperty("isEnableTwoFingerRotation")]
public bool IsEnableTwoFingerRotation { get; set; } = false;
2021-12-12 00:32:33 +08:00
[JsonProperty("isEnableTwoFingerRotationOnSelection")]
public bool IsEnableTwoFingerRotationOnSelection { get; set; } = false;
2021-09-25 22:58:50 +08:00
}
2021-09-12 18:28:26 +08:00
public class Startup
{
2023-12-22 00:14:15 +08:00
[JsonProperty("isAutoUpdate")]
public bool IsAutoUpdate { get; set; } = true;
[JsonProperty("isAutoUpdateWithProxy")]
public bool IsAutoUpdateWithProxy { get; set; } = false;
[JsonProperty("autoUpdateProxy")]
public string AutoUpdateProxy { get; set; } = "https://mirror.ghproxy.com/";
[JsonProperty("isAutoUpdateWithSilence")]
public bool IsAutoUpdateWithSilence { get; set; } = false;
[JsonProperty("isAutoUpdateWithSilenceStartTime")]
public string AutoUpdateWithSilenceStartTime { get; set; } = "00:00";
[JsonProperty("isAutoUpdateWithSilenceEndTime")]
public string AutoUpdateWithSilenceEndTime { get; set; } = "00:00";
[JsonProperty("isEnableNibMode")]
public bool IsEnableNibMode { get; set; } = false;
/*
2021-09-12 18:28:26 +08:00
[JsonProperty("isAutoHideCanvas")]
2021-11-21 12:48:21 +08:00
public bool IsAutoHideCanvas { get; set; } = true;
2021-09-12 18:28:26 +08:00
[JsonProperty("isAutoEnterModeFinger")]
2023-12-22 00:14:15 +08:00
public bool IsAutoEnterModeFinger { get; set; } = false;*/
2021-09-12 18:28:26 +08:00
}
public class Appearance
{
2023-12-22 00:14:15 +08:00
[JsonProperty("isEnableDisPlayNibModeToggler")]
public bool IsEnableDisPlayNibModeToggler { get; set; } = true;
[JsonProperty("isColorfulViewboxFloatingBar")]
public bool IsColorfulViewboxFloatingBar { get; set; } = false;
[JsonProperty("enableViewboxFloatingBarScaleTransform")]
public bool EnableViewboxFloatingBarScaleTransform { get; set; } = false;
[JsonProperty("enableViewboxBlackBoardScaleTransform")]
public bool EnableViewboxBlackBoardScaleTransform { get; set; } = false;
2021-09-25 13:38:27 +08:00
[JsonProperty("isTransparentButtonBackground")]
public bool IsTransparentButtonBackground { get; set; } = true;
2021-09-12 18:28:26 +08:00
[JsonProperty("isShowExitButton")]
public bool IsShowExitButton { get; set; } = true;
[JsonProperty("isShowEraserButton")]
public bool IsShowEraserButton { get; set; } = true;
[JsonProperty("isShowHideControlButton")]
public bool IsShowHideControlButton { get; set; } = false;
2021-09-12 18:28:26 +08:00
[JsonProperty("isShowLRSwitchButton")]
public bool IsShowLRSwitchButton { get; set; } = false;
[JsonProperty("isShowModeFingerToggleSwitch")]
2021-09-12 18:28:26 +08:00
public bool IsShowModeFingerToggleSwitch { get; set; } = true;
[JsonProperty("theme")]
public int Theme { get; set; } = 0;
}
public class PowerPointSettings
{
[JsonProperty("isShowPPTNavigation")]
public bool IsShowPPTNavigation { get; set; } = true;
2023-12-22 00:14:15 +08:00
[JsonProperty("isShowBottomPPTNavigationPanel")]
public bool IsShowBottomPPTNavigationPanel { get; set; } = true;
[JsonProperty("isShowSidePPTNavigationPanel")]
public bool IsShowSidePPTNavigationPanel { get; set; } = true;
[JsonProperty("powerPointSupport")]
public bool PowerPointSupport { get; set; } = true;
[JsonProperty("isShowCanvasAtNewSlideShow")]
public bool IsShowCanvasAtNewSlideShow { get; set; } = true;
[JsonProperty("isNoClearStrokeOnSelectWhenInPowerPoint")]
public bool IsNoClearStrokeOnSelectWhenInPowerPoint { get; set; } = true;
[JsonProperty("isShowStrokeOnSelectInPowerPoint")]
public bool IsShowStrokeOnSelectInPowerPoint { get; set; } = false;
[JsonProperty("isAutoSaveStrokesInPowerPoint")]
public bool IsAutoSaveStrokesInPowerPoint { get; set; } = true;
[JsonProperty("isAutoSaveScreenShotInPowerPoint")]
public bool IsAutoSaveScreenShotInPowerPoint { get; set; } = false;
[JsonProperty("isNotifyPreviousPage")]
public bool IsNotifyPreviousPage { get; set; } = false;
[JsonProperty("isNotifyHiddenPage")]
public bool IsNotifyHiddenPage { get; set; } = true;
[JsonProperty("isEnableTwoFingerGestureInPresentationMode")]
public bool IsEnableTwoFingerGestureInPresentationMode { get; set; } = false;
[JsonProperty("isEnableFingerGestureSlideShowControl")]
public bool IsEnableFingerGestureSlideShowControl { get; set; } = true;
2023-06-05 19:42:23 +08:00
[JsonProperty("isSupportWPS")]
public bool IsSupportWPS { get; set; } = true;
2021-09-12 18:28:26 +08:00
}
2023-05-08 19:58:14 +08:00
2021-10-14 01:22:37 +08:00
public class Automation
{
2023-12-22 00:14:15 +08:00
[JsonIgnore]
public bool IsEnableAutoFold =>
IsAutoFoldInEasiNote
|| IsAutoFoldInEasiCamera
|| IsAutoFoldInEasiNote3C
|| IsAutoFoldInSeewoPincoTeacher
|| IsAutoFoldInHiteTouchPro
|| IsAutoFoldInHiteCamera
|| IsAutoFoldInWxBoardMain
|| IsAutoFoldInOldZyBoard
|| IsAutoFoldInPPTSlideShow
|| IsAutoFoldInMSWhiteboard;
[JsonProperty("isAutoFoldInEasiNote")]
public bool IsAutoFoldInEasiNote { get; set; } = false;
[JsonProperty("isAutoFoldInEasiCamera")]
public bool IsAutoFoldInEasiCamera { get; set; } = false;
[JsonProperty("isAutoFoldInEasiNote3C")]
public bool IsAutoFoldInEasiNote3C { get; set; } = false;
[JsonProperty("isAutoFoldInSeewoPincoTeacher")]
public bool IsAutoFoldInSeewoPincoTeacher { get; set; } = false;
[JsonProperty("isAutoFoldInHiteTouchPro")]
public bool IsAutoFoldInHiteTouchPro { get; set; } = false;
[JsonProperty("isAutoFoldInHiteCamera")]
public bool IsAutoFoldInHiteCamera { get; set; } = false;
[JsonProperty("isAutoFoldInWxBoardMain")]
public bool IsAutoFoldInWxBoardMain { get; set; } = false;
/*
[JsonProperty("isAutoFoldInZySmartBoard")]
public bool IsAutoFoldInZySmartBoard { get; set; } = false;
*/
[JsonProperty("isAutoFoldInOldZyBoard")]
public bool IsAutoFoldInOldZyBoard { get; set; } = false;
[JsonProperty("isAutoFoldInMSWhiteboard")]
public bool IsAutoFoldInMSWhiteboard { get; set; } = false;
[JsonProperty("isAutoFoldInPPTSlideShow")]
public bool IsAutoFoldInPPTSlideShow { get; set; } = false;
2021-10-14 01:22:37 +08:00
[JsonProperty("isAutoKillPptService")]
public bool IsAutoKillPptService { get; set; } = false;
2021-10-14 01:22:37 +08:00
[JsonProperty("isAutoKillEasiNote")]
public bool IsAutoKillEasiNote { get; set; } = false;
[JsonProperty("isSaveScreenshotsInDateFolders")]
public bool IsSaveScreenshotsInDateFolders { get; set; } = false;
[JsonProperty("isAutoSaveStrokesAtScreenshot")]
public bool IsAutoSaveStrokesAtScreenshot { get; set; } = false;
2022-03-08 23:43:25 +08:00
[JsonProperty("isAutoSaveStrokesAtClear")]
public bool IsAutoSaveStrokesAtClear { get; set; } = false;
2023-05-08 19:58:14 +08:00
[JsonProperty("isAutoClearWhenExitingWritingMode")]
public bool IsAutoClearWhenExitingWritingMode { get; set; } = false;
2023-02-12 22:50:17 +08:00
[JsonProperty("minimumAutomationStrokeNumber")]
public int MinimumAutomationStrokeNumber { get; set; } = 0;
2021-10-14 01:22:37 +08:00
}
public class Advanced
{
[JsonProperty("isSpecialScreen")]
public bool IsSpecialScreen { get; set; } = false;
2023-12-22 00:14:15 +08:00
2023-09-25 12:11:21 +08:00
[JsonProperty("isQuadIR")]
public bool IsQuadIR { get; set; } = false;
2023-12-22 00:14:15 +08:00
[JsonProperty("touchMultiplier")]
public double TouchMultiplier { get; set; } = 0.25;
2023-12-22 00:14:15 +08:00
[JsonProperty("nibModeBoundsWidth")]
public int NibModeBoundsWidth { get; set; } = 10;
[JsonProperty("fingerModeBoundsWidth")]
public int FingerModeBoundsWidth { get; set; } = 30;
[JsonProperty("eraserBindTouchMultiplier")]
public bool EraserBindTouchMultiplier { get; set; } = false;
2023-12-22 00:14:15 +08:00
2021-12-16 01:21:41 +08:00
[JsonProperty("isLogEnabled")]
public bool IsLogEnabled { get; set; } = true;
2023-12-22 00:14:15 +08:00
[JsonProperty("isSecondConfimeWhenShutdownApp")]
public bool IsSecondConfimeWhenShutdownApp { get; set; } = false;
}
2023-02-12 22:50:17 +08:00
public class InkToShape
{
[JsonProperty("isInkToShapeEnabled")]
public bool IsInkToShapeEnabled { get; set; } = true;
}
2023-12-22 00:14:15 +08:00
public class RandSettings {
[JsonProperty("peopleCount")]
public int PeopleCount { get; set; } = 60;
[JsonProperty("isNotRepeatName")]
public bool IsNotRepeatName { get; set; } = false;
}
}