Skip to content

Commit b66aadd

Browse files
committed
*更新版本号至 0.0.2.129
1 parent 2cf6353 commit b66aadd

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

Core/ViewModel/Main/MainWindowViewModel.cs

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@ namespace Core.ViewModel.Main;
1818
/// </summary>
1919
public partial class MainWindowViewModel : ObservableRecipient
2020
{
21-
public MainWindowViewModel()
22-
{
23-
WeakReferenceMessenger.Default.Register<MainWindowViewModel, PageChangeEventArgs>(this, OnNavigation);
24-
}
21+
[ObservableProperty] private object? _content;
2522

2623
[ObservableProperty] private bool _settingPage = false;
27-
[ObservableProperty] private string _version = "0.0.2.128";
28-
private void OnNavigation(MainWindowViewModel recipient, PageChangeEventArgs message)
24+
[ObservableProperty] private string _version = "0.0.2.129";
25+
26+
public MainWindowViewModel()
2927
{
30-
Content = message.Key;
31-
SettingPage = message.Key == "Setting";
28+
WeakReferenceMessenger.Default.Register<MainWindowViewModel, PageChangeEventArgs>(this, OnNavigation);
3229
}
3330

34-
[ObservableProperty] private object? _content;
35-
3631
public ObservableCollection<MenuItemViewModel> MenuItems { get; } = new()
3732
{
3833
new MenuItemViewModel
@@ -79,6 +74,12 @@ private void OnNavigation(MainWindowViewModel recipient, PageChangeEventArgs mes
7974
}
8075
};
8176

77+
private void OnNavigation(MainWindowViewModel recipient, PageChangeEventArgs message)
78+
{
79+
Content = message.Key;
80+
SettingPage = message.Key == "Setting";
81+
}
82+
8283
[RelayCommand]
8384
public void ActivateSettingPage()
8485
{
@@ -112,6 +113,15 @@ public PageChangeEventArgs(string key)
112113

113114
public partial class MenuItemViewModel : ObservableObject
114115
{
116+
[ObservableProperty] private bool _isSelected = false;
117+
118+
public MenuItemViewModel()
119+
{
120+
WeakReferenceMessenger.Default.Register<PageChangeEventArgs>(this,
121+
(recipient, message) => { IsSelected = message.Key == Key; });
122+
ActivateCommand = new RelayCommand(OnActivate);
123+
}
124+
115125
public string MenuHeader { get; set; }
116126
public string MenuIconGlyph { get; set; }
117127
public string MenuIconFilledGlyph { get; set; }
@@ -122,15 +132,6 @@ public partial class MenuItemViewModel : ObservableObject
122132
public ObservableCollection<MenuItemViewModel> Children { get; set; } = new();
123133
public ICommand ActivateCommand { get; set; }
124134

125-
[ObservableProperty] private bool _isSelected = false;
126-
127-
public MenuItemViewModel()
128-
{
129-
WeakReferenceMessenger.Default.Register<PageChangeEventArgs>(this,
130-
(recipient, message) => { IsSelected = message.Key == Key; });
131-
ActivateCommand = new RelayCommand(OnActivate);
132-
}
133-
134135
private void OnActivate()
135136
{
136137
if (IsSeparator) return;

KitopiaAvalonia/KitopiaAvalonia.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
3232
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
3333
<DebugType Condition="'$(Configuration)' == 'Release'">none</DebugType>
34-
<Version>0.0.2.128</Version>
34+
<Version>0.0.2.129</Version>
3535
<AvaloniaVersion>11.3.2</AvaloniaVersion>
3636
<Configurations>Debug;Release</Configurations>
3737
<Platforms>AnyCPU;x64</Platforms>

build/InstallerAssets/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"DisplayIcon": "",
33
"DisplayName": "Kitopia",
4-
"DisplayVersion": "0.0.2.102",
4+
"DisplayVersion": "0.0.2.129",
55
"Publisher": "MakesYT",
66
"CanExecutePath": "KitopiaAvalonia.exe",
77
"Is64": true

0 commit comments

Comments
 (0)