File tree 4 files changed +61
-22
lines changed
4 files changed +61
-22
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,14 @@ public bool UseSelectable
141
141
private bool useCustomFont = false ;
142
142
[ DefaultValue ( false ) ]
143
143
[ Category ( PoisonDefaults . PropertyCategory . Appearance ) ]
144
- public bool UseCustomFont {
144
+ public bool UseCustomFont
145
+ {
145
146
get => useCustomFont ;
146
- set { useCustomFont = value ; Refresh ( ) ; }
147
+ set
148
+ {
149
+ useCustomFont = value ;
150
+ Refresh ( ) ;
151
+ }
147
152
}
148
153
149
154
public PoisonDateTimeSize FontSize { get ; set ; } = PoisonDateTimeSize . Medium ;
@@ -166,14 +171,22 @@ public bool UseCustomFont {
166
171
#endregion
167
172
168
173
#region Routing Fields
169
- public override Font Font {
170
- get {
171
- if ( useCustomFont )
174
+
175
+ public override Font Font
176
+ {
177
+ get
178
+ {
179
+ if ( UseCustomFont )
180
+ {
172
181
return base . Font ;
182
+ }
173
183
else
184
+ {
174
185
return PoisonFonts . DateTime ( FontSize , FontWeight ) ;
186
+ }
175
187
}
176
- set {
188
+ set
189
+ {
177
190
base . Font = value ;
178
191
Refresh ( ) ;
179
192
}
Original file line number Diff line number Diff line change @@ -140,9 +140,14 @@ public bool UseSelectable
140
140
private bool useCustomFont = false ;
141
141
[ DefaultValue ( false ) ]
142
142
[ Category ( PoisonDefaults . PropertyCategory . Appearance ) ]
143
- public bool UseCustomFont {
143
+ public bool UseCustomFont
144
+ {
144
145
get => useCustomFont ;
145
- set { useCustomFont = value ; Refresh ( ) ; }
146
+ set
147
+ {
148
+ useCustomFont = value ;
149
+ Refresh ( ) ;
150
+ }
146
151
}
147
152
148
153
private PoisonLabelSize poisonLabelSize = PoisonLabelSize . Medium ;
@@ -179,14 +184,22 @@ public bool WrapToLine
179
184
#endregion
180
185
181
186
#region Routing Fields
182
- public override Font Font {
183
- get {
184
- if ( useCustomFont )
187
+
188
+ public override Font Font
189
+ {
190
+ get
191
+ {
192
+ if ( UseCustomFont )
193
+ {
185
194
return base . Font ;
186
- else
187
- return PoisonFonts . Label ( poisonLabelSize , poisonLabelWeight ) ;
195
+ }
196
+ else
197
+ {
198
+ return PoisonFonts . Label ( FontSize , FontWeight ) ;
199
+ }
188
200
}
189
- set {
201
+ set
202
+ {
190
203
base . Font = value ;
191
204
Refresh ( ) ;
192
205
}
@@ -211,6 +224,7 @@ public PoisonLabel()
211
224
{
212
225
Visible = false
213
226
} ;
227
+
214
228
Controls . Add ( baseTextBox ) ;
215
229
}
216
230
Original file line number Diff line number Diff line change @@ -139,9 +139,14 @@ public bool UseSelectable
139
139
private bool useCustomFont = false ;
140
140
[ DefaultValue ( false ) ]
141
141
[ Category ( PoisonDefaults . PropertyCategory . Appearance ) ]
142
- public bool UseCustomFont {
142
+ public bool UseCustomFont
143
+ {
143
144
get => useCustomFont ;
144
- set { useCustomFont = value ; Refresh ( ) ; }
145
+ set
146
+ {
147
+ useCustomFont = value ;
148
+ Refresh ( ) ;
149
+ }
145
150
}
146
151
147
152
private PoisonTextBoxSize poisonTextBoxSize = PoisonTextBoxSize . Small ;
@@ -326,14 +331,21 @@ public bool WithError
326
331
327
332
#region Routing Fields
328
333
329
- public override Font Font {
330
- get {
331
- if ( useCustomFont )
334
+ public override Font Font
335
+ {
336
+ get
337
+ {
338
+ if ( UseCustomFont )
339
+ {
332
340
return base . Font ;
341
+ }
333
342
else
334
- return PoisonFonts . TextBox ( poisonTextBoxSize , poisonTextBoxWeight ) ;
343
+ {
344
+ return PoisonFonts . TextBox ( FontSize , FontWeight ) ;
345
+ }
335
346
}
336
- set {
347
+ set
348
+ {
337
349
base . Font = value ;
338
350
Refresh ( ) ;
339
351
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ private static void Main()
21
21
CultureInfo cultureInfo = new ( CultureInfo . CurrentCulture . TextInfo . CultureName ) ;
22
22
Application . SetCompatibleTextRenderingDefault ( false ) ;
23
23
Application . CurrentCulture = cultureInfo ;
24
- Application . Run ( new Poison ( ) ) ;
24
+ Application . Run ( new Catcher ( ) ) ;
25
25
}
26
26
catch ( Exception ex )
27
27
{
You can’t perform that action at this time.
0 commit comments