Skip to content

Commit 45928b9

Browse files
committed
chore: use tabs
1 parent faf1860 commit 45928b9

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

reference/SimpleCalc/MVVM-CSharp/SimpleCalculator/MainViewModel.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ namespace SimpleCalculator;
22

33
public partial class MainViewModel : ObservableObject
44
{
5-
private readonly IThemeService _themeService;
5+
private readonly IThemeService _themeService;
66

7-
[ObservableProperty]
8-
private bool _isDark;
7+
[ObservableProperty]
8+
private bool _isDark;
99

10-
partial void OnIsDarkChanged(bool value) =>
11-
_themeService.SetThemeAsync(value ? AppTheme.Dark : AppTheme.Light);
10+
partial void OnIsDarkChanged(bool value) =>
11+
_themeService.SetThemeAsync(value ? AppTheme.Dark : AppTheme.Light);
1212

13-
public MainViewModel(IThemeService themeService)
14-
{
15-
_themeService = themeService;
16-
_isDark = themeService.IsDark;
13+
public MainViewModel(IThemeService themeService)
14+
{
15+
_themeService = themeService;
16+
_isDark = themeService.IsDark;
1717

18-
themeService.ThemeChanged += (_, _) =>
19-
{
20-
IsDark = themeService.IsDark;
21-
};
22-
}
18+
themeService.ThemeChanged += (_, _) =>
19+
{
20+
IsDark = themeService.IsDark;
21+
};
22+
}
2323

24-
[ObservableProperty]
25-
private Calculator _calculator = new();
24+
[ObservableProperty]
25+
private Calculator _calculator = new();
2626

27-
[RelayCommand]
28-
private void Input(string key)
29-
=> Calculator = Calculator.Input(key);
27+
[RelayCommand]
28+
private void Input(string key)
29+
=> Calculator = Calculator.Input(key);
3030
}

reference/SimpleCalc/MVVM-Xaml/SimpleCalculator/MainViewModel.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ namespace SimpleCalculator;
22

33
public partial class MainViewModel : ObservableObject
44
{
5-
private readonly IThemeService _themeService;
5+
private readonly IThemeService _themeService;
66

7-
[ObservableProperty]
8-
private bool _isDark;
7+
[ObservableProperty]
8+
private bool _isDark;
99

10-
partial void OnIsDarkChanged(bool value) =>
11-
_themeService.SetThemeAsync(value ? AppTheme.Dark : AppTheme.Light);
10+
partial void OnIsDarkChanged(bool value) =>
11+
_themeService.SetThemeAsync(value ? AppTheme.Dark : AppTheme.Light);
1212

13-
public MainViewModel(IThemeService themeService)
14-
{
15-
_themeService = themeService;
16-
_isDark = themeService.IsDark;
13+
public MainViewModel(IThemeService themeService)
14+
{
15+
_themeService = themeService;
16+
_isDark = themeService.IsDark;
1717

18-
themeService.ThemeChanged += (_, _) =>
19-
{
20-
IsDark = themeService.IsDark;
21-
};
22-
}
18+
themeService.ThemeChanged += (_, _) =>
19+
{
20+
IsDark = themeService.IsDark;
21+
};
22+
}
2323

24-
[ObservableProperty]
25-
private Calculator _calculator = new();
24+
[ObservableProperty]
25+
private Calculator _calculator = new();
2626

27-
[RelayCommand]
28-
private void Input(string key)
29-
=> Calculator = Calculator.Input(key);
27+
[RelayCommand]
28+
private void Input(string key)
29+
=> Calculator = Calculator.Input(key);
3030
}

0 commit comments

Comments
 (0)