-
Notifications
You must be signed in to change notification settings - Fork 528
Expand file tree
/
Copy pathPopupSettings.cs
More file actions
146 lines (108 loc) · 4.19 KB
/
PopupSettings.cs
File metadata and controls
146 lines (108 loc) · 4.19 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
using System;
using System.ComponentModel;
using System.Windows;
using Carnac.Logic.Enums;
namespace Carnac.Logic.Models
{
public class PopupSettings : NotifyPropertyChanged
{
[DefaultValue(350)]
public int ItemMaxWidth { get; set; }
[DefaultValue(0.5)]
public double ItemOpacity { get; set; }
[DefaultValue(5)]
public double ItemFadeDelay { get; set; }
[DefaultValue("Black")]
public string ItemBackgroundColor { get; set; }
[DefaultValue("White")]
public string FontColor { get; set; }
[DefaultValue(40)]
public int FontSize { get; set; }
public int Screen { get; set; }
[NotifyProperty(AlsoNotifyFor = new[] { "ScaleTransform", "Alignment" })]
public NotificationPlacement Placement { get; set; }
[DefaultValue(false)]
public bool AutoUpdate { get; set; }
//Used to determine which from it's leftmost co-ord
double left;
public double Left
{
get { return left; }
set
{
left = value;
OnLeftChanged(EventArgs.Empty);
}
}
public event EventHandler LeftChanged;
protected void OnLeftChanged(EventArgs e)
{
var handler = LeftChanged;
if (handler != null) handler(this, e);
}
[NotifyProperty(AlsoNotifyFor = new[] { "Margins" })]
public int TopOffset { get; set; }
[NotifyProperty(AlsoNotifyFor = new[] { "Margins" })]
public int BottomOffset { get; set; }
[NotifyProperty(AlsoNotifyFor = new[] { "Margins" })]
public int LeftOffset { get; set; }
[NotifyProperty(AlsoNotifyFor = new[] { "Margins" })]
public int RightOffset { get; set; }
[DefaultValue("")]
public string ProcessFilterExpression { get; set; }
public double ScaleTransform
{
get { return Placement == NotificationPlacement.TopLeft || Placement == NotificationPlacement.TopRight ? 1 : -1; }
}
public string Alignment
{
get { return Placement == NotificationPlacement.TopLeft || Placement == NotificationPlacement.BottomLeft ? "Left" : "Right"; }
}
public Thickness Margins
{
get { return new Thickness(LeftOffset, TopOffset, RightOffset, BottomOffset); }
}
public string SortDescription
{
get { return Placement == NotificationPlacement.TopLeft || Placement == NotificationPlacement.TopRight ? "Ascending" : "Descending"; }
}
public bool DetectShortcutsOnly { get; set; }
public bool ShowApplicationIcon { get; set; }
public bool SettingsConfigured { get; set; }
public bool ShowOnlyModifiers { get; set; }
public bool ShowSpaceAsUnicode { get; set; }
[DefaultValue(true)]
public bool ShowMouseClicks { get; set; }
[DefaultValue(true)]
public bool ShowMouseClickKeys { get; set; }
[DefaultValue(true)]
public bool ShowMouseScrollKeys { get; set; }
[DefaultValue(40)]
public int MouseKeySize { get; set; }
[DefaultValue("OrangeRed")]
public string LeftClickColor { get; set; }
[DefaultValue("RoyalBlue")]
public string RightClickColor { get; set; }
[DefaultValue("Gold")]
public string ScrollClickColor { get; set; }
[DefaultValue("Peru")]
public string XButton1ClickColor { get; set; }
[DefaultValue("Plum")]
public string XButton2ClickColor { get; set; }
[DefaultValue(1)]
public double ClickStartScale { get; set; }
[DefaultValue(4)]
public double ClickStopScale { get; set; }
[DefaultValue(3700)]
public int ClickFadeDelay { get; set; }
[DefaultValue(1)]
public double ClickStartBorder { get; set; }
[DefaultValue(0.8)]
public double ClickStartOpacity { get; set; }
[DefaultValue(2)]
public double ClickStopBorder { get; set; }
[DefaultValue(0)]
public double ClickStopOpacity { get; set; }
public string ClickColor { get; set; }
}
}