feat(configmanager): add MainWindow view
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace JdeScoping.ConfigManager.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// Main window view model.
|
||||
/// This is a stub implementation for Task 11 - full implementation in Task 13.
|
||||
/// </summary>
|
||||
public class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
private string _configFolderPath = "No folder selected";
|
||||
private bool _hasUnsavedChanges;
|
||||
private string _validationStatus = "Valid";
|
||||
private IBrush _validationStatusColor = Brushes.LightGreen;
|
||||
private TreeNodeViewModel? _selectedNode;
|
||||
private object? _selectedFormViewModel;
|
||||
|
||||
public string ConfigFolderPath
|
||||
{
|
||||
get => _configFolderPath;
|
||||
set => SetProperty(ref _configFolderPath, value);
|
||||
}
|
||||
|
||||
public bool HasUnsavedChanges
|
||||
{
|
||||
get => _hasUnsavedChanges;
|
||||
set => SetProperty(ref _hasUnsavedChanges, value);
|
||||
}
|
||||
|
||||
public string ValidationStatus
|
||||
{
|
||||
get => _validationStatus;
|
||||
set => SetProperty(ref _validationStatus, value);
|
||||
}
|
||||
|
||||
public IBrush ValidationStatusColor
|
||||
{
|
||||
get => _validationStatusColor;
|
||||
set => SetProperty(ref _validationStatusColor, value);
|
||||
}
|
||||
|
||||
public TreeNodeViewModel? SelectedNode
|
||||
{
|
||||
get => _selectedNode;
|
||||
set => SetProperty(ref _selectedNode, value);
|
||||
}
|
||||
|
||||
public object? SelectedFormViewModel
|
||||
{
|
||||
get => _selectedFormViewModel;
|
||||
set => SetProperty(ref _selectedFormViewModel, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<TreeNodeViewModel> TreeNodes { get; } = [];
|
||||
|
||||
public ICommand OpenFolderCommand { get; }
|
||||
public ICommand SaveCommand { get; }
|
||||
public ICommand ExitCommand { get; }
|
||||
public ICommand UndoCommand { get; }
|
||||
public ICommand RedoCommand { get; }
|
||||
public ICommand ValidateCommand { get; }
|
||||
public ICommand TestConnectionCommand { get; }
|
||||
|
||||
public MainWindowViewModel()
|
||||
{
|
||||
// Stub commands - full implementation in Task 13
|
||||
OpenFolderCommand = new RelayCommand(() => { });
|
||||
SaveCommand = new RelayCommand(() => { });
|
||||
ExitCommand = new RelayCommand(() => { });
|
||||
UndoCommand = new RelayCommand(() => { });
|
||||
RedoCommand = new RelayCommand(() => { });
|
||||
ValidateCommand = new RelayCommand(() => { });
|
||||
TestConnectionCommand = new RelayCommand(() => { });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user