forked from amkovkov/GranuSightSoftware2
refactor: MainWindow View and ViewModel
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user