This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/View/DockPanelHorizontalView.xaml.cs
generated_at: "2026-04-16T14:03:18.194574+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5cdf7bb10effcdd4"
---
# Documentation: DockPanelHorizontalView
## 1. Purpose
`DockPanelHorizontalView` is a WPF view component representing a horizontal dock panel within the DTS Viewer application. It serves as a UI container for horizontally-arranged docked elements, implementing the `IDockPanelHorizontalView` interface to integrate with the broader docking system architecture. This module exists to provide the code-behind logic for the corresponding XAML view definition.
## 2. Public Interface
### Class: `DockPanelHorizontalView`
**Kind:** `partial class`
**Implements:** `IDockPanelHorizontalView`
**Namespace:** `DTS.Viewer`
#### Constructor
```csharp
public DockPanelHorizontalView()
```
Initializes a new instance of the `DockPanelHorizontalView` class. Invokes `InitializeComponent()`, which loads and instantiates the XAML-defined UI component tree.
---
## 3. Invariants
- The class is declared as `partial`, indicating that additional implementation is auto-generated from the companion XAML file (`DockPanelHorizontalView.xaml`) at build time.
- `InitializeComponent()` must be called exactly once during construction; this is enforced by WPF's code-generation pattern.
- The class implements `IDockPanelHorizontalView`, implying it must fulfill any contract defined by that interface (interface members are not visible in this source file).
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — imported but no specific types are referenced in this file; usage unclear from source alone
- `DTS.Common.Interface` — provides `IDockPanelHorizontalView` interface
- WPF Presentation Framework (implicit via `InitializeComponent()` pattern)
### What depends on this module:
- Cannot be determined from this source file alone. Likely consumed by a parent container or DI container within the `DTS.Viewer` assembly.
## 5. Gotchas
- The actual UI layout, visual tree, and any named elements are defined in the companion XAML file (`DockPanelHorizontalView.xaml`), which is not included here. The behavior and structure of this view cannot be fully understood without that file.
- The `IDockPanelHorizontalView` interface contract is not visible in this source; any required interface members (properties, methods, events) are not shown.
- The import of `DTS.Common.Base` is unused in this file—this may indicate dead code, a historical remnant, or types used in the XAML portion.

View File

@@ -0,0 +1,105 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/ViewModel/DockPanelHorizontalViewModel.cs
generated_at: "2026-04-16T14:03:50.492383+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6bc81faa835eebdc"
---
# DockPanelHorizontalViewModel Documentation
## 1. Purpose
`DockPanelHorizontalViewModel` is a ViewModel component within a WPF/Prism-based MVVM architecture, responsible for managing the state and behavior of a horizontal dock panel view. It serves as a mediator between the view (`IDockPanelHorizontalView`) and the application's infrastructure (region navigation, event aggregation, dependency injection). The class currently provides a functional notification system while the majority of its lifecycle methods remain unimplemented stubs.
---
## 2. Public Interface
### Constructor
```csharp
public DockPanelHorizontalViewModel(
IDockPanelHorizontalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's `DataContext` to itself, creates interaction requests, and subscribes to the `RaiseNotification` event.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IDockPanelHorizontalView` | `get` | The associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | `get` | Prism interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | `get` | Prism interaction request for displaying confirmations. |
| `IsMenuIncluded` | `bool` | `get; set` | Flag indicating whether a menu is included. |
| `IsNavigationIncluded` | `bool` | `get; set` | Flag indicating whether navigation is included. |
| `IsBusy` | `bool` | `get; set` | Indicates if the ViewModel is in a busy state. |
| `IsDirty` | `bool` | `get; private set` | Indicates if there are unsaved changes. |
### Events
```csharp
public event PropertyChangedEventHandler PropertyChanged;
```
Standard property-changed event for data binding.
### Methods (Override/New)
| Method | Signature | Implementation Status |
|--------|-----------|----------------------|
| `Initialize` | `override void Initialize()` | **Throws `NotImplementedException`** |
| `Initialize` | `override void Initialize(object parameter)` | **Throws `NotImplementedException`** |
| `Initialize` | `new void Initialize(object parameter, object model)` | **Throws `NotImplementedException`** |
| `InitializeAsync` | `override Task InitializeAsync()` | **Throws `NotImplementedException`** |
| `InitializeAsync` | `override Task InitializeAsync(object parameter)` | **Throws `NotImplementedException`** |
| `Activated` | `override void Activated()` | **Throws `NotImplementedException`** |
| `Cleanup` | `override void Cleanup()` | **Throws `NotImplementedException`** |
| `CleanupAsync` | `new Task CleanupAsync()` | **Throws `NotImplementedException`** |
---
## 3. Invariants
- **DataContext Binding**: The `View.DataContext` is always set to `this` upon construction.
- **Event Subscription**: The `RaiseNotification` event subscription is established in the constructor and remains active for the lifetime of the ViewModel.
- **IsDirty Encapsulation**: The `IsDirty` property can only be modified internally (private setter).
- **Base Class Contract**: Inherits from `BaseViewModel<IDockPanelHorizontalViewModel>` and implements `IDockPanelHorizontalViewModel`.
---
## 4. Dependencies
### External Dependencies (from imports)
- **`Microsoft.Practices.Prism.Events`** - `IEventAggregator` for pub/sub event handling
- **`Microsoft.Practices.Prism.Interactivity.InteractionRequest`** - `InteractionRequest<T>`, `Notification`, `Confirmation` for UI dialogs
- **`Microsoft.Practices.Prism.Regions`** - `IRegionManager` for region-based navigation
- **`Microsoft.Practices.Unity`** - `IUnityContainer` for dependency injection
### Internal Dependencies
- **`DTS.Common.Base`** - Provides `BaseViewModel<T>`
- **`DTS.Common.Events`** - Provides `RaiseNotification` event and `NotificationContentEventArgs`
- **`DTS.Common.Interface`** - Provides `IViewModel`, `IDockPanelHorizontalViewModel`, `IDockPanelHorizontalView`
### Dependents
- Cannot be determined from this source file alone.
---
## 5. Gotchas
1. **Incomplete Implementation**: All lifecycle methods (`Initialize`, `InitializeAsync`, `Activated`, `Cleanup`, `CleanupAsync`) throw `NotImplementedException`. Calling these will crash the application.
2. **Method Hiding with `new` Keyword**:
- `CleanupAsync()` and `Initialize(object, object)` use `new` rather than `override`, meaning they hide base class members. Calls through a base class reference will invoke the base implementation, not these methods.
3. **Field Hiding**: The `_regionManager` field is declared with `new`, hiding any base class field of the same name. This may cause confusion about which instance is being used.
4. **Redundant PropertyChanged Event**: The class declares `PropertyChanged` event, but `BaseViewModel` likely already implements `INotifyPropertyChanged`. This could cause issues if the base relies on its own event declaration.
5. **Legacy Prism Version**: Uses `Microsoft.Practices.Prism` namespace, indicating an older version of Prism (pre-6.x). Modern Prism uses `Prism` namespace.
6. **Unused ConfirmationRequest**: `ConfirmationRequest` is instantiated but never raised anywhere in this class. Its intended usage is unclear from this source.
7. **Unused Private Members**: `Parent`, `_regionManager`, and `UnityContainer` are stored but never used in any implemented method.