Skip to content

Commit 0a93b36

Browse files
committed
Minor Changes
1 parent 99837bc commit 0a93b36

File tree

4 files changed

+61
-22
lines changed

4 files changed

+61
-22
lines changed

src/ReaLTaiizor/Controls/DateTime/PoisonDateTime.cs

+19-6
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,14 @@ public bool UseSelectable
141141
private bool useCustomFont = false;
142142
[DefaultValue(false)]
143143
[Category(PoisonDefaults.PropertyCategory.Appearance)]
144-
public bool UseCustomFont {
144+
public bool UseCustomFont
145+
{
145146
get => useCustomFont;
146-
set { useCustomFont = value; Refresh(); }
147+
set
148+
{
149+
useCustomFont = value;
150+
Refresh();
151+
}
147152
}
148153

149154
public PoisonDateTimeSize FontSize { get; set; } = PoisonDateTimeSize.Medium;
@@ -166,14 +171,22 @@ public bool UseCustomFont {
166171
#endregion
167172

168173
#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+
{
172181
return base.Font;
182+
}
173183
else
184+
{
174185
return PoisonFonts.DateTime(FontSize, FontWeight);
186+
}
175187
}
176-
set {
188+
set
189+
{
177190
base.Font = value;
178191
Refresh();
179192
}

src/ReaLTaiizor/Controls/Label/PoisonLabel.cs

+22-8
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,14 @@ public bool UseSelectable
140140
private bool useCustomFont=false;
141141
[DefaultValue(false)]
142142
[Category(PoisonDefaults.PropertyCategory.Appearance)]
143-
public bool UseCustomFont {
143+
public bool UseCustomFont
144+
{
144145
get => useCustomFont;
145-
set { useCustomFont = value; Refresh(); }
146+
set
147+
{
148+
useCustomFont = value;
149+
Refresh();
150+
}
146151
}
147152

148153
private PoisonLabelSize poisonLabelSize = PoisonLabelSize.Medium;
@@ -179,14 +184,22 @@ public bool WrapToLine
179184
#endregion
180185

181186
#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+
{
185194
return base.Font;
186-
else
187-
return PoisonFonts.Label(poisonLabelSize, poisonLabelWeight);
195+
}
196+
else
197+
{
198+
return PoisonFonts.Label(FontSize, FontWeight);
199+
}
188200
}
189-
set {
201+
set
202+
{
190203
base.Font = value;
191204
Refresh();
192205
}
@@ -211,6 +224,7 @@ public PoisonLabel()
211224
{
212225
Visible = false
213226
};
227+
214228
Controls.Add(baseTextBox);
215229
}
216230

src/ReaLTaiizor/Controls/TextBox/PoisonTextBox.cs

+19-7
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,14 @@ public bool UseSelectable
139139
private bool useCustomFont = false;
140140
[DefaultValue(false)]
141141
[Category(PoisonDefaults.PropertyCategory.Appearance)]
142-
public bool UseCustomFont {
142+
public bool UseCustomFont
143+
{
143144
get => useCustomFont;
144-
set { useCustomFont = value; Refresh(); }
145+
set
146+
{
147+
useCustomFont = value;
148+
Refresh();
149+
}
145150
}
146151

147152
private PoisonTextBoxSize poisonTextBoxSize = PoisonTextBoxSize.Small;
@@ -326,14 +331,21 @@ public bool WithError
326331

327332
#region Routing Fields
328333

329-
public override Font Font {
330-
get {
331-
if (useCustomFont)
334+
public override Font Font
335+
{
336+
get
337+
{
338+
if (UseCustomFont)
339+
{
332340
return base.Font;
341+
}
333342
else
334-
return PoisonFonts.TextBox(poisonTextBoxSize, poisonTextBoxWeight);
343+
{
344+
return PoisonFonts.TextBox(FontSize, FontWeight);
345+
}
335346
}
336-
set {
347+
set
348+
{
337349
base.Font = value;
338350
Refresh();
339351
}

src/ReaLTaiizor_CR/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private static void Main()
2121
CultureInfo cultureInfo = new(CultureInfo.CurrentCulture.TextInfo.CultureName);
2222
Application.SetCompatibleTextRenderingDefault(false);
2323
Application.CurrentCulture = cultureInfo;
24-
Application.Run(new Poison());
24+
Application.Run(new Catcher());
2525
}
2626
catch (Exception ex)
2727
{

0 commit comments

Comments
 (0)