Skip to content

Commit 1ee2acf

Browse files
committed
CP : change
1 parent 1cf3dd2 commit 1ee2acf

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

PearlCalculatorCP/App.axaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ namespace PearlCalculatorCP
1414
{
1515
public class App : Application
1616
{
17-
private CustomFontManagerImpl? _fontManager;
18-
1917
public App()
2018
{
2119
InitAppRuntimeSettings();
@@ -48,8 +46,7 @@ public override void RegisterServices()
4846
{
4947
if (!AppRuntimeSettings.UseSystemFont)
5048
{
51-
_fontManager = new CustomFontManagerImpl();
52-
AvaloniaLocator.CurrentMutable.Bind<IFontManagerImpl>().ToConstant(_fontManager);
49+
AvaloniaLocator.CurrentMutable.BindToSelf<IFontManagerImpl>(new CustomFontManagerImpl());
5350
}
5451

5552
base.RegisterServices();

PearlCalculatorCP/Models/TranslateFileModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public static class TranslateFileModelExtension
2525
[Flags]
2626
public enum TranslateFileLoadTypes
2727
{
28-
BuiltInFont = 1,
29-
SystemFont = 2,
30-
All = BuiltInFont | SystemFont
28+
BuiltInFont = 0b0001,
29+
SystemFont = 0b0010,
30+
All = 0b0011
3131
}
3232
}

PearlCalculatorCP/Utils/UrlUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace PearlCalculatorCP.Utils
99
{
1010
static class UrlUtils
1111
{
12-
private static ProcessStartInfo UrlStartInfo = new ProcessStartInfo { UseShellExecute = true };
12+
private static readonly ProcessStartInfo UrlStartInfo = new ProcessStartInfo { UseShellExecute = true };
1313

1414
private static readonly Regex UrlRegex = new Regex(@"^(https?|ftp|file|ws)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?$");
1515

0 commit comments

Comments
 (0)