refactor: MainWindow View and ViewModel

This commit is contained in:
2026-04-13 12:09:40 +03:00
parent 09aab44a3c
commit 208e1ccd18
3 changed files with 12 additions and 21 deletions
+6 -15
View File
@@ -2,26 +2,17 @@ using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.Logging;
namespace GSS2.UI.Core.ViewModels;
public partial class MainWindowViewModel : ViewModelBase
{
private readonly ILogger<MainWindowViewModel> _logger;
[ObservableProperty] public partial string Title { get; set; }
[ObservableProperty] public partial WindowDecorations WindowDecorations { get; set; }
[ObservableProperty] public partial bool Topmost { get; set; }
[ObservableProperty] public partial WindowState WindowState { get; set; }
[ObservableProperty] private string _title;
[ObservableProperty] private SystemDecorations _systemDecorations;
[ObservableProperty] private bool _topmost;
[ObservableProperty] private WindowState _windowState;
public MainWindowViewModel(ILogger<MainWindowViewModel> logger)
public MainWindowViewModel()
{
_logger = logger;
_logger.LogInformation("Initialization");
Title = "GranuSight Software 2";
_logger.LogInformation("Initialized");
}
}
}