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,34 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/View/DockPanelHorizontalView.xaml.cs
generated_at: "2026-04-17T16:13:40.920030+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d3dadc17e8cfb160"
---
# View
### Purpose
This module provides the code-behind for the `AddCalculatedChannelView` XAML view, serving as the UI component for adding calculated channels within the DTS Viewer application. It implements the `IAddCalculatedChannelView` interface to integrate with the application's view abstraction layer, enabling loose coupling between the view and its consuming components.
### Public Interface
- **`AddCalculatedChannelView()`** (Constructor)
- Initializes the component by calling `InitializeComponent()`. No additional parameters or logic.
- **`IAddCalculatedChannelView`** (Implemented Interface)
- The class implements this interface from `DTS.Common.Interface`, making it usable wherever the interface type is required.
### Invariants
- The view must be a partial class to support WPF's code-generation model for XAML.
- `InitializeComponent()` must be called exactly once during construction to load the associated XAML.
### Dependencies
- **Depends on:** `DTS.Common.Interface` (for `IAddCalculatedChannelView` interface)
- **Depended on by:** Cannot be determined from source alone (likely consumed by a presenter/viewmodel or region navigation in the broader application)
### Gotchas
- The file includes a ReSharper directive `// ReSharper disable CheckNamespace`, suggesting the namespace `DTS.Viewer.AddCalculatedChannel` may not match the project's default namespace structure. This could cause confusion during refactoring or when locating the view.
---

View File

@@ -0,0 +1,62 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelHorizontal/ViewModel/DockPanelHorizontalViewModel.cs
generated_at: "2026-04-17T16:29:26.445526+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ce03b3583ccf9c32"
---
# ViewModel
### Purpose
This module provides the `DockPanelHorizontalViewModel` class, a Prism-based ViewModel for a horizontal dock panel UI component in the DTS Viewer application. It serves as a mediator between the view (`IDockPanelHorizontalView`) and the application infrastructure, handling notification requests via Prism's `InteractionRequest` pattern and subscribing to application-wide `RaiseNotification` events.
### Public Interface
**Class:** `DockPanelHorizontalViewModel` (extends `BaseViewModel<IDockPanelHorizontalViewModel>`, implements `IDockPanelHorizontalViewModel`)
**Constructor:**
```csharp
public DockPanelHorizontalViewModel(
IDockPanelHorizontalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's DataContext to itself, creates `NotificationRequest` and `ConfirmationRequest` instances, and subscribes to the `RaiseNotification` event.
**Properties:**
- `IDockPanelHorizontalView View { get; }` — The associated view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Used to raise notification dialogs.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Used to raise confirmation dialogs.
- `bool IsMenuIncluded { get; set; }` — UI state flag.
- `bool IsNavigationIncluded { get; set; }` — UI state flag.
- `bool IsBusy { get; set; }` — Indicates busy state.
- `bool IsDirty { get; private set; }` — Indicates unsaved changes.
**Events:**
- `event PropertyChangedEventHandler PropertyChanged` — Declared but not explicitly invoked in visible code.
**Methods:**
- `void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)` — Private handler that raises `NotificationRequest` with title, message, details, and image from the event args.
- `override void Initialize()` — Throws `NotImplementedException`.
- `override void Initialize(object parameter)` — Throws `NotImplementedException`.
- `void Initialize(object parameter, object model)` — Throws `NotImplementedException` (hides base with `new`).
- `override void Activated()` — Throws `NotImplementedException`.
- `override void Cleanup()` — Throws `NotImplementedException`.
- `Task CleanupAsync()` — Throws `NotImplementedException` (hides base with `new`).
- `override Task InitializeAsync()` — Throws `NotImplementedException`.
- `override Task InitializeAsync(object parameter)` — Throws `NotImplementedException`.
### Invariants
- The View's `DataContext` is always set to the ViewModel instance upon construction.
- The ViewModel subscribes to `RaiseNotification` event via `EventAggregator` on construction.
- `IsDirty` is read-only externally (private setter).
### Dependencies
**Depends on:**
- `DTS.Common.Base` (`BaseViewModel<T>`)
- `DTS.Common.Events` (`RaiseNotification`, `NotificationContentEventArgs`, `NotificationContentEventArgsWithoutTitle` — inferred from usage)
- `DTS.Common.Interface` (`IViewModel`, `IDockPanelHorizontalViewModel`, `IDockPanelHorizontalView`)
- `Microsoft.Practices.Prism.Events` (`IEventAggregator