Skip to content

Commit aaf9733

Browse files
committed
chore: file scoped ns and format all
1 parent 0e5465a commit aaf9733

16 files changed

Lines changed: 2355 additions & 2394 deletions

Src/GhostDraw/App.xaml.cs

Lines changed: 209 additions & 211 deletions
Large diffs are not rendered by default.

Src/GhostDraw/Core/AppSettings.cs

Lines changed: 78 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,95 @@
11
using System.Text.Json.Serialization;
22

3-
namespace GhostDraw.Core
3+
namespace GhostDraw.Core;
4+
5+
/// <summary>
6+
/// Application settings that persist across sessions
7+
/// </summary>
8+
public class AppSettings
49
{
510
/// <summary>
6-
/// Application settings that persist across sessions
11+
/// Brush color in hex format (e.g., "#FF0000" for red)
712
/// </summary>
8-
public class AppSettings
9-
{
10-
/// <summary>
11-
/// Brush color in hex format (e.g., "#FF0000" for red)
12-
/// </summary>
13-
[JsonPropertyName("brushColor")]
14-
public string BrushColor { get; set; } = "#FF0000";
13+
[JsonPropertyName("brushColor")]
14+
public string BrushColor { get; set; } = "#FF0000";
1515

16-
/// <summary>
17-
/// Brush thickness in pixels
18-
/// </summary>
19-
[JsonPropertyName("brushThickness")]
20-
public double BrushThickness { get; set; } = 3.0;
16+
/// <summary>
17+
/// Brush thickness in pixels
18+
/// </summary>
19+
[JsonPropertyName("brushThickness")]
20+
public double BrushThickness { get; set; } = 3.0;
2121

22-
/// <summary>
23-
/// Minimum allowed brush thickness
24-
/// </summary>
25-
[JsonPropertyName("minBrushThickness")]
26-
public double MinBrushThickness { get; set; } = 1.0;
22+
/// <summary>
23+
/// Minimum allowed brush thickness
24+
/// </summary>
25+
[JsonPropertyName("minBrushThickness")]
26+
public double MinBrushThickness { get; set; } = 1.0;
2727

28-
/// <summary>
29-
/// Maximum allowed brush thickness
30-
/// </summary>
31-
[JsonPropertyName("maxBrushThickness")]
32-
public double MaxBrushThickness { get; set; } = 20.0;
28+
/// <summary>
29+
/// Maximum allowed brush thickness
30+
/// </summary>
31+
[JsonPropertyName("maxBrushThickness")]
32+
public double MaxBrushThickness { get; set; } = 20.0;
3333

34-
/// <summary>
35-
/// Virtual key codes for the hotkey combination
36-
/// </summary>
37-
[JsonPropertyName("hotkeyVirtualKeys")]
38-
public List<int> HotkeyVirtualKeys { get; set; } = new() { 0xA2, 0xA4, 0x44 }; // Default: Ctrl+Alt+D
34+
/// <summary>
35+
/// Virtual key codes for the hotkey combination
36+
/// </summary>
37+
[JsonPropertyName("hotkeyVirtualKeys")]
38+
public List<int> HotkeyVirtualKeys { get; set; } = new() { 0xA2, 0xA4, 0x44 }; // Default: Ctrl+Alt+D
3939

40-
/// <summary>
41-
/// Gets the user-friendly display name of the hotkey combination
42-
/// (Computed property - not serialized)
43-
/// </summary>
44-
[JsonIgnore]
45-
public string HotkeyDisplayName => Helpers.VirtualKeyHelper.GetCombinationDisplayName(HotkeyVirtualKeys);
40+
/// <summary>
41+
/// Gets the user-friendly display name of the hotkey combination
42+
/// (Computed property - not serialized)
43+
/// </summary>
44+
[JsonIgnore]
45+
public string HotkeyDisplayName => Helpers.VirtualKeyHelper.GetCombinationDisplayName(HotkeyVirtualKeys);
4646

47-
/// <summary>
48-
/// If true, drawing mode locks on first hotkey press and unlocks on second press
49-
/// If false, drawing mode is active only while hotkey is held down
50-
/// </summary>
51-
[JsonPropertyName("lockDrawingMode")]
52-
public bool LockDrawingMode { get; set; } = false;
47+
/// <summary>
48+
/// If true, drawing mode locks on first hotkey press and unlocks on second press
49+
/// If false, drawing mode is active only while hotkey is held down
50+
/// </summary>
51+
[JsonPropertyName("lockDrawingMode")]
52+
public bool LockDrawingMode { get; set; } = false;
5353

54-
/// <summary>
55-
/// Log level (Verbose, Debug, Information, Warning, Error, Fatal)
56-
/// </summary>
57-
[JsonPropertyName("logLevel")]
58-
public string LogLevel { get; set; } = "Information";
54+
/// <summary>
55+
/// Log level (Verbose, Debug, Information, Warning, Error, Fatal)
56+
/// </summary>
57+
[JsonPropertyName("logLevel")]
58+
public string LogLevel { get; set; } = "Information";
5959

60-
/// <summary>
61-
/// Available color palette for quick cycling
62-
/// </summary>
63-
[JsonPropertyName("colorPalette")]
64-
public List<string> ColorPalette { get; set; } = new()
65-
{
66-
"#FF0000", // Red
67-
"#00FF00", // Green
68-
"#0000FF", // Blue
69-
"#FFFF00", // Yellow
70-
"#FF00FF", // Magenta
71-
"#00FFFF", // Cyan
72-
"#FFFFFF", // White
73-
"#000000", // Black
74-
"#FFA500", // Orange
75-
"#800080" // Purple
76-
};
60+
/// <summary>
61+
/// Available color palette for quick cycling
62+
/// </summary>
63+
[JsonPropertyName("colorPalette")]
64+
public List<string> ColorPalette { get; set; } = new()
65+
{
66+
"#FF0000", // Red
67+
"#00FF00", // Green
68+
"#0000FF", // Blue
69+
"#FFFF00", // Yellow
70+
"#FF00FF", // Magenta
71+
"#00FFFF", // Cyan
72+
"#FFFFFF", // White
73+
"#000000", // Black
74+
"#FFA500", // Orange
75+
"#800080" // Purple
76+
};
7777

78-
/// <summary>
79-
/// Creates a deep copy of the settings
80-
/// </summary>
81-
public AppSettings Clone()
78+
/// <summary>
79+
/// Creates a deep copy of the settings
80+
/// </summary>
81+
public AppSettings Clone()
82+
{
83+
return new AppSettings
8284
{
83-
return new AppSettings
84-
{
85-
BrushColor = BrushColor,
86-
BrushThickness = BrushThickness,
87-
MinBrushThickness = MinBrushThickness,
88-
MaxBrushThickness = MaxBrushThickness,
89-
HotkeyVirtualKeys = new List<int>(HotkeyVirtualKeys),
90-
LockDrawingMode = LockDrawingMode,
91-
LogLevel = LogLevel,
92-
ColorPalette = new List<string>(ColorPalette)
93-
};
94-
}
85+
BrushColor = BrushColor,
86+
BrushThickness = BrushThickness,
87+
MinBrushThickness = MinBrushThickness,
88+
MaxBrushThickness = MaxBrushThickness,
89+
HotkeyVirtualKeys = new List<int>(HotkeyVirtualKeys),
90+
LockDrawingMode = LockDrawingMode,
91+
LogLevel = LogLevel,
92+
ColorPalette = new List<string>(ColorPalette)
93+
};
9594
}
9695
}

0 commit comments

Comments
 (0)