110 lines
4.1 KiB
C#
110 lines
4.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Windows.Controls;
|
|
using Kniip.Editor;
|
|
using Kniip.Upload;
|
|
|
|
namespace Kniip.Settings;
|
|
|
|
public enum CaptureAction
|
|
{
|
|
/// <summary>Melding rechtsonder tonen; klikken opent de editor.</summary>
|
|
Notify,
|
|
|
|
/// <summary>Editor direct openen.</summary>
|
|
OpenEditor,
|
|
|
|
/// <summary>Niets doen (alleen handmatig openen via tray of "Openen met").</summary>
|
|
Nothing
|
|
}
|
|
|
|
public enum ScreencastFormat
|
|
{
|
|
Mp4,
|
|
Gif
|
|
}
|
|
|
|
public enum SaveButtonChoice
|
|
{
|
|
/// <summary>Alleen het bestand opslaan.</summary>
|
|
SaveOnly,
|
|
|
|
/// <summary>Bestand opslaan en naar het klembord kopiëren.</summary>
|
|
SaveAndCopy
|
|
}
|
|
|
|
public sealed class AppSettings
|
|
{
|
|
public bool WatchClipboard { get; set; } = true;
|
|
public bool WatchScreenshotsFolder { get; set; } = true;
|
|
public bool OnlyFromSnippingTool { get; set; } = true;
|
|
public CaptureAction Action { get; set; } = CaptureAction.Notify;
|
|
public bool StraightHighlight { get; set; } = true;
|
|
public ToolKind LastTool { get; set; } = ToolKind.Rectangle;
|
|
public string? LastSaveFolder { get; set; }
|
|
|
|
/// <summary>Map waarin knipsels zonder te vragen worden opgeslagen; leeg betekent elke keer vragen.</summary>
|
|
public string? SnipSaveFolder { get; set; }
|
|
|
|
/// <summary>Naamsjabloon voor knipsels (zie FileNameTemplate); leeg betekent "Knipsel" met datum en tijd.</summary>
|
|
public string? SnipFileNameTemplate { get; set; }
|
|
public Dictionary<ToolKind, StyleSet> ToolStyles { get; set; } = new();
|
|
|
|
/// <summary>Recent gekozen emoji (codepunten), nieuwste eerst.</summary>
|
|
public List<string> RecentEmoji { get; set; } = new();
|
|
|
|
/// <summary>Sneltoets voor een eigen rechthoekknipsel (zie HotkeyGesture); leeg betekent geen sneltoets.</summary>
|
|
public string SnipHotkey { get; set; } = "PrintScreen";
|
|
|
|
/// <summary>Sneltoets om een venster aan te klikken en te knippen.</summary>
|
|
public string WindowHotkey { get; set; } = "Alt+PrintScreen";
|
|
|
|
/// <summary>Sneltoets voor een screencast die als MP4 wordt aangeboden.</summary>
|
|
public string RecordHotkey { get; set; } = "Ctrl+Shift+R";
|
|
|
|
/// <summary>Sneltoets voor een screencast die als GIF wordt aangeboden.</summary>
|
|
public string GifHotkey { get; set; } = "Ctrl+Shift+G";
|
|
public bool RecordSystemAudio { get; set; } = true;
|
|
public bool RecordMicrophone { get; set; }
|
|
public bool RecordShowCursor { get; set; } = true;
|
|
public bool RecordHighlightClicks { get; set; } = true;
|
|
public int RecordFps { get; set; } = 30;
|
|
public int GifFps { get; set; } = 10;
|
|
public int GifMaxWidth { get; set; } = 800;
|
|
public ScreencastFormat LastScreencastFormat { get; set; } = ScreencastFormat.Mp4;
|
|
public string? LastVideoFolder { get; set; }
|
|
|
|
/// <summary>Map waarin screencasts zonder te vragen worden opgeslagen; leeg betekent elke keer vragen.</summary>
|
|
public string? VideoSaveFolder { get; set; }
|
|
|
|
/// <summary>Naamsjabloon voor screencasts (zie FileNameTemplate); leeg betekent "Screencast" met datum en tijd.</summary>
|
|
public string? VideoFileNameTemplate { get; set; }
|
|
|
|
/// <summary>Gedrag van de knop Opslaan in de editor en de screencast.</summary>
|
|
public SaveButtonChoice SaveButton { get; set; } = SaveButtonChoice.SaveOnly;
|
|
|
|
/// <summary>Rand van het editorvenster waar de werkbalk staat.</summary>
|
|
public Dock ToolbarPosition { get; set; } = Dock.Top;
|
|
|
|
/// <summary>Vergrendeld: knoppen werken gewoon. Ontgrendeld: knoppen kunnen versleept worden.</summary>
|
|
public bool ToolbarLocked { get; set; } = true;
|
|
|
|
/// <summary>Volgorde van de werkbalkitems (ItemId's); leeg betekent de standaardvolgorde.</summary>
|
|
public List<string> ToolbarOrder { get; set; } = new();
|
|
|
|
public List<string> ToolbarHidden { get; set; } = new();
|
|
|
|
/// <summary>Zipline-server waar Uploaden naartoe gaat; leeg betekent geen uploadknop.</summary>
|
|
public UploaderConfig? Uploader { get; set; }
|
|
|
|
public StyleSet StyleFor(ToolKind tool)
|
|
{
|
|
if (!ToolStyles.TryGetValue(tool, out StyleSet? style))
|
|
{
|
|
style = StyleSet.DefaultFor(tool);
|
|
ToolStyles[tool] = style;
|
|
}
|
|
|
|
return style;
|
|
}
|
|
}
|