-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserSettings.cs
87 lines (74 loc) · 2.8 KB
/
UserSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Design;
using System.ComponentModel.Design;
using System.Windows.Forms.Design;
using System.Text.Json;
using System.Text.Json.Serialization;
using NAudio.Wave;
using NAudio.Midi;
using Ephemera.NBagOfTricks;
using Ephemera.NBagOfUis;
using Ephemera.NBagOfTricks.Slog;
using Ephemera.MidiLib;
namespace Midifrier
{
[Serializable]
public sealed class UserSettings : SettingsCore
{
#region Persisted Editable Properties
[DisplayName("Control Color")]
[Description("The color used for active control surfaces.")]
[Browsable(true)]
[JsonConverter(typeof(JsonColorConverter))]
public Color ControlColor { get; set; } = Color.MediumOrchid;
[DisplayName("Tempo Resolution")]
[Description("Adjust tempo in UI.")]
[Browsable(true)]
public int TempoResolution { get; set; } = 5;
[DisplayName("File Log Level")]
[Description("Log level for file write.")]
[Browsable(true)]
[JsonConverter(typeof(JsonStringEnumConverter))]
public LogLevel FileLogLevel { get; set; } = LogLevel.Trace;
[DisplayName("File Log Level")]
[Description("Log level for UI notification.")]
[Browsable(true)]
[JsonConverter(typeof(JsonStringEnumConverter))]
public LogLevel NotifLogLevel { get; set; } = LogLevel.Debug;
[DisplayName("Root Paths")]
[Description("Your favorite places.")]
[Browsable(true)]
[Editor(typeof(StringListEditor), typeof(UITypeEditor))]
public List<string> RootDirs { get; set; } = new();
[DisplayName("Ignore Paths")]
[Description("Ignore these noisy directories.")]
[Browsable(true)]
[Editor(typeof(StringListEditor), typeof(UITypeEditor))]
public List<string> IgnoreDirs { get; set; } = new();
[DisplayName("Single Click Select")]
[Description("Generate event with single or double click.")]
[Browsable(true)]
public bool SingleClickSelect { get; set; } = false;
[DisplayName("Midi Settings")]
[Description("Edit midi settings.")]
[Browsable(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public MidiSettings MidiSettings { get; set; } = new();
#endregion
#region Persisted Non-editable Persisted Properties
[Browsable(false)]
public bool Autoplay { get; set; } = true;
[Browsable(false)]
public bool Loop { get; set; } = false;
[Browsable(false)]
public double Volume { get; set; } = 0.5;
[Browsable(false)]
public int SplitterPosition { get; set; } = 30;
#endregion
}
}