feat(configmanager): add MainWindow view

This commit is contained in:
Joseph Doherty
2026-01-19 17:49:04 -05:00
parent 9677b751e6
commit e9fc764650
3 changed files with 219 additions and 5 deletions
@@ -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(() => { });
}
}