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,64 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Loader/App.xaml.cs
- DTS Viewer/DTS.Viewer.Loader/MainWindow.xaml.cs
- DTS Viewer/DTS.Viewer.Loader/ViewerLoaderSession.cs
- DTS Viewer/DTS.Viewer.Loader/Bootstrapper.cs
generated_at: "2026-04-17T15:52:51.752685+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2bbbfac876b8311b"
---
# DTS.Viewer.Loader Module Documentation
## 1. Purpose
The `DTS.Viewer.Loader` module serves as the application entry point and bootstrapping layer for a Prism-based WPF viewer application. It is responsible for initializing the Unity dependency injection container, configuring module discovery via directory-based catalogs, creating the main shell window, and orchestrating the startup of the viewer session. This module acts as the composition root that wires together the various DTS framework components and dynamically loaded plugins.
---
## 2. Public Interface
### `App` (partial class, inherits `Application`)
**File:** `App.xaml.cs`
```csharp
private void App_OnStartup(object sender, StartupEventArgs e)
```
- Application startup event handler.
- Instantiates a new `ViewerLoaderSession` and calls `CreateSession()` to initialize the application.
---
### `MainWindow` (partial class, inherits `Window`)
**File:** `MainWindow.xaml.cs`
```csharp
public MainWindow()
```
- Default constructor that calls `InitializeComponent()`.
- **Note:** Based on the `Bootstrapper.CreateShell()` implementation, this window appears to be unused; the actual shell is `ShellView` resolved from the container.
---
### `ViewerLoaderSession`
**File:** `ViewerLoaderSession.cs`
```csharp
public ViewerLoaderSession()
```
- Default constructor. Performs no initialization.
```csharp
public void CreateSession()
```
- Creates the bootstrapper, extracts core services from the Unity container (`IUnityContainer`, `IEventAggregator`, `IServiceLocator`, `IRegionManager`), resolves `IShellViewModel` and `IViewerModule`, starts the viewer session via `IViewerModule.StartSession()`, and sets the main region context.
```csharp
public void Terminate()
```
- Intended for shutdown cleanup. Currently empty. Documented as being called only when "JMPS is in the process of shutting down."
**Public Properties:**
-

View File

@@ -0,0 +1,41 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Loader/Properties/Settings.Designer.cs
- DTS Viewer/DTS.Viewer.Loader/Properties/AssemblyInfo.cs
- DTS Viewer/DTS.Viewer.Loader/Properties/Resources.Designer.cs
generated_at: "2026-04-17T16:11:52.544183+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "90fb80f104407c0f"
---
# Properties
### 1. Purpose
This module provides the assembly metadata and configuration settings for the `DTS.Viewer.Loader` assembly. It specifically defines a path for a `PluginFolder`, indicating that this assembly is likely responsible for loading external modules or runtime components from a relative directory path.
### 2. Public Interface
**Class: `Settings`** (in `Settings.Designer.cs`)
* `public static Settings Default { get; }`: Singleton instance accessor.
* `public string PluginFolder { get; }`: An application-scoped setting containing the relative path `"../../../../RunTimeModules"`.
**Class: `Resources`** (in `Resources.Designer.cs`)
* `internal static global::System.Resources.ResourceManager ResourceManager { get; }`: Accessor for the resource manager.
* `internal static global::System.Globalization.CultureInfo Culture { get; set; }`: Accessor for the current UI culture.
**Assembly Attributes** (in `AssemblyInfo.cs`)
* `AssemblyTitle`: "DTS.Viewer.Loader"
* `AssemblyCompany`: "Diversified Technical Systems, Inc. (DTS)"
### 3. Invariants
* The `PluginFolder` property is read-only (Application-scoped) and defaults to `"../../../../RunTimeModules"`.
* The `Resources` class is strictly internal to the assembly.
### 4. Dependencies
* **Depends on**: `System.Configuration`, `System.Resources`.
* **Depended on by**: The `DTS.Viewer.Loader` logic (for locating plugins).
### 5. Gotchas
* The `PluginFolder` path uses a relative path syntax (`../../../../RunTimeModules`). The actual resolved path depends entirely on the current working directory of the process when the setting is read, which may lead to failures if the application is launched from an unexpected location.
---

View File

@@ -0,0 +1,53 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Loader/View/ShellView.xaml.cs
generated_at: "2026-04-17T16:14:09.336185+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "96ab4a7b54264b7e"
---
# View
### Purpose
This module contains the `ShellViewModel` class, which serves as the ViewModel for the main application shell in a WPF application built using the Prism framework. It acts as the orchestration layer for the UI, managing the view's DataContext, handling interaction requests (notifications/confirmations), and coordinating region navigation via the `IRegionManager`. It bridges the view (`IShellView`) and the backend services via dependency injection (`IUnityContainer`) and event aggregation (`IEventAggregator`).
### Public Interface
* **`ShellViewModel(IShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`**
* Constructor that initializes the ViewModel, sets the View's DataContext to itself, instantiates `InteractionRequest` objects, and subscribes to the `RaiseNotification` event.
* **`void Initialize()` / `void Initialize(object parameter)`**
* Empty initialization methods.
* **`void Activated()`**
* Empty activation method.
* **`void Cleanup()`**
* Throws `NotImplementedException`.
* **`Task CleanupAsync()` / `Task InitializeAsync()` / `Task InitializeAsync(object parameter)`**
* Asynchronous lifecycle methods that currently throw `NotImplementedException`.
* **`List<FrameworkElement> GetRegions()`**
* Returns a list of framework elements named "Region" within the `MainShell` grid of the view.
* **`Object ContextMainRegion`**
* Property that gets or sets the content of the `MainRegion` ContentControl in the View. Triggers `OnPropertyChanged` on set.
* **`InteractionRequest<Notification> NotificationRequest`**
* Property used to raise popup notifications in the UI.
* **`InteractionRequest<Confirmation> ConfirmationRequest`**
* Property used to raise confirmation dialogs in the UI.
* **Properties**: `Width`, `Height`, `IsMenuIncluded`, `IsNavigationIncluded`, `HeaderInfo` (returns "MainRegion"), `IsBusy`, `IsDirty` (read-only).
### Invariants
* The `View` property is assigned in the constructor and is never expected to be null during the object's lifetime.
* `NotificationRequest` and `ConfirmationRequest` are initialized immediately in the constructor and are never null.
* The `HeaderInfo` property always returns the string "MainRegion".
* `IsDirty` is a read-only property (effectively always false/default unless logic exists elsewhere).
### Dependencies
* **Dependencies:**
* `DTS.Common.Events` (for `RaiseNotification`, `NotificationContentEventArgs`)
* `DTS.Common.Interface` (for `IShellView`, `IViewerShellView`, `IViewerShellViewModel`)
* `DTS.Common.Utils` (for `Utils.GetChildrenByName`)
* `DTS.Common.Base`
* `Microsoft.Practices.Prism.Events` (for `IEventAggregator`)
* `Microsoft.Practices.Prism.Regions` (for `IRegionManager`)
* `Microsoft.Practices.Prism.Interactivity.InteractionRequest`
* `Microsoft.Practices.Unity` (for `IUnityContainer`)
* `System.ComponentModel.Composition`
* **

View File

@@ -0,0 +1,53 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Loader/ViewModel/ShellViewModel.cs
generated_at: "2026-04-17T16:14:09.333450+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "25896deb08ecc534"
---
# ViewModel
### Purpose
This module contains the `ShellViewModel` class, which serves as the ViewModel for the main application shell in a WPF application built using the Prism framework. It acts as the orchestration layer for the UI, managing the view's DataContext, handling interaction requests (notifications/confirmations), and coordinating region navigation via the `IRegionManager`. It bridges the view (`IShellView`) and the backend services via dependency injection (`IUnityContainer`) and event aggregation (`IEventAggregator`).
### Public Interface
* **`ShellViewModel(IShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`**
* Constructor that initializes the ViewModel, sets the View's DataContext to itself, instantiates `InteractionRequest` objects, and subscribes to the `RaiseNotification` event.
* **`void Initialize()` / `void Initialize(object parameter)`**
* Empty initialization methods.
* **`void Activated()`**
* Empty activation method.
* **`void Cleanup()`**
* Throws `NotImplementedException`.
* **`Task CleanupAsync()` / `Task InitializeAsync()` / `Task InitializeAsync(object parameter)`**
* Asynchronous lifecycle methods that currently throw `NotImplementedException`.
* **`List<FrameworkElement> GetRegions()`**
* Returns a list of framework elements named "Region" within the `MainShell` grid of the view.
* **`Object ContextMainRegion`**
* Property that gets or sets the content of the `MainRegion` ContentControl in the View. Triggers `OnPropertyChanged` on set.
* **`InteractionRequest<Notification> NotificationRequest`**
* Property used to raise popup notifications in the UI.
* **`InteractionRequest<Confirmation> ConfirmationRequest`**
* Property used to raise confirmation dialogs in the UI.
* **Properties**: `Width`, `Height`, `IsMenuIncluded`, `IsNavigationIncluded`, `HeaderInfo` (returns "MainRegion"), `IsBusy`, `IsDirty` (read-only).
### Invariants
* The `View` property is assigned in the constructor and is never expected to be null during the object's lifetime.
* `NotificationRequest` and `ConfirmationRequest` are initialized immediately in the constructor and are never null.
* The `HeaderInfo` property always returns the string "MainRegion".
* `IsDirty` is a read-only property (effectively always false/default unless logic exists elsewhere).
### Dependencies
* **Dependencies:**
* `DTS.Common.Events` (for `RaiseNotification`, `NotificationContentEventArgs`)
* `DTS.Common.Interface` (for `IShellView`, `IViewerShellView`, `IViewerShellViewModel`)
* `DTS.Common.Utils` (for `Utils.GetChildrenByName`)
* `DTS.Common.Base`
* `Microsoft.Practices.Prism.Events` (for `IEventAggregator`)
* `Microsoft.Practices.Prism.Regions` (for `IRegionManager`)
* `Microsoft.Practices.Prism.Interactivity.InteractionRequest`
* `Microsoft.Practices.Unity` (for `IUnityContainer`)
* `System.ComponentModel.Composition`
* **

View File

@@ -0,0 +1,61 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/AddCalculatedChannelModule.cs
generated_at: "2026-04-17T16:45:39.586862+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bf1eaf68424d2d4f"
---
# Documentation: AddCalculatedChannelModule
## 1. Purpose
This module is a Prism-based plugin for the DTS Viewer application that provides functionality to add calculated channels. It follows the module pattern to register its View and ViewModel with the Unity dependency injection container, and exposes assembly metadata (name, image, group, region) via custom attributes for display in the main application's component list. The module is designed to be dynamically loaded and integrated into the larger DTS Viewer modular architecture.
---
## 2. Public Interface
### `AddCalculatedChannelModule`
The main module class implementing `Prism.Modularity.IModule`.
**Constructor:**
```csharp
public AddCalculatedChannelModule(IUnityContainer unityContainer)
```
Accepts a Unity container instance via dependency injection and stores it in a private readonly field `_unityContainer`.
**Methods:**
```csharp
public void Initialize()
```
Registers the View and ViewModel interfaces with their concrete implementations in the Unity container:
- `IAddCalculatedChannelView``AddCalculatedChannelView`
- `IAddCalculatedChannelViewModel``AddCalculatedChannelViewModel`
```csharp
public void OnInitialized(IContainerProvider containerProvider)
```
Empty implementation — no initialization logic executed when the module is loaded.
```csharp
public void RegisterTypes(IContainerRegistry containerRegistry)
```
Calls `Initialize()` to perform type registrations.
---
### `AddCalculatedChannelModuleNameAttribute`
Assembly-level attribute extending `TextAttribute` that provides the module's display name.
**Constructor:**
```csharp
public AddCalculatedChannelModuleNameAttribute()
public AddCalculatedChannelModuleNameAttribute(string s)
```
The string parameter `s` is accepted but not used.

View File

@@ -0,0 +1,124 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Model/CalculatedChannelCreator.cs
generated_at: "2026-04-17T15:59:43.455218+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0bdba55cc7806845"
---
# CalculatedChannelCreator Documentation
## 1. Purpose
The `CalculatedChannelCreator` class is a factory responsible for creating derived data channels from existing sensor input channels. It performs mathematical transformations—including 3D IR-TRACC displacement calculations, aggregate operations (SUM, AVE, Resultant, HIC), and binary operations (integration, differentiation, trigonometric functions)—on channel data and persists the results to memory-mapped files. This module exists to support post-processing of crash test data, enabling engineers to synthesize new measurement channels from raw sensor inputs.
---
## 2. Public Interface
### `CreateChannels` (static method)
```csharp
public static Test.Module.CalculatedChannel[] CreateChannels(
string testId,
string folder,
Calculation calculation,
List<Test.Module.Channel> inputChannels,
string channelName,
int startingNumber,
List<Test.Module.Channel> allChannels,
int clipLength,
out List<string> errorList,
int defaultEncoding)
```
**Behavior:** Main entry point for creating calculated channels. Dispatches to appropriate private methods based on the `Calculation` enum value. Returns an array of `Test.Module.CalculatedChannel` objects on success, or `null` if validation fails. Populates `errorList` with validation errors.
### `ValidateChannelName` (static method)
```csharp
public static bool ValidateChannelName(
string channelName,
List<Test.Module.Channel> inputChannels,
List<Test.Module.Channel> allChannels,
out List<string> errorList)
```
**Behavior:** Validates that the channel name is non-empty and unique across both input channels and all channels. Returns `true` if valid; `false` otherwise. If `allChannels` is `null`, validation is bypassed and returns `true`.
### `ThreeDIRTraccType` (public enum)
```csharp
public enum ThreeDIRTraccType
{
Thorax,
Abdomen,
LowerThorax
}
```
**Behavior:** Specifies the anatomical location for 3D IR-TRACC calculations, which affects the constants (`δ` and `D0`) used in the displacement formulas.
---
## 3. Invariants
1. **Channel Number Offset:** All calculated channels use `ChannelNumberCalculationChannelIndicator` (constant value `100000`) as a base offset for their channel numbers.
2. **Sample Rate Compatibility:** For aggregate and 3D IR-TRACC operations, the maximum sample rate among input channels must be an integer multiple of each individual channel's sample rate. Otherwise, `NotSupportedException` is thrown.
3. **3D IR-TRACC Input Count:** `Create3DIRTraccChannels` asserts that exactly 3 input channels are provided.
4. **Aggregate Operation Input Count:** `CreateChannelsAggregateOperation` asserts that at least 2 input channels are provided (assertion message says "at least 1" but checks `1 < inputChannels.Count`).
5. **File Overwrite Safety:** `CreatePersistentInformationObject` deletes any existing file at the target filepath before creating a new persistent channel, using `GC.Collect()` followed by `FileUtils.DeleteFileOrMove`.
6. **Engineering Units Padding:** When persisting engineering units, the string is padded to even length for word-alignment if its length is odd.
---
## 4. Dependencies
### This Module Depends On:
- `DTS.Common.Enums.Sensors` - For `SensorConstants` (δ and D0 values)
- `DTS.Common.Utilities.Logging` - For `APILogger.Log`
- `DTS.Common.Utils` - For `FileUtils`
- `DTS.Serialization` - For `SliceRaw.File` format handling
- `DTS.Slice.Control` - Unclear specific usage (imported but no direct reference visible)
- `DTS.Common` - For `Constants.ADC_MIDPOINT`, `ZeroMethodType`
- `DTS.Common.Events` - For `PageErrorEvent`, `PageErrorArg`
- `DTS.Common.Calculations` - For `HeadInjuryCriterion`
- `DTS.Common.Utilities.Math.Nhtsa` - For `Integration`, `Differentiation`
- `Prism.Ioc` - For `ContainerLocator`
- `Prism.Events` - For `IEventAggregator`
- `Test.Module` namespace - For `Channel`, `CalculatedChannel`, `AnalogInputChannel`
- `Event.Module` namespace - For `Channel`, `AnalogInputChannel`
### What Depends On This Module:
- **Unclear from source alone** - No consumers are shown in this file.
---
## 5. Gotchas
### Critical Bugs Identified:
1. **Copy-Paste Error in `PerformCalculation` (line ~378):**
```csharp
var stepRPot1 = Convert.ToInt32(Math.Ceiling(indexAtCurrentTimeIRTracc) - actualIndexAtCurrentTimeIRTracc);
```
Uses `indexAtCurrentTimeIRTracc` instead of `indexAtCurrentTimeRPot1`. This causes incorrect interpolation for the R-Pot1 channel.
2. **Assignment Instead of Subtraction in `PerformCalculation` (line ~403):**
```csharp
incrementRPot2 = (valueRPot2AtPoint = rPot2EUData[actualIndexAtCurrentTimeRPot2 - 1]) / rateRPot2;
```
This is an assignment (`=`) inside parentheses, overwriting `valueRPot2AtPoint`, when it should be a subtraction (`-`).
3. **Unused Variable in `PerformCalculationsAggregate` (line ~151):**
```csharp
var timeAtIndex =
```
Variable is declared but never assigned or used. This is a syntax error or incomplete implementation.
### Non-Obvious Behaviors:
4. **Debug/Test Data Injection:** The method calls `DiskUtility.ReplaceDataIfNeeded(ref irTraccEUData, "DISPLEU.txt")` and similar for other channels. This appears to be a debug feature that can override channel data from disk files. Production behavior is unclear.
5. **Explicit `GC.Collect()` Call:** In `CreatePersistentInformationObject`, `GC.Collect()` is called before file deletion to handle file locks. This is a heavy operation that may cause performance issues.
6. **ScaleEuData Logic Appears Inverted:** When `max > short.MaxValue`, the scale factor calculation `scaleFactor = max / short.MaxValue` produces a value ≥ 1, which would amplify data that's already too large, potentially causing overflow when casting to `short`.
7. **HIC Unit Conversion:** For HIC calculations, if engineering units are not "g", the code multiplies by `9.80665` to convert from m/s² to g's. This assumes the input is in m/s², which may not always be true.
8. **Commented-Out Code:** There is a commented-out `DeleteChannelFile` method and associated logic for deferred file deletion, suggesting historical changes to file handling behavior.

View File

@@ -0,0 +1,41 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:29:26.442754+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a42ffb66848e031f"
---
# Properties
### Purpose
This module contains assembly metadata for the `DTS.Viewer.AddCalculatedChannel` component. It is a standard .NET assembly information file that defines versioning, copyright, and COM visibility settings for the compiled output. It exists solely to provide identity and configuration information for the assembly at build time.
### Public Interface
No public types or functions are defined. This file only declares assembly-level attributes:
- `AssemblyTitle`: "DTS.Viewer.AddCalculatedChannel"
- `AssemblyDescription`: Empty
- `AssemblyProduct`: "DTS.Viewer.AddCalculatedChannel"
- `AssemblyCopyright`: "Copyright © 2017"
- `AssemblyVersion`: "1.0.0.0"
- `AssemblyFileVersion`: "1.0.0.0"
- `ComVisible`: false
- `Guid`: "6451f3ed-934e-47e3-a1ca-33c223a6507a"
### Invariants
- Assembly version is fixed at 1.0.0.0 (no auto-increment wildcard).
- COM visibility is disabled for all types in this assembly.
### Dependencies
**Depends on:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Unclear from source alone (consumed by the build system).
### Gotchas
None identified from source alone. This is boilerplate assembly metadata.
---

View File

@@ -0,0 +1,29 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:56:15.275064+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "485d316f89383148"
---
# Documentation: DTS.Viewer.AddCalculatedChannel.Resources
## 1. Purpose
This module provides localization/internationalization infrastructure for the "Add Calculated Channel" feature within the DTS Viewer application. It consists of a WPF markup extension (`TranslateExtension`) that enables XAML-based string localization, backed by an auto-generated strongly-typed resource class (`StringResources`) that exposes localized strings for UI labels, calculation types, error messages, and sensor-related terminology (IR-TRACC, HIC calculations, etc.).
---
## 2. Public Interface
### `TranslateExtension` (Markup Extension)
**Namespace:** `DTS.Viewer.AddCalculatedChannel`
A WPF markup extension for retrieving localized strings in XAML bindings.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in

View File

@@ -0,0 +1,34 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/View/AddCalculatedChannelView.xaml.cs
generated_at: "2026-04-17T16:13:40.916446+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9d3bcf84fac09edf"
---
# 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,207 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/ViewModel/AddCalculatedChannelViewModel.cs
generated_at: "2026-04-17T16:00:17.185622+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "71a9c8acbea4fb64"
---
# Documentation: AddCalculatedChannelViewModel
## 1. Purpose
This module provides the ViewModel for the "Add Calculated Channel" feature in the DTS Viewer application. It manages the UI logic and business rules for creating derived data channels from existing test data, supporting multiple calculation types including mathematical operations (Integral, Derivative, Sin, Cos), aggregations (SUM, Average, Resultant), and specialized biomechanical calculations (HIC, 3D IR-Tracc variants). The ViewModel handles channel selection, validation, file I/O operations, and coordinates with the event aggregation system to notify other application components of changes.
## 2. Public Interface
### Class: `AddCalculatedChannelViewModel`
**Inherits:** `BaseViewModel<IAddCalculatedChannelViewModel>`
**Implements:** `IAddCalculatedChannelViewModel`
### Constructor
```csharp
public AddCalculatedChannelViewModel(
IAddCalculatedChannelView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets up the View's DataContext, creates interaction requests, and registers the `AddCalculatedChannelCommand`.
### Public Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IBaseView` | The associated view instance. |
| `Parent` | `IBaseViewModel` | The parent ViewModel passed during initialization. |
| `ContextSearchRegion` | `object` | Context for search region (usage unclear from source). |
| `NotificationRequest` | `InteractionRequest<Notification>` | Raises notification dialogs. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Raises confirmation dialogs. |
| `HeaderInfo` | `string` | Returns `"AddCalculatedChannelRegion"`. |
| `IsBusy` | `bool` | **Throws `NotImplementedException`** on get/set. |
| `IsDirty` | `bool` | **Throws `NotImplementedException`** on get. |
| `IsAddCalculatedChannelIncluded` | `bool` | Gets/sets inclusion flag. |
| `IncludeGroupNameInISOExport` | `bool` | Controls whether group names are included in ISO export. |
| `DefaultDTSEncoding` | `int` | Encoding code page for DTS file operations. |
| `ChannelName` | `string` | Name for the new calculated channel. |
| `ChannelDescription` | `string` | Auto-generated description based on selected calculation and channels. |
| `IsoCode` | `string` | ISO code for the channel (defaults to `"NONE"`). |
| `SingleChannelSelectorVisibility` | `bool` | Controls visibility for single-channel selection UI. |
| `HICChannelSelectorVisibility` | `bool` | Controls visibility for HIC channel selection UI. |
| `MultipleChannelSelectorVisibility` | `bool` | Controls visibility for multi-channel selection UI. |
| `ThreeDIRTRACCVisibility` | `bool` | Controls visibility for 3D IR-Tracc channel selection UI. |
| `CalculationList` | `CalculationHelper[]` | Lazy-initialized list of available calculations. |
| `SelectedCalculation` | `CalculationHelper` | Currently selected calculation type. |
| `ChannelList` | `ObservableCollection<ITestChannel>` | All available input channels. |
| `ChannelListObjects` | `ObservableCollection<ChannelHelper>` | Wrapped channel objects with `IsIncluded` tracking. |
| `AvailableHICChannels` | `ChannelHelper[]` | Channels with acceleration units valid for HIC calculation. |
| `HICAccelerationX` | `ChannelHelper` | Selected X-axis acceleration channel for HIC. |
| `HICAccelerationY` | `ChannelHelper` | Selected Y-axis acceleration channel for HIC. |
| `HICAccelerationZ` | `ChannelHelper` | Selected Z-axis acceleration channel for HIC. |
| `HICLength` | `int` | HIC calculation length parameter (default: 16). |
| `SourceChannel` | `ITestChannel` | Selected source channel for single-channel calculations. |
| `IRTraccChannelList` | `ObservableCollection<ChannelHelper>` | Valid IR-Tracc channels. |
| `IRTraccChannel` | `ChannelHelper` | Selected IR-Tracc channel. |
| `Pot1ChannelList` | `ObservableCollection<ChannelHelper>` | Valid potentiometer 1 channels. |
| `Pot1Channel` | `ChannelHelper` | Selected potentiometer 1 channel. |
| `Pot2ChannelList` | `ObservableCollection<ChannelHelper>` | Valid potentiometer 2 channels. |
| `Pot2Channel` | `ChannelHelper` | Selected potentiometer 2 channel. |
### Public Commands
| Command | Handler | Description |
|---------|---------|-------------|
| `AddCalculatedChannelCommand` | `AddCalculatedChannel(object obj)` | Validates input, creates calculated channel(s), writes to DTS file, and publishes refresh event. |
### Public Methods
```csharp
public void PublishChanges() // Throws NotImplementedException
public override void Initialize()
public override void Initialize(object parameter)
public override void Activated()
public override void Cleanup()
public bool Validate(ref List<string> errors, ref List<string> warnings, bool displayWindow)
```
### Public Enum: `Calculation`
| Value | Name | Description Attribute |
|-------|------|------------------------|
| 0 | `Integral` | "Integral" |
| 1 | `DoubleIntegral` | "Double Integral" |
| 2 | `Derivative` | "Derivative" |
| 3 | `Sin` | "Sin" |
| 4 | `Cos` | "Cos" |
| 5 | `ThreeDIRTracc` | "3D IR-Tracc" |
| 6 | `SUM` | "SUM" |
| 7 | `AVE` | "Average" |
| 8 | `ThreeDIRTraccAbdomen` | "3D IR-TRACC Abdomen" |
| 9 | `ThreeDIRTraccLowerThorax` | "3D IR-TRACC Lower Thorax" |
| 10 | `Resultant` | "Resultant" |
| 11 | `HIC` | "HIC" |
### Public Nested Classes
#### `ChannelHelper`
Wraps `ITestChannel` with display formatting and inclusion tracking.
| Member | Type | Description |
|--------|------|-------------|
| `MyChannel` | `ITestChannel` | The wrapped channel. |
| `DisplayName` | `string` | Formatted display name based on `IsoViewMode`. |
| `ChannelName` | `string` | Returns `ToString()` of the channel. |
| `IsIncluded` | `bool` | Tracks whether channel is included in multi-select calculations. |
#### `CalculationHelper`
Wraps `Calculation` enum with localized string representation.
| Member | Type | Description |
|--------|------|-------------|
| `MyCalculation` | `Calculation` | The wrapped calculation type. |
| `ToString()` | `string` | Returns localized name from resources or enum name. |
## 3. Invariants
1. **Channel List Ordering**: `ChannelList` is always sorted by `AbsoluteDisplayOrder` via `CompareDisplayOrders` comparison.
2. **IR-Tracc Channel Eligibility**: Channels in `IRTraccChannelList` must satisfy all of:
- `ChannelType` equals `Test.Module.AnalogInputChannel` type string
- `LinearizationFormula` is valid (via `LinearizationFormula.IsValid()`)
- `ZeroMethod` equals `ZeroMethodType.None`
- `ZeroPoint` is not zero
- `FactoryExcitationVoltage` is not zero
3. **Potentiometer Channel Eligibility**: Channels in `Pot1ChannelList` and `Pot2ChannelList` must satisfy:
- `ChannelType` equals `Test.Module.AnalogInputChannel` type string
- `Eu` (engineering units) is `"deg"` or `"deg-ang"` (case-insensitive)
- `ZeroMethod` equals `ZeroMethodType.None`
- `FactoryExcitationVoltage` is not zero
4. **HIC Channel Eligibility**: Channels in `AvailableHICChannels` must have engineering units contained in `Constants.ACCELERATION_UNITS`.
5. **Resultant Validation**: All included channels for Resultant calculation must have matching `SensitivityUnits` and `SampleRateHz`.
6. **HIC Validation**: HIC calculation requires all three acceleration channels (X, Y, Z) to be non-null.
7. **File Backup**: DTS file backup is only created if a backup file does not already exist.
## 4. Dependencies
### Direct Dependencies (Imports)
- `DTS.Common` / `DTS.Common.Base` / `DTS.Common.Utils` / `DTS.Common.Utilities.Logging`
- `DTS.Common.Classes.Viewer.Commands` (for `RelayCommand`)
- `DTS.Common.DAS.Concepts`
- `DTS.Common.Enums.Sensors` (for `ZeroMethodType`)
- `DTS.Common.Events` (for event types)
- `DTS.Common.Interactivity` (for `InteractionRequest`, `Notification`, `Confirmation`)
- `DTS.Common.Interface`
- `DTS.Slice.Control`
- `DTS.Viewer.AddCalculatedChannel.Model`
- `DTS.Serialization.Test` (aliased as `Test`)
- `Prism.Events` (for `IEventAggregator`)
- `Prism.Regions` (for `IRegionManager`)
- `Unity` (for `IUnityContainer`)
### Events Subscribed
- `RaiseNotification``OnRaiseNotification`
- `TestSummaryChangeNotification``OnTestSummaryChanged`
### Events Published
- `SetSaveButton` (via `SaveButtonUsability` payload)
- `PageErrorEvent` (via `PageErrorArg` payload)
- `RefreshTestRequestEvent` (with DTS file path)
- `RaiseNotification` (via `NotificationContentEventArgs`)
### Consumers
Unknown from source alone. The module is instantiated via Unity dependency injection and navigated to via Prism regions.
## 5. Gotchas
1. **Unimplemented Members**: `IsBusy`, `IsDirty`, and `PublishChanges()` throw `NotImplementedException`. These appear to be interface requirements that were never implemented.
2. **HIC Save Button Logic Appears Inverted**: In `UpdateSaveButtonVisibility()`, the HIC case sets `IsUsable = true` when acceleration channels are null and `IsUsable = false` when they are set. This appears to be a bug—the logic should likely be inverted.
```csharp
case Calculation.HIC:
if (null == HICAccelerationX || null == HICAccelerationY || null == HICAccelerationZ)
{
_eventAggregator.GetEvent<SetSaveButton>().Publish(new SaveButtonUsability() { IsUsable = true }); // Suspect
}
else
{
_eventAggregator.GetEvent<SetSaveButton>().Publish(new SaveButtonUsability() { IsUsable = false }); // Suspect
}
break;
```
3. **Member Hiding with `new` Keyword**: The class uses `new` to hide inherited members (`PropertyChanged`, `OnPropertyChanged`, `IsBusy`, `IsDirty`, `ConfirmationRequest`). This can lead to unexpected behavior when the ViewModel is accessed via base class references.
4. **Thread.Sleep in File Write**: A `Thread.Sleep(10)` follows the file write operation in `AddCalculatedChannel()`. This suggests a timing-related workaround for file system operations.
5. **Backup File Deletion**: After successful save, the backup file is deleted only if it was created during that save operation (`!backupExisted`). Original backups are preserved.
6. **Channel Loading Side Effect**: `OnTestSummaryChanged` triggers lazy loading of channel data via `Utils.SetChannelInfo()` when `ts.Channels.FirstOrDefault() == null`, modifying the test metadata in place.
7. **Default Encoding Fallback**: If `Encoding.GetEncoding(DefaultDTSEncoding)` fails, the code falls back to `Encoding.Default` without re-throwing, potentially causing encoding mismatches.

View File

@@ -0,0 +1,38 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/ChartOptionsModule.cs
generated_at: "2026-04-17T16:45:35.849303+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "dbbe5595baa7b41f"
---
# Documentation: ChartOptionsModule.cs
## 1. Purpose
This module serves as the Prism module initializer for the `DTS.Viewer.ChartOptions` assembly. Its primary role is to register chart options-related views, view models, and models with the Unity dependency injection container, enabling the DTS Viewer application to discover and load chart configuration functionality. Additionally, it defines assembly-level metadata attributes that expose the module's name, image icon, group classification, and target region to the main application shell.
---
## 2. Public Interface
### `ChartOptionsModule` (class)
Implements `Prism.Modularity.IModule`. The main module entry point for the ChartOptions feature.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ChartOptionsModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. Required by `IModule`. |
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation. Required by `IModule`. |
| `Initialize` | `void Initialize()` | Registers three types with Unity: `IChartOptionsView``ChartOptionsView`, `IChartOptionsViewModel``ChartOptionsViewModel`, `IChartOptionsModel``ChartOptionsModel`. |
### `ChartOptionsModuleNameAttribute` (class)
Extends `TextAttribute`. Assembly-level attribute providing the module's name.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ChartOptionsModuleNameAttribute()` | Initializes with `AssemblyName` set to `AssemblyNames.ChartOptions.ToString()`. |
| Constructor | `ChartOptionsModuleNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `AssemblyNames.ChartOptions.ToString()`. |
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`.

View File

@@ -0,0 +1,14 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Model/ChartOptionsModel.cs
generated_at: "2026-04-17T15:59:30.841040+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f69f24106dae95d3"
---
# Documentation: ChartOptionsModel
## 1. Purpose
`ChartOptionsModel` is a model class within the `DTS.Viewer.ChartOptions` module that encapsulates configuration state for chart visualization options. It serves as a data-bound model in an MVVM architecture, managing

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:21.103396+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3d3c0935753bde1d"
---
# Properties
### Purpose
This module contains assembly-level metadata for the `DTS.Viewer.Test` assembly. It provides versioning, copyright, and COM visibility configuration using standard .NET Framework assembly attributes. This is a boilerplate configuration module with no runtime logic.
### Public Interface
No public types are exposed by this module. It contains only assembly-level attributes:
- **`AssemblyTitle`**: "DTS.Viewer.Test"
- **`AssemblyDescription`**: Empty
- **`AssemblyVersion`**: "1.0.0.0"
- **`AssemblyFileVersion`**: "1.0.0.0"
- **`ComVisible`**: false
- **`Guid`**: "b2b2b862-1b93-476a-8246-91e1310c7ec7"
### Invariants
- Assembly version is fixed at 1.0.0.0; manual updates required for version increments.
- COM visibility is disabled for all types in this assembly.
### Dependencies
- **Depends on:** `System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices` (standard .NET Framework assemblies)
- **Depended on by:** Not applicable; this is configuration metadata.
### Gotchas
- The `AssemblyTitle` is "DTS.Viewer.Test" while the module path suggests "DTS.Viewer.TestSummaryList". This discrepancy may indicate a rename occurred without updating assembly metadata, or the title attribute is intentionally generic.
---

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:11:50.603414+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b9710c66f9ec0c0d"
---
# Resources
### Purpose
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
### Public Interface
**`TranslateExtension` class** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
**`StringResources` class** (internal, auto-generated)
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
- `static string Search { get; }` - Localized string resource for "Search".
### Invariants
- `ProvideValue` always returns a non-null string.
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
### Dependencies
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
### Gotchas
- `StringResources`

View File

@@ -0,0 +1,19 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/View/ChartOptionsView.xaml.cs
generated_at: "2026-04-17T16:13:13.901944+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4ba631a9f013b7f7"
---
# View
### Purpose
This module provides the WPF view component for chart configuration options in the DTS Viewer application. It implements `IChartOptionsView` and serves as a data provider for available filter classes (CFC - Class Filter Classes) used in sensor data analysis, exposing filter options through the `AnalogSettingDefaults` infrastructure.
### Public Interface
- **`ChartOptionsView()`** - Constructor that initializes the XAML component via `InitializeComponent()`.
- **`AvailableCFC`** (`List<IFilterClass>`) - Read-only property that returns available filter

View File

@@ -0,0 +1,22 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/ViewModel/ChartOptionsViewModel.cs
generated_at: "2026-04-17T15:59:04.271654+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c0b9efc3f556df6f"
---
# Documentation: ChartOptionsViewModel
## 1. Purpose
`ChartOptionsViewModel` is a Prism-based view model responsible for managing chart configuration options within the DTS Viewer application. It serves as an intermediary between the UI (`IChartOptionsView`) and the charting system, handling user interactions for cursor display, zoom reset, PDF export, and unit type selection (EU, mV, ADC). The module communicates with parent view models and other components via Prism's `IEventAggregator`, publishing chart option changes and responding to external events such as channel selection and axis changes.
---
## 2. Public Interface
### Class Signature
```csharp
public class Chart

View File

@@ -0,0 +1,34 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/FilterModule.cs
generated_at: "2026-04-17T16:29:16.940341+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9b2fb11444b566f3"
---
# DTS.Viewer.Filter
### 1. Purpose
This module serves as a Prism module responsible for registering the "Filter" component within the DTS Viewer application. It integrates with the Unity dependency injection container to register a view (`FilterView`) and its corresponding view-model (`FilterViewModel`). Additionally, it defines assembly-level attributes to expose metadata (name, image, region, and group) to the broader application, likely for dynamic UI generation or module listing in the main shell.
### 2. Public Interface
* **`FilterModule` class**
* `FilterModule(IUnityContainer unityContainer)`: Constructor that accepts a Unity container instance for dependency injection.
* `RegisterTypes(IContainerRegistry containerRegistry)`: Implements `IModule`. Invokes the `Initialize()` method to register types.
* `OnInitialized(IContainerProvider containerProvider)`: Implements `IModule`. Currently empty in this implementation.
* `Initialize()`: Registers `IFilterView` to `FilterView` and `IFilterViewModel` to `FilterViewModel` with the Unity container.
* **`FilterPropertiesNameAttribute` class** (inherits `TextAttribute`)
* `FilterPropertiesNameAttribute()`: Default constructor.
* `FilterPropertiesNameAttribute(string s)`: Overloaded constructor (parameter unused).
* `AssemblyName`: Property returning `AssemblyNames.Filter.ToString()`.
* `GetAttributeType()`: Returns `typeof(TextAttribute)`.
* **`FilterPropertiesImageAttribute` class** (inherits `ImageAttribute`)
* `AssemblyImage`: Property that fetches a `BitmapImage` using `AssemblyInfo.GetImage`.
* `AssemblyName`: Property returning `AssemblyNames.Filter.ToString()`.
* `AssemblyGroup`: Property returning `eAssemblyGroups.Viewer.ToString()`.
* `AssemblyRegion`: Property returning `eAssemblyRegion.FilterRegion`.
### 3. Invariants
* The module is named "FilterProperties" (defined in `[Module(ModuleName = "FilterProperties")]`).
* The `FilterPropertiesNameAttribute

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:15.475534+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7eadeb859dc3edcd"
---
# Properties
### Purpose
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
### Public Interface
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
- `AssemblyVersion`: "1.0.0.0"
- `AssemblyFileVersion`: "1.0.0.0"
- `ComVisible`: false
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
### Invariants
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
### Dependencies
**Depends on:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
### Gotchas
- `AssemblyDescription` is empty, providing no documentation

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:11:50.600783+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c29875f02a7ceb6f"
---
# Resources
### Purpose
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
### Public Interface
**`TranslateExtension` class** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
**`StringResources` class** (internal, auto-generated)
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
- `static string Search { get; }` - Localized string resource for "Search".
### Invariants
- `ProvideValue` always returns a non-null string.
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
### Dependencies
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
### Gotchas
- `StringResources`

View File

@@ -0,0 +1,34 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/View/FilterView.xaml.cs
generated_at: "2026-04-17T16:13:21.098165+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0165fcfef81ef95d"
---
# View
### Purpose
This module provides the `FilterView` class, a WPF view component that serves as a filter interface within the DTS Viewer application. It implements the `IFilterView` interface, indicating it follows a view abstraction pattern likely used for dependency injection or MVP/MVVM architecture.
### Public Interface
- **`FilterView()` (Constructor)**
- Initializes the view component by calling `InitializeComponent()`, which loads the associated XAML-defined UI elements.
- **`IFilterView` (Implemented Interface)**
- The class implements `DTS.Common.Interface.IFilterView`, though the specific interface members are not visible in this source file.
### Invariants
- The view must be properly paired with a corresponding XAML file (`FilterView.xaml`) that defines the visual layout.
- The `InitializeComponent()` method must be called exactly once during construction.
### Dependencies
- **Depends on:** `DTS.Common.Interface` (for `IFilterView` interface)
- **Depended on by:** Not determinable from source alone; likely consumed by a presenter or higher-level view composition system.
### Gotchas
- The file includes a ReSharper directive `// ReSharper disable CheckNamespace`, suggesting the namespace `DTS.Viewer.Filter` may not match the project's default namespace structure. This could cause confusion during refactoring or when locating the class.
---

View File

@@ -0,0 +1,45 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/ViewModel/FilterViewModel.cs
generated_at: "2026-04-17T16:30:27.298538+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "013c5b7190e62e52"
---
# ViewModel
### Purpose
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
### Public Interface
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
**Constructor:**
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
**Properties:**
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
- `IsBusy` (`bool`) - Busy state indicator.
- `IsDirty` (`bool`) - Dirty state indicator.
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
**Methods:**
- `void Initialize()` - Empty override.
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
- `void PublishChanges()` - Empty method (implementation appears incomplete).
**Events:**
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
### Invariants
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility

View File

@@ -0,0 +1,29 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/GraphModule.cs
generated_at: "2026-04-17T16:45:33.522591+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "203ebb9274cae2d1"
---
# Documentation: DTS.Viewer.Graph Module
## 1. Purpose
The `GraphModule` is a Prism module responsible for registering graph-related views and view models with the Unity dependency injection container in the DTS Viewer application. It serves as the composition root for the Graph subsystem, wiring up the `IGraphView`/`GraphView` and `ITestDataSeriesView`/`TestDataSeriesView` pairs with their respective view models. The module also defines assembly-level metadata attributes (`GraphNameAttribute` and `GraphImageAttribute`) that expose the module's name, image icon, group classification, and region assignment for consumption by the main application shell.
---
## 2. Public Interface
### GraphModule Class
**Implements:** `Prism.Modularity.IModule`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `GraphModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
| RegisterTypes | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registrations. |
| OnInitialized | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation; no post-initialization logic executed. |
| Initialize | `void Initialize()` | Registers view/view-model

View File

@@ -0,0 +1,159 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model/TestDataSeries.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model/TestDataSeriesModel.cs
generated_at: "2026-04-17T15:56:35.752282+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2fa01244d764d6f0"
---
# Documentation: DTS.Viewer.Graph Module - Test Data Series
## 1. Purpose
This module provides the data model and factory logic for rendering test channel data on graphs within the DTS Viewer application. `TestDataSeries` serves as the serializable, property-change-notifying data transfer object that holds channel metadata, time/frequency domain data, and computed statistics. `TestDataSeriesModel` acts as the factory that transforms raw `ITestChannel` binary data into `TestDataSeries` instances, handling time-domain, FFT, and PSD (Power Spectral Density) transformations with optional filtering and windowing.
---
## 2. Public Interface
### TestDataSeries Class
**Namespace:** `DTS.Viewer.Graph.Model`
**Inherits:** `Common.Base.BasePropertyChanged`
**Implements:** `ITestDataSeries`
#### Properties
| Property | Type | Description |
|----------|------|-------------|
| `HIC` | `bool` | Indicates if Head Injury Criteria data is present. |
| `HICValue` | `string` | Formatted HIC value. |
| `T1Time` / `T2Time` | `string` | T1/T2 timestamp strings for HIC calculations. |
| `TestGroup` | `string` | Test group identifier. |
| `TestId` | `string` | Unique test identifier. |
| `TestSetupName` | `string` | Name of the test setup configuration. |
| `ChannelId` | `string` | Channel identifier. |
| `Xvalue` | `double[]` | X-axis data array (time or frequency values). |
| `Yvalue` | `double[]` | Y-axis data array (amplitude values). |
| `GraphColor` | `Brush` | WPF brush for graph rendering. Getter creates new `SolidColorBrush` from internal `byte[]`. |
| `HardwareChannel` | `string` | Hardware channel name. |
| `Bridge` | `string` | Bridge type identifier. |
| `SWAAF` | `string` | Software anti-aliasing filter setting. |
| `HWAAF` | `string` | Hardware anti-aliasing filter rate. |
| `SampleRate` | `string` | Sample rate in Hz. |
| `RecordingMode` | `string` | Recording mode description. |
| `ISOCode` / `ISOChannelName` | `string` | ISO channel identification. |
| `UserCode` / `UserChannelName` | `string` | User-defined channel identification. |
| `ChannelName` | `string` | Display channel name. |
| `Description` | `string` | Channel description. |
| `SensorSN` | `string` | Sensor serial number. |
| `SensorSNDisplay` | `string` | Returns `Strings.Table_NA` if sensor is test-specific embedded, otherwise returns `SensorSN`. |
| `EngineeringUnits` | `string` | Engineering units string. |
| `Excitation` | `string` | Excitation voltage. |
| `Polarity` | `string` | Sensor polarity. |
| `MinY` / `MaxY` / `AvgY` / `StdDevY` | `string` | Statistical values, default to `Strings.Table_NA`. |
| `PeakMagnitude` | `double` | Peak magnitude of frequencies (valid only when `FFT` is true). |
| `PeakFrequency` | `double` | Frequency of highest magnitude (valid only when `FFT` is true). |
| `GRMS` | `double` | Root-mean-squared acceleration (calculated in PSD results). |
| `FFT` | `bool` | Indicates whether series is FFT-transformed data. |
| `T0EUValue` | `string` | T0 value regardless of units. |
| `IsSaved` | `bool` | Get-only property (purpose unclear from source). |
#### Methods
```csharp
public void SetStatsFromYValues()
```
Sets `AvgY`, `StdDevY`, `MinY`, `MaxY`, `T0EUValue` using internal `Yvalue` array. Formats using `"G5"` format string.
```csharp
public void SetStatsFromYValues(double[] values)
```
Overload that accepts an external `double[]` array. Handles null/empty arrays by setting all stats to `NaN` (displayed as `Strings.Table_NA`).
```csharp
public void SetStatsFromChannel(ITestChannel channel)
```
Sets statistics from pre-calculated values on an `ITestChannel` instance (`channel.MinY`, `channel.MaxY`, `channel.AveY`, `channel.StdDevY`, `channel.T0Value`).
---
### TestDataSeriesModel Class
**Namespace:** `DTS.Viewer.Graph`
**Implements:** `IBaseModel`
#### Properties
| Property | Type | Description |
|----------|------|-------------|
| `Parent` | `IGraphViewModel` | Parent view model reference. |
| `_eventAggregator` | `IEventAggregator` | Prism event aggregator for publishing progress events. |
| `ErrorMessage` | `string` | Error message with property change notification. |
| `IsSaved` | `bool` | Get-only property (purpose unclear from source). |
#### Methods
```csharp
public Task<ITestDataSeries> GetTestDataAsync(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
```
Async wrapper that calls synchronous `GetTestData`. Returns a single `ITestDataSeries`.
```csharp
public Task<List<ITestDataSeries>> GetTestDataAsync(List<ITestChannel> channels, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
```
Async wrapper for batch channel processing. If `psdSettings.ShowEnvelope` is true, appends an envelope channel to results.
```csharp
public List<ITestDataSeries> GetTestData(List<ITestChannel> channels, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
```
Synchronous batch processing. Catches `OutOfDataException` and re-throws with sample index context.
```csharp
public ITestDataSeries GetTestData(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
```
Entry point for single channel processing, delegates to `AddTestChannelToChart`.
```csharp
public TestDataSeries AddTestChannelToChart(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
```
**Primary factory method.** Reads binary channel data via `Serialization.SliceRaw.File.Reader.ReadChannelsBinaryData`, then:
- For **FFT mode** (`chartOptions.UnitType == FFT` and no PSD settings): Sets `FFT=true`, populates `PeakFrequency`, `PeakMagnitude`, `Xvalue`, `Yvalue`.
- For **regular time-domain**: Calculates time axis with unit conversion (ms or s), handles HIC data if present, sets stats from channel.
- For **PSD mode**: Applies data range selection, resizes to power-of-2 length, applies optional low-pass/high-pass filters, computes PSD via `FftSharp.Transform.PSD_Welch`, calculates GRMS.
Returns `null` if `channel.ErrorMessage` is not empty.
```csharp
private ITestDataSeries GetEnvelopeChannel(List<ITestDataSeries> data)
```
Creates an envelope channel by taking the maximum Y value at each frequency across all input series. Sets `ChannelId` and related fields to `Strings.EnvelopeUnique`.
```csharp
private double CalculateGRMS(double[] freq, double[] psd)
```
Calculates Grms using numerical integration of PSD curve. Handles logarithmic slope calculation with special case for N=-1.
---
## 3. Invariants
1. **Array Initialization**: `Xvalue` and `Yvalue` are initialized to empty arrays (`new double[0]`), never null.
2. **GraphColor Thread Safety**: `GraphColor` getter always creates a new `SolidColorBrush` instance; internal storage is `byte[] _graphColorARGB` to ensure thread safety (per comment referencing issue 34455).
3. **FFT/PSD Filter Bypass**: When `chartOptions.UnitType` is `FFT` or `PSD`, `channel.SoftwareFilter` is forcibly set to `"none"` before reading data.
4. **Statistics Format**: All statistical string properties use `"G5"` format specifier via `STAT_FORMAT` constant.
5. **PSD Data Length**: PSD processing resizes input arrays to the next enclosing power of 2 via `Utils.GetEnclosingPower2`.
6. **Frequency Array First Element**: In PSD processing, `freq[0]` is explicitly set to `1` after calculation.
7. **SensorSNDisplay Logic**: Returns `Strings.Table_NA` when `SensorConstants.IsTestSpecificEmbedded(SensorSN)` returns true.
---
## 4. Dependencies
### Imports (What this module depends on):
**TestDataSeries.cs:**
- `DTS.Common.Enums.Sensors` - `SensorConstants` for embedded sensor detection
- `DTS.Common.Interface` - `ITestDataSeries` interface
- `DTS.Common.Strings` - Localized string constants
- `System.Windows.Media` - WPF `Brush

View File

@@ -0,0 +1,207 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/AssemblyInfo.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/Annotations.cs
generated_at: "2026-04-17T15:56:49.185438+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "88f7afb7b05c4748"
---
# Documentation: DTS.Viewer.Graph Properties
## 1. Purpose
This module provides assembly metadata and JetBrains ReSharper code analysis annotations for the `DTS.Viewer.Graph` component within the DTS Viewer application. The `AssemblyInfo.cs` file defines standard .NET assembly attributes including versioning, copyright, and COM visibility settings. The `Annotations.cs` file contains a comprehensive set of custom attributes (sourced from JetBrains under MIT license) that enable enhanced static code analysis, nullability checking, and IDE assistance within the `DTS.Viewer.Graph.Annotations` namespace. These annotations have no runtime behavior but improve developer experience through compile-time hints and warnings.
## 2. Public Interface
### AssemblyInfo.cs - Assembly Attributes
| Attribute | Value |
|-----------|-------|
| `AssemblyTitle` | "Graph" |
| `AssemblyDescription` | "" (empty) |
| `AssemblyCompany` | "" (empty) |
| `AssemblyProduct` | "Graph" |
| `AssemblyCopyright` | "Copyright © 2017" |
| `ComVisible` | `false` |
| `Guid` | "61261c58-c32e-4dea-a87a-d7f956f28b4d" |
| `AssemblyVersion` | "1.0.0.0" |
| `AssemblyFileVersion` | "1.0.0.0" |
### Annotations.cs - Nullability Attributes
- **`CanBeNullAttribute`** - Indicates the marked element's value may be `null`. Applicable to methods, parameters, properties, delegates, fields, events, classes, interfaces, and generic parameters.
- **`NotNullAttribute`** - Indicates the marked element's value will never be `null`. Same applicability as `CanBeNullAttribute`.
- **`ItemNotNullAttribute`** - For `IEnumerable`, `Task`, or `Lazy` types, indicates collection items, `Task.Result`, or `Lazy.Value` are never `null`.
- **`ItemCanBeNullAttribute`** - For `IEnumerable`, `Task`, or `Lazy` types, indicates collection items, `Task.Result`, or `Lazy.Value` may be `null`.
### Annotations.cs - String Formatting Attributes
- **`StringFormatMethodAttribute(string formatParameterName)`** - Marks a method as using a format string pattern. Constructor takes the parameter name containing the format string.
- **`ValueProviderAttribute(string name)`** - Indicates a parameter accepts values from a limited set. Constructor takes the provider name.
### Annotations.cs - Property Change Notification
- **`NotifyPropertyChangedInvocatorAttribute`** - Marks methods used to notify property changes in `INotifyPropertyChanged` implementations. Optional constructor takes `parameterName` (string).
### Annotations.cs - Contract Annotations
- **`ContractAnnotationAttribute(string contract, bool forceFullStates = false)`** - Describes method input/output dependencies using Function Definition Table syntax. Properties: `Contract` (string), `ForceFullStates` (bool).
### Annotations.cs - Usage Annotations
- **`UsedImplicitlyAttribute`** - Marks symbols used implicitly (reflection, external libraries). Constructors accept `ImplicitUseKindFlags` and/or `ImplicitUseTargetFlags`.
- **`MeansImplicitUseAttribute`** - Applied to attributes to prevent marking decorated symbols as unused.
- **`PublicAPIAttribute`** - Marks publicly available API that should not be removed. Optional constructor takes `comment` (string).
### Annotations.cs - Method Behavior Attributes
- **`PureAttribute`** - Indicates a method makes no observable state changes.
- **`MustUseReturnValueAttribute`** - Indicates the return value must be used. Optional constructor takes `justification` (string).
- **`InstantHandleAttribute`** - Indicates a parameter is fully handled during method execution (delegates executed, enumerables enumerated).
- **`LinqTunnelAttribute`** - Marks pure LINQ methods with postponed enumeration.
- **`NoEnumerationAttribute`** - Indicates an `IEnumerable` parameter is not enumerated.
- **`TerminatesProgramAttribute`** - **[Obsolete]** Use `[ContractAnnotation("=> halt")]` instead.
### Annotations.cs - Assertion Attributes
- **`AssertionMethodAttribute`** - Marks a method as an assertion method.
- **`AssertionConditionAttribute(AssertionConditionType conditionType)`** - Marks the condition parameter of an assertion method.
- **`AssertionConditionType`** (enum) - Values: `IS_TRUE` (0), `IS_FALSE` (1), `IS_NULL` (2), `IS_NOT_NULL` (3).
### Annotations.cs - Collection Attributes
- **`CollectionAccessAttribute(CollectionAccessType collectionAccessType)`** - Describes how a method affects collection content.
- **`CollectionAccessType`** (flags enum) - Values: `None` (0), `Read` (1), `ModifyExistingContent` (2), `UpdatedContent` (6).
### Annotations.cs - Implicit Use Enums
- **`ImplicitUseKindFlags`** (flags enum) - Values: `Default`, `Access` (1), `Assign` (2), `InstantiatedWithFixedConstructorSignature` (4), `InstantiatedNoFixedConstructorSignature` (8).
- **`ImplicitUseTargetFlags`** (flags enum) - Values: `Default`, `Itself` (1), `Members` (2), `WithMembers` (3).
### Annotations.cs - ASP.NET MVC Attributes
- **`AspMvcActionAttribute`** - Marks MVC action parameters/methods. Optional constructor takes `anonymousProperty` (string).
- **`AspMvcAreaAttribute`** - Marks MVC area parameters.
- **`AspMvcControllerAttribute`** - Marks MVC controller parameters/methods.
- **`AspMvcMasterAttribute`** - Marks MVC Master parameters.
- **`AspMvcModelTypeAttribute`** - Marks MVC model type parameters.
- **`AspMvcPartialViewAttribute`** - Marks MVC partial view parameters/methods.
- **`AspMvcViewAttribute`** - Marks MVC view component parameters/methods.
- **`AspMvcViewComponentAttribute`** - Marks MVC view component name parameters.
- **`AspMvcViewComponentViewAttribute`** - Marks MVC view component view parameters/methods.
- **`AspMvcActionSelectorAttribute`** - Marks MVC action name parameters in attributes.
- **`AspMvcSuppressViewErrorAttribute`** - Disables MVC view inspections for a class/method.
- **`AspMvcDisplayTemplateAttribute`** - Marks MVC display template parameters.
- **`AspMvcEditorTemplateAttribute`** - Marks MVC editor template parameters.
- **`AspMvcTemplateAttribute`** - Marks MVC template parameters.
### Annotations.cs - ASP.NET MVC Location Format Attributes
- **`AspMvcAreaMasterLocationFormatAttribute(string format)`**
- **`AspMvcAreaPartialViewLocationFormatAttribute(string format)`**
- **`AspMvcAreaViewLocationFormatAttribute(string format)`**
- **`AspMvcMasterLocationFormatAttribute(string format)`**
- **`AspMvcPartialViewLocationFormatAttribute(string format)`**
- **`AspMvcViewLocationFormatAttribute(string format)`**
### Annotations.cs - ASP.NET Control Attributes
- **`AspChildControlTypeAttribute(string tagName, Type controlType)`**
- **`AspDataFieldAttribute`**
- **`AspDataFieldsAttribute`**
- **`AspMethodPropertyAttribute`**
- **`AspRequiredAttributeAttribute(string attribute)`**
- **`AspTypePropertyAttribute(bool createConstructorReferences)`**
### Annotations.cs - Razor Attributes
- **`RazorSectionAttribute`** - Marks Razor section parameters/methods.
- **`RazorImportNamespaceAttribute(string name)`** - Assembly-level, multiple allowed.
- **`RazorInjectionAttribute(string type, string fieldName)`** - Assembly-level, multiple allowed.
- **`RazorDirectiveAttribute(string directive)`** - Assembly-level, multiple allowed.
- **`RazorHelperCommonAttribute`** - Method-level.
- **`RazorLayoutAttribute`** - Property-level.
- **`RazorWriteLiteralMethodAttribute`** - Method-level.
- **`RazorWriteMethodAttribute`** - Method-level.
- **`RazorWriteMethodParameterAttribute`** - Parameter-level.
### Annotations.cs - HTML Attributes
- **`HtmlElementAttributesAttribute`** - Optional constructor takes `name` (string).
- **`HtmlAttributeValueAttribute(string name)`**
### Annotations.cs - XAML Attributes
- **`XamlItemsControlAttribute`** - Marks types with `ItemsSource` property.
- **`XamlItemBindingOfItemsControlAttribute`** - Marks `BindingBase`-derived properties.
### Annotations.cs - Other Attributes
- **`LocalizationRequiredAttribute(bool required = true)`** - Indicates localization requirements.
- **`CannotApplyEqualityOperatorAttribute`** - Disallows `==`/`!=` operators (except with `null`).
- **`BaseTypeRequiredAttribute(Type baseType)`** - Applied to attributes to require implementers to inherit/implement a type.
- **`ProvidesContextAttribute`** - Indicates a context value provider.
- **`PathReferenceAttribute`** - Marks file/folder path parameters. Optional constructor takes `basePath` (string).
- **`SourceTemplateAttribute`** - Marks extension methods as source templates.
- **`MacroAttribute`** - Specifies macros for source template parameters. Properties: `Expression` (string), `Editable` (int), `Target` (string).
- **`RegexPatternAttribute`** - Marks regex pattern parameters.
- **`NoReorderAttribute`** - Prevents member reordering in the marked type.
## 3. Invariants
- **Assembly Versioning**: Both `AssemblyVersion` and `AssemblyFileVersion` are fixed at "1.0.0.0".
- **COM Visibility**: `ComVisible` is `false`, making types invisible to COM components by default.
- **Namespace Consistency**: All annotation attributes reside in `DTS.Viewer.Graph.Annotations` namespace.
- **Attribute Usage Constraints**: Each attribute has specific `AttributeUsage` constraints defining valid targets (method, parameter, property, etc.).
- **License Requirement**: The `Annotations.cs` file is MIT licensed from JetBrains; the copyright notice must be preserved in copies.
## 4. Dependencies
### Imports (AssemblyInfo.cs)
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
### Imports (Annotations.cs)
- `System`
### Downstream Dependencies
- **Unclear from source alone** - The annotation attributes are designed for consumption by JetBrains ReSharper and Rider IDEs. The `DTS.Viewer.Graph` assembly likely contains graph-related functionality used by other modules in the DTS Viewer application, but the actual consumers cannot be determined from these files alone.
## 5. Gotchas
- **`TerminatesProgramAttribute` is Obsolete**: This attribute is marked `[Obsolete]` with guidance to use `[ContractAnnotation("=> halt")]` instead. New code should not use it.
- **Annotations are Compile-Time Only**: All attributes in `Annotations.cs` are for static analysis only. They have no runtime behavior and will not affect execution.
- **Pragma Warnings Disabled**: The `Annotations.cs` file disables warning 1591 (missing XML documentation) and includes multiple ReSharper directive disables at the file level.
- **Empty Assembly Metadata**: Several assembly attributes (`AssemblyDescription`, `AssemblyConfiguration`, `AssemblyCompany`) are empty strings, which may indicate incomplete configuration.
- **Hardcoded Copyright Year**: The copyright is hardcoded to 2017; this may need updating for newer releases.

View File

@@ -0,0 +1,25 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:11:57.317533+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "324d8a7946627095"
---
# Resources
### Purpose
This module provides localization support for the Graph module through a XAML markup extension and strongly-typed resource access. It follows the same pattern as the ViewerSettings/Resources module but contains graph-specific localized strings for error messages, status messages, and save operation feedback related to chart and report operations.
### Public Interface
**TranslateExtension** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string from `StringResources.ResourceManager.GetString(_key)`. Returns `"#stringnotfound#"` if key is null/empty, or `"#stringnotfound# " + _key` if the key is not found in resources.
**StringResources** (auto-generated)
- `ResourceManager` - Static property returning the cached `ResourceManager` instance for the `"DTS.Viewer.Graph.Resources.StringResources"` resource name.
- `Culture` - Static property for getting/setting the `CultureInfo` for resource lookups.
- `BadDataFromCustomFilter` - Error message for custom filter frequency out of bounds (includes format placeholders `{0}`, `{1}`

View File

@@ -0,0 +1,61 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/GraphView.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/TestDataView.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/TestDataSeriesView.xaml.cs
generated_at: "2026-04-17T15:54:31.440283+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "00811c8a21090fcd"
---
# Documentation: DTS.Viewer.Graph Views
## 1. Purpose
This module provides WPF view components for graph and chart visualization within the DTS Viewer application. It contains three partial classes—`GraphView`, `TestDataView`, and `TestDataSeriesView`—that serve as code-behind files for their respective XAML views. These views implement interfaces from `DTS.Common.Interface` and provide chart rendering, user interaction handling, and export functionality (PDF and CSV) for test data series visualization.
---
## 2. Public Interface
### GraphView
**Signature:** `public partial class GraphView : IGraphView`
- **`GraphView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
---
### TestDataView
**Signature:** `public partial class TestDataView : ITestDataView`
- **`TestDataView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
---
### TestDataSeriesView
**Signature:** `public partial class TestDataSeriesView : ITestDataSeriesView`
- **`TestDataSeriesView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
- **`bool SaveReportToPDF(string directory)`** - Generates a PDF report containing the chart image and a gRMS data table. Returns `true` on success, `false` on failure. Creates the directory if it does not exist. Logs success/failure via `APILogger`.
- **`bool SaveReportToCSV(string directory)`** - Exports chart data to a CSV file with frequency and PSD values. Returns `true` on success, `false` on failure. Creates the directory if it does not exist. Logs success/failure via `APILogger`.
---
### AxisExtension (Static Class)
**Signature:** `public static class AxisExtension`
- **`double GetDispMin(this Axis axis)`** - Extension method that calculates the displayed minimum value based on `ActualMin`, `ActualMax`, `Value`, and `Scale` properties.
- **`double GetDispMax(this Axis axis)`** - Extension method that calculates the displayed maximum value based on `ActualMin`, `ActualMax`, `Value`, and `Scale` properties.
---
## 3. Invariants
- **`SaveReportToPDF`**: The `directory` parameter must not be null, empty, or whitespace; otherwise, a `DirectoryNotFoundException` is thrown.
- **`SaveReportToPDF`**: `MainChart.DataContext` must be castable to `TestDataSeriesViewModel`; a direct cast is performed without null checking.
- **`SaveReportToPDF`**: `GraphDataSeries` must contain at least one element (accesses `dataSeries[0]` for test setup name and test ID).
- **`SaveReportToCSV`**: All data series in `GraphDataSeries` must have `Xvalue` and `Yvalue` arrays of equal or greater length than

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/ViewModel/GraphViewModel.cs
generated_at: "2026-04-17T15:54:22.914651+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "469500f219f64049"
---
# GraphViewModel Documentation
## 1. Purpose
`GraphViewModel` is a Prism-based MVVM ViewModel that manages graph visualization within the DTS Viewer application. It serves as a coordinator between parent views (`IViewerMainViewModel` or `IPSDReportMainViewModel`), child views (`ITestDataSeriesView`), and the event aggregation system. The class handles channel selection state, displays progress indicators during data loading operations, and manages UI visibility states for messaging and graph display regions.
---
## 2. Public Interface
### Constructor
```csharp
public GraphViewModel(IGraphView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's DataContext to itself, and creates `NotificationRequest` and `ConfirmationRequest` instances.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IGraphView` | get; private set; | The associated graph view interface. |
| `Parent` | `IBaseViewModel` | internal get; set; | Reference to the parent ViewModel. |
| `DataSeriesView` | `ITestDataSeriesView` | get; set; | The data series view associated with this graph. |
| `NotificationRequest` | `InteractionRequest<Notification>` | get; private set; | Used to raise notification dialogs. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | get; private set; | Used to raise confirmation dialogs. |
| `ContextGraphRegion` | `object` | get; set; | Wraps `((GraphView)View).GraphRegion.Content` with property change notification. |
|

View File

@@ -0,0 +1,13 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/GraphListModule.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/ExportGraphListModule.cs
generated_at: "2026-04-17T15:55:51.678467+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6e3f2e8fbad61bee"
---
# Documentation: GraphList and ExportGraphList Modules
## 1.

View File

@@ -0,0 +1,57 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Classes/VirtualToggleButton.cs
generated_at: "2026-04-17T15:59:03.091690+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b9f03ca53fe295ee"
---
# VirtualToggleButton Documentation
## 1. Purpose
`VirtualToggleButton` is a static utility class that provides attached dependency properties to imbue any WPF element with toggle button behavior. It allows arbitrary `DependencyObject` instances (specifically those implementing `IInputElement`) to respond to mouse and keyboard input as if they were `ToggleButton` controls, raising the standard `Checked`, `Unchecked`, and `Indeterminate` routed events. This enables toggle-style interactions on elements that cannot inherit from `ToggleButton` directly, such as `TreeViewItem` or custom controls in the `DTS.Viewer.GraphList` module.
---
## 2. Public Interface
### Attached Properties
#### `IsLockedProperty`
```csharp
public static readonly DependencyProperty IsLockedProperty
```
- **Type:** `Nullable<bool>`
- **Default Value:** `false`
- **Metadata Flags:** `BindsTwoWayByDefault | Journal`
- **Description:** Represents the toggle state of the virtual button. When set to `true`, raises `ToggleButton.CheckedEvent`; when `false`, raises `ToggleButton.UncheckedEvent`; when `null`, raises `ToggleButton.IndeterminateEvent`.
#### `IsThreeStateProperty`
```csharp
public static readonly DependencyProperty IsThreeStateProperty
```
- **Type:** `bool`
- **Default Value:** `false`
- **Description:** Determines whether the control supports three states. When `true`, `IsLocked` can cycle through `null` as a third state.
#### `IsVirtualToggleButtonProperty`
```csharp
public static readonly DependencyProperty IsVirtualToggleButtonProperty
```
- **Type:** `bool`
- **Default Value:** `false`
- **Description:** When set to `true` on an element implementing `IInputElement`, attaches mouse and keyboard handlers to enable toggle button behavior.
### Getter/Setter Methods
```csharp
public static Nullable<bool> GetIsLocked(DependencyObject d)
public static void SetIsLocked(DependencyObject d, Nullable<bool> value)
public static bool GetIsThreeState(DependencyObject d)
public static void SetIsThreeState(DependencyObject d, bool value)
public static bool GetIsVirtualToggleButton(DependencyObject d)
public static void SetIsVirtualToggleButton(DependencyObject

View File

@@ -0,0 +1,150 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/GraphPropertyObject.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/GraphObject.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/TreeViewChannels.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/TreeViewIds.cs
generated_at: "2026-04-17T15:53:21.576946+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7c210f8c04fa36d1"
---
# Documentation: DTS.Viewer.GraphList Models
## 1. Purpose
This module provides the data model classes for the Graph List component of the DTS Viewer application. It defines hierarchical tree structures for displaying test channels and events in WPF TreeView controls, as well as graph property objects for integration with the Xceed WPF Toolkit PropertyGrid. The models implement `INotifyPropertyChanged` for data binding and coordinate selection/locking state with parent ViewModels through defined interfaces.
---
## 2. Public Interface
### GraphPropertyObject
**Namespace:** `DTS.Viewer.GraphList.Model`
A POCO class decorated for use with Xceed WPF Toolkit PropertyGrid.
| Property | Type | Category | Access | Description |
|----------|------|----------|--------|-------------|
| `Id` | `int` | Information | Read-only | Graph identifier |
| `Name` | `string` | Information | Read-only | Graph name |
| `Description` | `string` | Information | Read-only | Graph description |
| `Filter` | `string` | Parameters | Read/Write | CFC filter value; uses `ItemsSource(typeof(CFCFilterItemSource))` |
| `DataFlag` | `string` | Parameters | Read/Write | Data flag identifier |
| `ShiftT0` | `double` | Parameters | Read/Write | Time zero shift in milliseconds |
| `EuMultiplier` | `double` | Parameters | Read/Write | Engineering units multiplier |
| `EuOffset` | `double` | Parameters | Read/Write | Engineering units offset |
---
### GraphObject
**Namespace:** `DTS.Viewer.GraphList.Model`
Implements `IBaseClass`. Primary graph data container with synchronized property object.
| Property | Type | Description |
|----------|------|-------------|
| `RecordId` | `int` | Record identifier with change notification |
| `Id` | `int` | Graph ID; synchronizes to `Property.Id` on set |
| `Name` | `string` | Graph name; synchronizes to `Property.Name` on set |
| `Description` | `string` | Description; synchronizes to `Property.Description` on set |
| `Filter` | `CFCFilter` | Filter enum; synchronizes to `Property.Filter` as string |
| `DataFlag` | `string` | Data flag; synchronizes to `Property.DataFlag` |
| `ShiftT0` | `double` | T0 shift; synchronizes to `Property.ShiftT0` |
| `EuMultiplier` | `double` | EU multiplier; synchronizes to `Property.EuMultiplier` |
| `EuOffset` | `double` | EU offset; synchronizes to `Property.EuOffset` |
| `Data` | `List<double>` | Graph data points |
| `Visable` | `bool` | Visibility toggle (note: typo in property name) |
| `Property` | `GraphPropertyObject` | Nested property grid object |
**Events:**
- `PropertyChanged` - Standard `PropertyChangedEventHandler` event
**Methods:**
- `OnPropertyChanged(string propertyName)` - Raises `PropertyChanged` event
- `LoadGraphs()` (private) - Contains commented-out service controller code
---
### TreeViewChannels
**Namespace:** `DTS.Viewer.GraphList`
Implements `IBaseModel`. Root node for channel-based tree view binding.
| Property | Type | Description |
|----------|------|-------------|
| `Name` | `string` | Node name |
| `Groups` | `ObservableCollection<TestGroup>` | Child test groups; updates `GroupsCount` on set |
| `GroupsCount` | `int` | Count of groups |
| `Path` | `string` | File/system path |
| `IsSaved` | `bool` | Get-only property (always default) |
| `IsExpanded` | `bool` | TreeView expansion state |
| `IsSelected` | `bool` | TreeView selection state |
---
### TestGroup
**Namespace:** `DTS.Viewer.GraphList`
Implements `INotifyPropertyChanged`. Child node representing a test group with channels.
| Property | Type | Description |
|----------|------|-------------|
| `Path` | `string` | File path |
| `DTSFile` | `string` | Associated DTS file |
| `Parent` | `IBaseViewModel` | Reference to parent ViewModel; cast to `IGraphMainViewModel` for locking |
| `IsLocked` | `bool` | Lock state; calls `Parent.AddLockedGroupChannels()` on change |
| `IsGraph` | `bool` | Graph display flag |
| `IsExpanded` | `bool` | Expansion state |
| `CanLock` | `bool` | Controls whether selection is permitted |
| `IsSelected` | `bool` | Selection state; calls `Parent.AddSelectedGroupChannels()` when selected |
| `TestName` | `string` | Parent test name |
| `Name` | `string` | Group name |
| `DisplayName` | `string` | Display name |
| `Channels` | `ObservableCollection<ITestChannel>` | Child channels; updates `ChannelCount` on set |
| `ChannelCount` | `int` | Count of channels |
---
### TreeViewIds
**Namespace:** `DTS.Viewer.GraphList`
Implements `IBaseModel`. Root node for event/ID-based tree view binding.
| Property | Type | Description |
|----------|------|-------------|
| `Parent` | `IBaseViewModel` | Parent ViewModel; cast to `IExportGraphMainViewModel` |
| `Name` | `string` | Node name |
| `TreeIndex` | `int` | Index for selection range operations |
| `EventCount` | `int` | Count of events |
| `Events` | `ObservableCollection<ITestEvent>` | Child events; updates `EventCount` on set |
| `Path` | `string` | File path |
| `IsSaved` | `bool` | Get-only property |
| `IsExpanded` | `bool` | Expansion state |
| `IsSelected` | `bool` | Selection state with cascade to children via `SetChildNodes()` |
**Methods:**
- `SetChildNodes(bool isSelected)` - Sets `IsSelected` on all child `Events`
- `SetIsItemSelected(UIElement element, bool value)` - Static attached property setter
- `GetTreeViewItems(ItemsControl, bool, List<TreeViewItem>)` - Static recursive TreeView item collector
**Attached Properties:**
- `IsItemSelectedProperty` - `DependencyProperty` registered for `bool` type
---
### TestEvent
**Namespace:** `DTS.Viewer.GraphList`
Implements `ITestEvent`. Child node representing a test event with complex multi-select logic.
| Property | Type | Description |
|----------|------|-------------|
| `Path` | `string` | File path |
| `Parent` | `IBaseViewModel` | Parent ViewModel; cast to `IExportGraphMainViewModel` |
| `IsLocked` | `bool` | Lock state; calls `Parent.AddLockedEvents()` on change |
| `IsGraph` | `bool` | Graph display flag |
| `IsExpanded` | `bool` | Expansion state |
| `CanLock` | `bool` | Lock permission flag |
| `IsSelected` | `bool

View File

@@ -0,0 +1,35 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:20.044128+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e5fafc2a04e682f0"
---
# Properties
### Purpose
Standard .NET assembly metadata configuration for the DTS.Viewer.TestModification module. This file exists to define the assembly's identity, version information, and COM visibility settings using .NET assembly attributes. It plays no runtime role beyond providing metadata to the CLR and tooling.
### Public Interface
No public types or functions are defined. This module consists entirely of assembly-level attributes:
- `AssemblyTitle("DTS.Viewer.TestModification")` - Sets the assembly title
- `AssemblyDescription("")` - Empty description
- `AssemblyVersion("1.0.0.0")` - Sets the assembly version
- `AssemblyFileVersion("1.0.0.0")` - Sets the file version
- `ComVisible(false)` - Disables COM visibility for types in this assembly
- `Guid("5ee7c61f-e9fe-479b-be1f-78a142341c3b")` - COM type library identifier
### Invariants
- AssemblyVersion and AssemblyFileVersion must both be "1.0.0.0"
- ComVisible is always false
- The GUID "5ee7c61f-e9fe-479b-be1f-78a142341c3b" uniquely identifies this assembly for COM interop scenarios
### Dependencies
**Imports:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Unclear from source alone - this is a leaf

View File

@@ -0,0 +1,40 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/View/ExportGraphMainView.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/View/GraphMainView.xaml.cs
generated_at: "2026-04-17T16:11:57.316727+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cfdd9801dd7a1dcf"
---
# View
### Purpose
This module provides WPF view components for graph list functionality, specifically for displaying and exporting graphs. Both views implement a pattern of suppressing the `ApplicationCommands.Undo` command by adding a `CommandBinding` that marks the command as handled. This prevents undo operations from propagating in these views.
### Public Interface
**ExportGraphMainView** (implements `IExportGraphMainView`)
- `ExportGraphMainView()` - Constructor that calls `InitializeComponent()` and adds a `CommandBinding` for `ApplicationCommands.Undo`. Both the `Execute` and `CanExecute` handlers set `e.Handled = true` with no other action.
**GraphMainView** (implements `IGraphMainView`)
- `GraphMainView()` - Constructor that calls `InitializeComponent()` and adds a `CommandBinding` for `ApplicationCommands.Undo`. Both the `Execute` and `CanExecute` handlers set `e.Handled = true`. Contains commented-out code for focusing `TvTestChannels` and checking `root.IsChecked`.
### Invariants
- Both views unconditionally suppress `ApplicationCommands.Undo` by handling it without action.
- The `CanExecute` handler does not set `e.CanExecute`, only `e.Handled`.
### Dependencies
**Depends on:**
- `DTS.Common.Interface` (`IExportGraphMainView`, `IGraphMainView`)
- `System.Windows.Input` (`CommandBinding`, `ApplicationCommands`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- **Undo suppression pattern:** Both views suppress undo without any conditional logic. This may interfere with expected user behavior if undo is needed elsewhere in the application.
- **Commented-out code in GraphMainView:** References to `root.IsChecked` and `TvTestChannels.Focus()` suggest incomplete or removed functionality.
- **Namespace suppression:** ReSharper disable comments indicate potential namespace convention violations.
---

View File

@@ -0,0 +1,44 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/ViewModel/GraphMainViewModel.cs
generated_at: "2026-04-17T15:56:47.220918+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2bd73de841af2654"
---
# Documentation: GraphMainViewModel
## 1. Purpose
The `GraphMainViewModel` class serves as the presentation logic controller for the Graph List module within the DTS Viewer application. Its primary responsibility is to manage the display, filtering, selection, and locking of test channels (including graph channels, calculated channels, and raw test channels) derived from `ITestSummary` objects. It acts as a bridge between the data layer (test summaries) and the UI layer (tree views, lists), coordinating user interactions via Prism's `IEventAggregator` to publish channel selections and notify other modules of state changes.
## 2. Public Interface
### Properties
* **`IFilterView FilterView`**: Gets the filter view instance associated with this model.
* **`IGraphMainView View`**: Gets or sets the associated view interface.
* **`IBaseViewModel Parent`**: Gets or sets the parent ViewModel (checked specifically for `IPSDReportMainViewModel` during initialization).
* **`InteractionRequest<Notification> NotificationRequest`**: Gets the interaction request for displaying notifications.
* **`InteractionRequest<Confirmation> ConfirmationRequest`**: Gets the interaction request for displaying confirmations.
* **`bool IsFilterEnabled`**: Gets or sets a value indicating whether the filter UI is enabled (true when `ChannelList` has items).
* **`string SelectedGroupName`**: Gets or sets the name of the currently selected group.
* **`string LockedGroupName`**: Gets or sets the name of the currently locked group.
* **`List<ITestChannel> LockedChannelList`**: Gets or sets the list of channels currently locked by the user.
* **`List<ITestChannel> SelectedChannelList`**: Gets or sets the list of channels currently selected by the user.
* **`ObservableCollection<ITestChannel> ChannelList`**: Gets or sets the full list of available channels.
* **`ObservableCollection<ITestChannel> FilteredChannelList`**: Gets or sets the list of channels displayed after filtering.
* **`ObservableCollection<TreeViewChannels> TestChannelsTree`**: Gets or sets the hierarchical tree structure of channels displayed in the UI.
* **`object ContextGraphMainRegion`**: Gets or sets the data context for the `GraphMainRegion` within the view.
* **`string HeaderInfo`**: Returns the constant string "GraphRegion".
* **`bool TestModified`**: Gets or sets a flag indicating if the test has been modified.
### Methods
* **`void Initialize()`**: Overrides base method. Empty implementation.
* **`void Initialize(object parameter)`**: Initializes the ViewModel, sets the parent, determines if locked-only mode is required, initializes the filter view, and subscribes to events.
* **`void PublishSelectedChannels()`**: Publishes the current lists of locked and selected channels via `GraphSelectedChannelsNotification` and `GraphSelectedChannelCountNotification`.
* **`void OnFilterChanged(FilterParameterArgs args)`**: Filters the `ChannelList` based on the string parameter provided in `args`, updating `FilteredChannelList`.
* **`void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)`**: Adds or removes a group of channels to/from the `LockedChannelList`.
* **`void AddLockedChannel(ITestChannel channel, bool isLocked)`**: Adds or removes a single channel to/from the `LockedChannelList`.
* **`void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)`**: Selects a specific group of channels, resetting previous selections.
* **`void AddSelectedGroup(TestGroup group)`**: Marks a specific `TestGroup` as selected.
* **`void AddSelectedChannel(ITestChannel channel, bool reset)`**:

View File

@@ -0,0 +1,46 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/NavigationModule.cs
generated_at: "2026-04-17T16:45:37.366507+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2085d49a3bec9fca"
---
# NavigationModule Documentation
## 1. Purpose
This module serves as the Prism-based navigation component for the DTS Viewer application. It is responsible for registering the navigation view and view-model with the Unity dependency injection container and providing assembly-level metadata (name, image, region, and group) that the main application uses to display and categorize available modules. The module follows the Prism modularity pattern and integrates with the larger DTS Viewer shell.
---
## 2. Public Interface
### `NavigationModule` Class
Implements `Prism.Modularity.IModule`. The primary module entry point.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `NavigationModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
| `Initialize` | `void Initialize()` | Registers `INavigationView``NavigationView` and `INavigationViewModel``NavigationViewModel` with the Unity container. |
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation (no post-initialization logic). |
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registration. |
### `NavigationPropertiesNameAttribute` Class
Extends `TextAttribute`. Assembly-level attribute providing the module's display name.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `NavigationPropertiesNameAttribute()` | Default constructor; initializes `_assemblyName` to `AssemblyNames.Navigation.ToString()`. |
| Constructor | `NavigationPropertiesNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `_assemblyName`. |
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`. |
| `GetAssemblyName` | `override string GetAssemblyName()` | Returns `AssemblyName` property value. |
### `NavigationPropertiesImageAttribute` Class
Extends `ImageAttribute`. Assembly-level attribute providing the module's image and categorization metadata.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `NavigationPropertiesImageAttribute()` | Default constructor; initializes `_img` via `AssemblyInfo.GetImage()

View File

@@ -0,0 +1,49 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:45:41.819326+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4042d03e7c7c8fac"
---
# Documentation: DTS.Viewer.Navigation Assembly Configuration
## 1. Purpose
This file provides assembly-level metadata for the `DTS.Viewer.Navigation` module, which appears to be a navigation component within the larger DTS Viewer application. It defines version information, COM visibility settings, and identification attributes using the traditional .NET Framework assembly attribute pattern. This module exists to configure build output metadata and control COM interop visibility for the navigation assembly.
## 2. Public Interface
This file contains no public classes, methods, or functions. It defines only assembly-level attributes:
| Attribute | Value |
|-----------|-------|
| `AssemblyTitle` | `"DTS.Viewer.Navigation"` |
| `AssemblyDescription` | `""` (empty) |
| `AssemblyConfiguration` | `""` (empty) |
| `AssemblyCompany` | `""` (empty) |
| `AssemblyProduct` | `"DTS.Viewer.Navigation"` |
| `AssemblyCopyright` | `"Copyright © 2017"` |
| `AssemblyTrademark` | `""` (empty) |
| `AssemblyCulture` | `""` (empty) |
| `ComVisible` | `false` |
| `Guid` | `"237c6e9f-9118-4bec-a55a-e194232ac330"` |
| `AssemblyVersion` | `"1.0.0.0"` |
| `AssemblyFileVersion` | `"1.0.0.0"` |
## 3. Invariants
- **COM Visibility**: All types in this assembly are not visible to COM components by default (`ComVisible(false)`). Individual types must explicitly set `ComVisible(true)` if COM exposure is required.
- **Version Consistency**: Both `AssemblyVersion` and `AssemblyFileVersion` are set to `"1.0.0.0"` and should be updated in tandem for releases.
- **Assembly Identity**: The GUID `237c6e9f-9118-4bec-a55a-e194232ac330` uniquely identifies this assembly's type library if exposed to COM.
## 4. Dependencies
**This module depends on:**
- `System.Reflection` - Provides `AssemblyTitleAttribute`, `AssemblyDescriptionAttribute`, `AssemblyConfigurationAttribute`, `AssemblyCompanyAttribute`, `AssemblyProductAttribute`, `AssemblyCopyrightAttribute`, `AssemblyTrademarkAttribute`, `AssemblyCultureAttribute`, `AssemblyVersionAttribute`
- `System.Runtime.CompilerServices` - Imported but no attributes from this namespace are used in this file
- `System.Runtime.InteropServices` - Provides `ComVisibleAttribute`, `GuidAttribute`
**What depends on this module:**
- Cannot be determined from this file alone. This is a configuration file for the assembly build process; other modules within

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/View/NavigationItem.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/View/NavigationView.xaml.cs
generated_at: "2026-04-17T16:11:50.604475+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6747a61a8fe21d2c"
---
# View
### Purpose
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
### Public Interface
**`TranslateExtension` class** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
**`StringResources` class** (internal, auto-generated)
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
- `static string Search { get; }` - Localized string resource for "Search".
### Invariants
- `ProvideValue` always returns a non-null string.
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
### Dependencies
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
### Gotchas
- `StringResources`

View File

@@ -0,0 +1,45 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/ViewModel/NavigationViewModel.cs
generated_at: "2026-04-17T16:30:27.299010+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0e6a43a095627fba"
---
# ViewModel
### Purpose
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
### Public Interface
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
**Constructor:**
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
**Properties:**
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
- `IsBusy` (`bool`) - Busy state indicator.
- `IsDirty` (`bool`) - Dirty state indicator.
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
**Methods:**
- `void Initialize()` - Empty override.
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
- `void PublishChanges()` - Empty method (implementation appears incomplete).
**Events:**
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
### Invariants
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility

View File

@@ -0,0 +1,13 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/TestModificationModule.cs
generated_at: "2026-04-17T16:13:23.029316+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "99ff29164bceb605"
---
# DTS.Viewer.TestModification
### Purpose
This module serves as the bootstrapper for the "TestModification" feature within the DTS Viewer application. It integrates the feature into the Prism modular architecture by registering its associated View and ViewModel with the Unity dependency injection container. Additionally, it defines assembly-level metadata attributes that expose the

View File

@@ -0,0 +1,189 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/Enums.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/TestModificationModel.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/TestModelManipulation.cs
generated_at: "2026-04-17T15:55:05.952766+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8c9823f92db20638"
---
# Test Modification Module Documentation
## 1. Purpose
This module provides functionality for modifying test data within the DTS Viewer application. It enables users to adjust channel parameters (sensitivity, EU multiplier/offset, T0 time shifts, line fit, software filters, data flags, and descriptions) and persist those changes to both binary channel files (`.chn`) and test configuration files (`.dts`). The module implements a backup-and-restore system to allow reverting modifications, and tracks modification state to indicate unsaved changes to the user interface.
---
## 2. Public Interface
### Enums.cs
#### `Keys` Enum
```csharp
public enum Keys
{
ApplyShiftT0ModsTestOnly // System Setting for whether to restrict "Shift T0" test modifications to "Test" only.
}
```
A configuration key enum used to control T0 modification behavior restrictions.
---
### TestModificationModel.cs
#### `TestModificationModel` Class
Implements `ITestModificationModel` and provides `INotifyPropertyChanged` for data binding.
**Calibration Properties:**
- `string CalDate` — Read-only; returns `Cal.CalibrationDate.ToShortDateString()` or empty string if `Cal` is null.
- `string ModifyDate` — Read-only; returns formatted modify date/time or empty string if `Cal` is null.
- `double CalSensitivity` — Gets/sets sensitivity from `Cal.Records.Records[0].Sensitivity`; returns `double.NaN` if unavailable.
- `bool ProportionalToExcitation` — Read-only; returns `Cal.IsProportional`.
- `bool NonLinear` — Read-only; returns `Cal.NonLinear`.
- `bool ShowSensorCal` — Read-only; returns true if `Cal` and `Sensor` are non-null and `NonLinear` is false.
- `ISensorCalDbRecord Cal` — Gets/sets the latest calibration record; triggers `RebindCalProperties()` on set.
- `ISensorDbRecord Sensor` — Gets/sets the sensor record; triggers `RebindCalProperties()` on set.
**Channel Selection:**
- `ITestChannel SelectedChannel` — The currently selected channel for modification.
**Modification Value Properties:**
- `string Description` — Channel description text.
- `double EuMultiplier` — EU multiplier value.
- `double EuOffset` — EU offset value.
- `double T0` — T0 time shift value (milliseconds).
- `double T1` — Line fit start point (milliseconds).
- `double T2` — Line fit end point (milliseconds).
- `double Sensitivity` — Channel sensitivity value.
- `IFilterClass SelectedFilter` — Selected software filter; defaults to `FilterClass(FilterClassType.Unfiltered)`.
- `DataFlag SelectedDataFlag` — Selected data flag; defaults to `DataFlag.None`.
- `T0Mode T0Mode` — T0 application mode (`T0Mode.Test` or `T0Mode.DAS`); defaults to `T0Mode.Test`.
**Modification State Properties (Read-only):**
- `bool IsModifiedDescription` — True if `Description` differs from `SelectedChannel.ChannelDescriptionString`.
- `bool IsModifiedEuMultiplier` — True if `EuMultiplier` differs from `SelectedChannel.Multiplier`.
- `bool IsModifiedEuOffset` — True if `EuOffset` differs from `SelectedChannel.UserOffsetEu`.
- `bool IsModifiedT0` — True if `T0` is not zero.
- `bool IsModifiedLineFit` — True if `T1` or `T2` is not zero.
- `bool IsModifiedSensitivity` — True if `Sensitivity` differs from `SelectedChannel.Sensitivity`.
- `bool IsModifiedFilter` — True if `SelectedFilter` differs from the channel's current software filter.
- `bool IsModifiedDataFlag` — True if `SelectedDataFlag` differs from `SelectedChannel.DataFlag`.
- `bool IsModified` — Aggregate flag indicating any modification exists and `SelectedChannel` is non-null.
**Control Enable Properties:**
- `bool EnableSensitivityControl` — Controls UI sensitivity control visibility.
- `bool EnableLineFitControl` — Controls UI line fit control visibility.
- `bool EnableEUOffsetControl` — Controls UI EU offset control visibility.
- `bool EnableEUMultiplierControl` — Controls UI EU multiplier control visibility.
- `bool EnableFilterControl` — Controls UI filter control visibility.
- `bool EnableDescriptionControl` — Controls UI description control visibility.
- `bool IsDataFlagEnabled` — Controls UI data flag control visibility.
- `bool IsT0Enabled` — Controls UI T0 control visibility.
- `bool IsT0ModeTestOnly` — When true, forces `T0Mode` to `T0Mode.Test`.
**Other Properties:**
- `ITestModificationViewModel Parent` — Reference to parent view model.
- `bool IsSaved` — Read-only property (no setter visible in source).
**Methods:**
- `void OnPropertyChanged(string propertyName)` — Raises `PropertyChanged` event and recalculates `IsModified`.
- `bool ValidateT0()` — Validates T0 falls within the channel's dataset time range; returns true if `SelectedChannel` or `ParentModule` is null.
**Commands:**
- `DelegateCommand UpdateDatabaseCommand` — Executes `Parent.UpdateDatabaseMethod()`.
---
### TestModelManipulation.cs
#### `TestModelManipulation` Class
Static utility class for file-based test modification operations.
**Constants:**
- `double UNUSED_START_TIME = 0`
- `int UNUSED_DATA_COLLECTION_LENGTH = 0`
- `string BackupHeaderExtension = ".header.bak"` (private)
- `string BackupFileExtension = ".bak"` (private)
**Public Methods:**
- `static void UndoAllModification(ITestModificationModel model)` — Reverts all modifications by restoring `.dts` and all binary channel files from backups. Publishes `ChannelsModificationNotification`, `RefreshTestRequestEvent`, and `TestModificationEvent`.
- `static bool BackupExists(ITestModificationModel model)` — Returns true if either `.dts.bak` or `.chn.bak` backup files exist for the model's selected channel.
- `static void BackupChannelIfNeeded(Test.Module.Channel testModuleChannel, bool headerOnly)` — Creates backup of channel binary file. If `headerOnly` is true, backs up only the header portion; otherwise backs up the entire file.
- `static bool SaveModification(ITestModificationModel model, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)` — Persists all modifications to disk. Returns true on success. Handles T0 (Test and DAS modes), line fit, filter, sensitivity, EU multiplier/offset, description, and data flag modifications.
- `static bool SaveModificationDataFlag(ITestModificationModel model)` — Saves only data flag modifications to disk.
- `static void ApplyLineFit(ITestModificationModel model, Test.Module.Channel channel)` — Applies linear interpolation between `T1` and `T2` sample indices on the channel's ADC data.
- `static void PreviewLineFit(ITestModificationModel model)` — Publishes `ChannelsModificationLineFitNotification` with calculated start/end indices without modifying disk.
- `static void UndoModification(ITestModificationModel model)` — Re-populates model from channel and publishes `ChannelsModificationNotification`.
- `static void PopulateFromChannel(ITestModificationModel model)` — Initializes model properties from `SelectedChannel` values.
---
## 3. Invariants
1. **Backup File Semantics**: Backup files (`.bak` and `.header.bak`) represent the *original* unmodified files. Once a backup exists, it is never overwritten by subsequent modifications—this preserves the ability to revert to the original state.
2. **IsModified Aggregation**: `IsModified` is true if and only if at least one `IsModified*` property is true AND `SelectedChannel` is non-null.
3. **T0Mode Restriction**: When `IsT0ModeTestOnly` is true, `T0Mode` setter forces the value to `T0Mode.Test` regardless of the input value.
4. **Calibration Property Dependencies**: `CalSensitivity`, `ProportionalToExcitation`, `NonLinear`, `ShowSensorCal`, `CalDate`, and `ModifyDate` all depend on `Cal` being non-null; they return default values (`false`, `NaN`, empty string) when `Cal` is null.
5. **Line Fit Index Ordering**: In `ApplyLineFit`, if `startIndex > endIndex`, the values are swapped before processing.
6. **T0 Validation Range**: `ValidateT0()` returns `true` (valid) if `SelectedChannel` or `ParentModule` is null, treating missing data as "no constraint."
---
## 4. Dependencies
### This Module Depends On:
- `DTS.Common` — Core utilities and interfaces
- `DTS.Common.Classes.Sensors` — Sensor-related classes
- `DTS.Common.Enums.Sensors` — Sensor enumerations including `DataFlag`, `T0Mode`
- `DTS.Common.Interface` — Core interfaces including `ITestChannel`
- `DTS.Common.Interface.Sensors` — Sensor interfaces including `ISensorCalDbRecord`, `ISensorDbRecord`
- `DTS.Common.Interface.Sensors.SoftwareFilters``IFilterClass`, `FilterClass`, `FilterClassType`
- `DTS.Common.Events` — Event types including `TestModificationEvent`, `TestModificationArgs`, `ChannelsModificationNotification`, `RefreshTestRequestEvent`, `ChannelsModificationLineFitNotification`, `LineFitArgs`
- `DTS.Common.Settings``SettingsDB` for global configuration values
- `DTS.Common.Utilities.Logging``APILogger`
- `DTS.Common.ISO``IsoCode` class
- `DTS.Serialization` — Serialization utilities including `SliceRaw.File`
- `DTS.SensorDB` — Sensor database interfaces
- `Prism.Commands``DelegateCommand`
- `Prism.Ioc``ContainerLocator`
- `Prism.Events``IEventAggregator`
### What Depends On This Module:
- Not determinable from the provided source files alone.
---
## 5. Gotchas
1. **Namespace Mismatch**: `TestModificationModel.cs` is declared in namespace `DTS.Viewer.ChartOptions.Model` despite residing in `DTS.Viewer.TestModification/Model/`. This may cause confusion when locating the class.
2. **ReSharper Suppressions**: The `TestModificationModel.cs` file contains multiple ReSharper suppressions (`InconsistentNaming`, `RedundantDefaultMemberInitializer`, `CheckNamespace`, `UnassignedGetOnlyAutoProperty`), suggesting known code style deviations.
3. **IsSaved Property Never Set**: The `IsSaved` property has a getter but no visible setter or initialization in the provided source, making its purpose unclear.
4. **Backup Strategy Complexity**: Binary channels can be backed up in two ways (header-only vs. full file). The `BackupChannelIfNeeded` method handles conversion between these modes, but developers should be aware that a header backup may be promoted to a full backup if subsequent modifications require it.
5. **T0 DAS Mode Scope**: When `T0Mode.DAS` is used, T0 changes are applied to all channels on the same DAS (matching `BaseSerialNumber`), not just the selected channel. This is a broader scope than might be expected.
6. **Line Fit Overwrites Data**: `ApplyLineFit` permanently replaces ADC data between T1 and T2 with linearly interpolated values. There is no undo mechanism specific to line fit beyond the full file restore.
7. **File Encoding Assumption**: `WriteDTSFileChanges` forces UTF-16 encoding for `.dts` files. The code catches exceptions and falls back to `Encoding.Default`, but this fallback could produce files incompatible with other consumers.
8. **Thread.Sleep in File Writing**: `WriteDTSFileChanges` includes a 10ms `Thread.Sleep()` after writing, suggesting a timing-related workaround for file system operations.

View File

@@ -0,0 +1,35 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:20.043300+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "941237c5da47e463"
---
# Properties
### Purpose
Standard .NET assembly metadata configuration for the DTS.Viewer.TestModification module. This file exists to define the assembly's identity, version information, and COM visibility settings using .NET assembly attributes. It plays no runtime role beyond providing metadata to the CLR and tooling.
### Public Interface
No public types or functions are defined. This module consists entirely of assembly-level attributes:
- `AssemblyTitle("DTS.Viewer.TestModification")` - Sets the assembly title
- `AssemblyDescription("")` - Empty description
- `AssemblyVersion("1.0.0.0")` - Sets the assembly version
- `AssemblyFileVersion("1.0.0.0")` - Sets the file version
- `ComVisible(false)` - Disables COM visibility for types in this assembly
- `Guid("5ee7c61f-e9fe-479b-be1f-78a142341c3b")` - COM type library identifier
### Invariants
- AssemblyVersion and AssemblyFileVersion must both be "1.0.0.0"
- ComVisible is always false
- The GUID "5ee7c61f-e9fe-479b-be1f-78a142341c3b" uniquely identifies this assembly for COM interop scenarios
### Dependencies
**Imports:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Unclear from source alone - this is a leaf

View File

@@ -0,0 +1,32 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:55:56.221210+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9f4954f34f258eac"
---
# Documentation: DTS.Viewer.TestModification.Resources
## 1. Purpose
This module provides localization infrastructure for the DTS Viewer TestModification feature. It combines a WPF XAML markup extension (`TranslateExtension`) with an auto-generated strongly-typed resource accessor (`StringResources`) to enable declarative string localization in XAML views. The module abstracts .NET resource management behind a simple key-based lookup system that gracefully handles missing resources by returning visible error indicators rather than throwing exceptions.
---
## 2. Public Interface
### TranslateExtension (class)
**Namespace:** `DTS.Viewer.TestModification`
A WPF markup extension for use in XAML bindings to retrieve localized strings at runtime.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. The `key` parameter is stored in a readonly field. |
| ProvideValue | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for the stored key. Returns `#stringnotfound#` if key is null or empty. Returns `#stringnotfound# <key>` if the resource lookup returns null. |
### StringResources (internal

View File

@@ -0,0 +1,35 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/View/TestModificationView.xaml.cs
generated_at: "2026-04-17T16:13:20.043811+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "879e0de19782043c"
---
# View
### Purpose
Standard .NET assembly metadata configuration for the DTS.Viewer.TestModification module. This file exists to define the assembly's identity, version information, and COM visibility settings using .NET assembly attributes. It plays no runtime role beyond providing metadata to the CLR and tooling.
### Public Interface
No public types or functions are defined. This module consists entirely of assembly-level attributes:
- `AssemblyTitle("DTS.Viewer.TestModification")` - Sets the assembly title
- `AssemblyDescription("")` - Empty description
- `AssemblyVersion("1.0.0.0")` - Sets the assembly version
- `AssemblyFileVersion("1.0.0.0")` - Sets the file version
- `ComVisible(false)` - Disables COM visibility for types in this assembly
- `Guid("5ee7c61f-e9fe-479b-be1f-78a142341c3b")` - COM type library identifier
### Invariants
- AssemblyVersion and AssemblyFileVersion must both be "1.0.0.0"
- ComVisible is always false
- The GUID "5ee7c61f-e9fe-479b-be1f-78a142341c3b" uniquely identifies this assembly for COM interop scenarios
### Dependencies
**Imports:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Unclear from source alone - this is a leaf

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/ViewModel/TestModificationViewModel.cs
generated_at: "2026-04-17T15:59:06.360686+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7c56b83b77bf5525"
---
# Documentation: TestModificationViewModel
## 1. Purpose
`TestModificationViewModel` is a Prism-based ViewModel that manages the test modification UI panel in the DTS Viewer application. It enables users to modify test data properties (T0 timing, sensitivity, line fit, EU multiplier/offset, filters, data flags) for selected channels, persist those modifications to files, and optionally update sensor calibration data back to the Sensor Database. The module coordinates between the UI, event-driven channel selection, and the `TestModelManipulation` helper class for actual data operations.
## 2. Public Interface
### Constructor
```csharp
public TestModificationViewModel(ITestModificationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the ViewModel, sets up the View's DataContext, creates interaction requests, and subscribes to `RaiseNotification`, `GraphSelectedChannelsNotification`, `ShiftT0Event`, and `SetUseZeroForUnfilteredEvent` events.
### Public Methods
| Method | Signature | Description |
|--------|-----------|-------------|
| `UpdateDatabaseMethod` | `void UpdateDatabaseMethod()` | Updates calibration in the Sensor Database. Sets `CalibrationId = -1`, updates `ModifyDate` to `DateTime.Now`, creates a `SensorCalibration` from `Model.Cal`, and inserts via `DbOperations.SensorCalibrationsInsert`. Refreshes `Model.Cal` from latest database record. |
| `Initialize` | `void Initialize()` | Empty override. |
| `Initialize` | `void Initialize(object parameter)` | Sets `Parent` property from parameter cast to `IBaseViewModel`. |
| `PublishChanges` | `void PublishChanges()` | If not populating and `Model.IsModifiedDataFlag` is true, immediately saves data flag modification via `TestModelManipulation.SaveModificationDataFlag`. Publishes `TestModificationChangedEvent` with the Model. |
### Commands
| Command | Method | Description |
|---------|--------|-------------|
| `PreviewCommand` | `PreviewMethod()` | Calls `TestModelManipulation.PreviewLineFit(Model)`. |
| `WriteCommand` | `WriteMethod()` | Validates T0 if modified, prompts user with Yes/No dialog, retrieves `UseISOCodeFilterMapping` setting, and calls `TestModelManipulation.SaveModification`. Updates `IsBackedUp`. |
| `UndoCommand` | `UndoMethod()` |

View File

@@ -0,0 +1,18 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/TestSummaryListModule.cs
generated_at: "2026-04-17T16:13:30.841077+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b15af4c76c8ec52e"
---
# DTS.Viewer.TestSummaryList
### 1. Purpose
This module serves as the entry point for the "Test Summary List" feature within the DTS Viewer application. It is a Prism Module responsible for registering its associated View (`TestSummaryListView`) and ViewModel (`TestSummaryViewListModel`) with the Unity dependency injection container. It also provides assembly-level metadata (name, image, region) to the main application shell for display and navigation purposes.
### 2. Public Interface
* **`TestSummaryListModule` (Class)**
* `TestSummaryListModule(IUnityContainer unityContainer)`: Constructor that accepts the Unity container for dependency injection.
* `RegisterTypes(IContainerRegistry containerRegistry)`: Invokes `Initialize

View File

@@ -0,0 +1,15 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Model/TestSummaryModel.cs
generated_at: "2026-04-17T16:13:21.102247+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d37e74a48fb5e9de"
---
# Model
### Purpose
This module contains `TestSummaryModel`, the data model responsible for loading and managing test summary data from `.dts` files. It coordinates asynchronous file system operations, event publication for UI state management (busy indicators, status updates), and test selection logic. The model acts as a bridge between file-based test metadata and the view model layer.
### Public

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:21.100385+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3c0296d679a84b04"
---
# Properties
### Purpose
This module contains assembly-level metadata for the `DTS.Viewer.Test` assembly. It provides versioning, copyright, and COM visibility configuration using standard .NET Framework assembly attributes. This is a boilerplate configuration module with no runtime logic.
### Public Interface
No public types are exposed by this module. It contains only assembly-level attributes:
- **`AssemblyTitle`**: "DTS.Viewer.Test"
- **`AssemblyDescription`**: Empty
- **`AssemblyVersion`**: "1.0.0.0"
- **`AssemblyFileVersion`**: "1.0.0.0"
- **`ComVisible`**: false
- **`Guid`**: "b2b2b862-1b93-476a-8246-91e1310c7ec7"
### Invariants
- Assembly version is fixed at 1.0.0.0; manual updates required for version increments.
- COM visibility is disabled for all types in this assembly.
### Dependencies
- **Depends on:** `System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices` (standard .NET Framework assemblies)
- **Depended on by:** Not applicable; this is configuration metadata.
### Gotchas
- The `AssemblyTitle` is "DTS.Viewer.Test" while the module path suggests "DTS.Viewer.TestSummaryList". This discrepancy may indicate a rename occurred without updating assembly metadata, or the title attribute is intentionally generic.
---

View File

@@ -0,0 +1,33 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/StringResources.ja.Designer.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:54:29.404798+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6473ce1c8faeb7d4"
---
# Documentation: DTS.Viewer.TestSummaryList.Resources
## 1. Purpose
This module provides localization infrastructure for the DTS Viewer TestSummaryList feature. It consists of a strongly-typed resource accessor class (`StringResources`) that wraps .NET resource manager functionality for retrieving localized UI strings, and a XAML markup extension (`TranslateExtension`) that enables declarative resource lookups directly in XAML bindings. The module centralizes all user-facing text for test summary operations including browsing, sorting, filtering, and displaying test metadata.
---
## 2. Public Interface
### `TranslateExtension` (public class)
**Namespace:** `DTS.Viewer.TestSummaryList`
**Inheritance:** `MarkupExtension`
A XAML markup extension for retrieving localized strings from the resource manager.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. |
| `ProvideValue` |

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/View/TestSummaryView.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/View/TestSummaryListView.xaml.cs
generated_at: "2026-04-17T16:11:50.602393+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3e8b4564b60b26e9"
---
# View
### Purpose
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
### Public Interface
**`TranslateExtension` class** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
**`StringResources` class** (internal, auto-generated)
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
- `static string Search { get; }` - Localized string resource for "Search".
### Invariants
- `ProvideValue` always returns a non-null string.
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
### Dependencies
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
### Gotchas
- `StringResources`

View File

@@ -0,0 +1,112 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/ViewModel/TestSummaryViewModel.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/ViewModel/TestSummaryViewListModel.cs
generated_at: "2026-04-17T15:56:32.359697+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "170b78c49a4abb43"
---
# Documentation: TestSummaryList ViewModels
## 1. Purpose
This module provides two ViewModel implementations (`TestSummaryViewModel` and `TestSummaryViewListModel`) for managing and displaying test summary data within the DTS Viewer application. Both classes implement `ITestSummaryListViewModel` and serve as intermediaries between test summary data models and their associated views, handling user interactions, event aggregation for cross-component communication, data filtering, and sorting. The module exists to support the Prism-based MVVM architecture, coordinating test summary selection, folder/file data loading, and notification publishing to other application components.
---
## 2. Public Interface
### TestSummaryViewModel
**Constructor:**
```csharp
public TestSummaryViewModel(ITestSummaryListView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the view's DataContext, creates interaction requests, and subscribes to `RaiseNotification` and `DataFolderChangedEvent` events.
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `Initialize` | `void Initialize()` | Empty override. |
| `Initialize` | `void Initialize(object parameter)` | Casts parameter to `IBaseWindowModel` and assigns to `Parent`. |
| `Activated` | `void Activated()` | Throws `NotImplementedException`. |
| `Cleanup` | `void Cleanup()` | Throws `NotImplementedException`. |
| `CleanupAsync` | `Task CleanupAsync()` | Throws `NotImplementedException`. |
| `InitializeAsync` | `Task InitializeAsync()` | Throws `NotImplementedException`. |
| `InitializeAsync` | `Task InitializeAsync(object parameter)` | Throws `NotImplementedException`. |
| `PublishSelectedTestSummaryList` | `void PublishSelectedTestSummaryList()` | Publishes `TestSummaryChangeNotification` and `TestSelectedChangedEvent` events with current selection. |
**Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `TestSummaryListView` | `ITestSummaryListView` | The associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Prism interaction request for notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Prism interaction request for confirmations. |
| `ContextNavigationRegion` | `object` | Gets/sets content of `TestListRegion` on the view. |
| `SelectedTestSummary` | `TestSummary` | Currently selected single test summary. |
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of selected test summaries. |
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Collection of all test summaries. |
| `HeaderInfo` | `string` | Returns `"TestSummaryRegion"`. |
| `IsBusy` | `bool` | Busy indicator state. |
| `IsDirty` | `bool` | Dirty state flag. |
| `IsNavigationIncluded` | `bool` | Navigation inclusion flag. |
**Events:**
- `PropertyChanged` - Custom `PropertyChangedEventHandler` (hides base implementation with `new`).
---
### TestSummaryViewListModel
**Constructor:**
```csharp
public TestSummaryViewListModel(ITestSummaryListView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the view's DataContext, creates interaction requests, and stores dependencies.
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `Initialize` | `void Initialize()` | Empty override. |
| `Initialize` | `void Initialize(object parameter)` | Sets `Parent`, initializes `FilterView`, attaches collection changed handlers, and calls `Subscribe()`. |
| `OnFilterChanged` | `void OnFilterChanged(FilterParameterArgs args)` | Filters `FilteredTestSummaryList` based on `SetupName`, `Id`, or `Description` containing the parameter string. |
| `Activated` | `void Activated()` | Publishes empty `FilterParameterChangedEvent` to reset filter. |
| `Cleanup` | `void Cleanup()` | Clears all collections, resets `SelectedTestSummary`, and publishes selection changes. |
| `PublishSelectedTestSummaryList` | `void PublishSelectedTestSummaryList()` | Publishes `TestSummaryChangeNotification`, `TestSummaryCountNotification`, and `ResetZoomChangedEvent`. |
| `RefreshDataFolder` | `void RefreshDataFolder()` | Publishes `DataFolderChangedEvent` via dispatcher. |
| `SelectDataFolder` | `void SelectDataFolder()` | Opens `OpenFileDialog` for .dts files and publishes `DataFileSelectedEvent`. |
| `SortTestSummaryList` | `void SortTestSummaryList()` | Sorts `FilteredTestSummaryList` based on `SelectedSortIndex`. |
**Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `FilterView` | `IFilterView` | Resolved filter view instance. |
| `View` | `ITestSummaryListView` | The associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Prism interaction request for notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Prism interaction request for confirmations. |
| `ContextNavigationRegion` | `object` | Gets/sets DataContext of `TestListRegion` on the view. |
| `IsFilterEnabled` | `bool` | Indicates if filtering is available (true when list has items). |
| `SelectedTestSummary` | `TestSummary` | Currently selected single test summary. |
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of selected test summaries. |
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Full collection; setter updates `IsFilterEnabled` and `FilteredTestSummaryList`. |
| `FilteredTestSummaryList` | `ObservableCollection<ITestSummary>` | Filtered/sorted view of test summaries. |
| `HeaderInfo` | `string` | Returns `"TestSummaryRegion"`. |
| `IsBusy` | `bool` | Busy indicator state. |
| `IsDirty` | `bool` | Dirty state flag. |
| `IsNavigationIncluded` | `bool` | Navigation inclusion flag. |
| `SelectedDataFolder` | `string` | Selected folder path; setter publishes `DataFolderChangedEvent`. |
| `SelectedDataFile` | `string` | Selected file path; setter publishes `DataFolderChangedEvent`. |
| `SortableAttributes` | `List<string>` | Localized list of sortable attribute names. |
| `SelectedSortIndex` | `int` | Index of selected sort; setter triggers `SortTestSummaryList()`. |
**Commands:**
| Command | Type | Description |
|---------|------|-------------|
| `Refresh

View File

@@ -0,0 +1,18 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/ViewerSettingsModule.cs
generated_at: "2026-04-17T16:28:49.887066+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3f7db025bc16257d"
---
# DTS.Viewer.ViewerSettings
### Purpose
This module is a Prism-based modular component that provides viewer settings functionality within the DTS application. It registers its views and view models with the Unity dependency injection container and exposes assembly metadata (name, image, group, region) for integration with the main application shell.
### Public Interface
**`ViewerSettingsModule`** (class)
- Implements: `Prism.Mod

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:15.473185+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "10fed443f1f9bdae"
---
# Properties
### Purpose
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
### Public Interface
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
- `AssemblyVersion`: "1.0.0.0"
- `AssemblyFileVersion`: "1.0.0.0"
- `ComVisible`: false
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
### Invariants
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
### Dependencies
**Depends on:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
### Gotchas
- `AssemblyDescription` is empty, providing no documentation

View File

@@ -0,0 +1,47 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:11:57.317124+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c1490f04f3bdab0f"
---
# Resources
### Purpose
This module provides localization support for the ViewerSettings feature through a XAML markup extension and strongly-typed resource access. The `TranslateExtension` allows XAML bindings to localized strings, while `StringResources` provides compile-time-safe access to localized strings related to calibration behavior settings.
### Public Interface
**TranslateExtension** (inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string from `StringResources.ResourceManager.GetString(_key)`. Returns `"#stringnotfound#"` if key is null/empty, or `"#stringnotfound# " + _key` if the key is not found in resources.
**StringResources** (auto-generated)
- `ResourceManager` - Static property returning the cached `ResourceManager` instance for the `"DTS.Viewer.ViewerSettings.Resources.StringResources"` resource name.
- `Culture` - Static property for getting/setting the `CultureInfo` for resource lookups.
- `CalibrationBehavior_LinearIfAvailable` - Localized string: "Use the linear sensitivity, if available".
- `CalibrationBehavior_NonLinearIfAvailable` - Localized string: "Use the non-linear sensitivity, if available".
- `CalibrationBehavior_UseBothIfAvailable` - Localized string: "Use both sensitivities, if available, as separate channels".
- `CalibrationBehaviorText` - Localized string: "Calibration Behavior".
### Invariants
- `TranslateExtension._key` is set at construction time and cannot be changed.
- `StringResources` class is `internal` and all members are `internal`.
- The resource manager is lazily initialized on first access.
### Dependencies
**Depends on:**
- `System.Windows.Markup` (`MarkupExtension`, `MarkupExtensionReturnTypeAttribute`)
- `System.Resources` (`ResourceManager`)
- `System.Globalization` (`CultureInfo`)
**Depended on by:** Not determinable from source alone, but likely used by XAML files in the ViewerSettings module.
### Gotchas
- **Fallback string format:** When a key is not found, the returned string includes the key name appended after `"#stringnotfound# "`. This is useful for debugging but may appear in production if resources are missing.
- **Auto-generated file:** `StringResources.Designer.cs` is auto-generated and should not be manually edited. Changes should be made to the corresponding `.resx` file.
---

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/View/ViewerSettingsView.xaml.cs
generated_at: "2026-04-17T16:13:15.474625+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3dbea35de842a6d9"
---
# View
### Purpose
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
### Public Interface
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
- `AssemblyVersion`: "1.0.0.0"
- `AssemblyFileVersion`: "1.0.0.0"
- `ComVisible`: false
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
### Invariants
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
### Dependencies
**Depends on:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
### Gotchas
- `AssemblyDescription` is empty, providing no documentation

View File

@@ -0,0 +1,45 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/ViewModel/ViewerSettingsViewModel.cs
generated_at: "2026-04-17T16:30:27.297982+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5cfb0f37e98d2924"
---
# ViewModel
### Purpose
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
### Public Interface
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
**Constructor:**
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
**Properties:**
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
- `IsBusy` (`bool`) - Busy state indicator.
- `IsDirty` (`bool`) - Dirty state indicator.
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
**Methods:**
- `void Initialize()` - Empty override.
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
- `void PublishChanges()` - Empty method (implementation appears incomplete).
**Events:**
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
### Invariants
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility

View File

@@ -0,0 +1,142 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/PSDReportModule.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/PSDReportSession.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/Bootstrapper.cs
generated_at: "2026-04-17T15:54:21.888764+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f2871164a32bda62"
---
# PSDReport Module Documentation
## 1. Purpose
The `DTS.Viewer.PSDReport` module is a Prism-based modular component within the DTS Viewer system responsible for providing PSD (Power Spectral Density) report visualization functionality. It implements the `IModule` interface for Prism modularity, manages its own bootstrapping lifecycle for both standalone and integrated modes, and integrates with the plugin architecture to discover and load additional modules dynamically. The module registers its views and view models with the Unity container and participates in the region-based UI composition system.
---
## 2. Public Interface
### PSDReportModule (PSDReportModule.cs)
**Class Declaration:**
```csharp
[Module(ModuleName = "PSDReport")]
public class PSDReportModule : IPSDReportModule
```
**Properties:**
- `SessionStarted` (bool, read-only) - Indicates whether a session has been started via `StartSession()`.
**Constructor:**
```csharp
public PSDReportModule(IUnityContainer unityContainer)
```
Accepts an injected `IUnityContainer` instance.
**Methods:**
```csharp
public void Initialize()
```
Registers `IPSDReportModule` to `PSDReportModule` with `ContainerControlledLifetimeManager` (singleton lifetime).
```csharp
public void StartSession()
```
Resolves `IEventAggregator`, publishes a `LoadViewModulEvent` with a new `LoadViewModulArg`, and sets `SessionStarted` to `true`.
```csharp
public void RegisterTypes(IContainerRegistry containerRegistry)
```
Calls `Initialize()`.
```csharp
public void OnInitialized(IContainerProvider containerProvider)
```
Empty implementation (no initialization logic executed).
---
### PSDReportModuleNameAttribute (PSDReportModule.cs)
**Class Declaration:**
```csharp
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public class PSDReportModuleNameAttribute : TextAttribute
```
**Properties:**
- `AssemblyName` (string, read-only) - Returns `AssemblyNames.PSDReport.ToString()`.
**Methods:**
```csharp
public override Type GetAttributeType() // Returns typeof(TextAttribute)
public override string GetAssemblyName() // Returns AssemblyName
```
---
### PSDReportModuleImageAttribute (PSDReportModule.cs)
**Class Declaration:**
```csharp
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public class PSDReportModuleImageAttribute : ImageAttribute
```
**Properties:**
- `AssemblyImage` (BitmapImage, read-only) - Returns image loaded via `AssemblyInfo.GetImage(AssemblyNames.PSDReport.ToString())`.
- `AssemblyName` (string, read-only) - Returns `AssemblyNames.PSDReport.ToString()`.
- `AssemblyGroup` (string, read-only) - Returns `eAssemblyGroups.Viewer.ToString()`.
- `AssemblyRegion` (eAssemblyRegion, read-only) - Returns `eAssemblyRegion.PSDReportRegion`.
**Methods:**
```csharp
public override Type GetAttributeType() // Returns typeof(ImageAttribute)
public override BitmapImage GetAssemblyImage() // Returns AssemblyImage
public override string GetAssemblyName() // Returns AssemblyName
public override string GetAssemblyGroup() // Returns AssemblyGroup
public override eAssemblyRegion GetAssemblyRegion() // Returns AssemblyRegion
```
---
### PSDReportSession (PSDReportSession.cs)
**Class Declaration:**
```csharp
public class PSDReportSession
```
**Properties:**
- `Container` (IUnityContainer, read-only) - Set after `CreateSession()` is called.
- `_serviceLocator` (IServiceLocator, read-only) - Set after `CreateSession()` is called.
- `_eventAggregator` (IEventAggregator, read-only) - Set after `CreateSession()` is called.
- `_regionManager` (IRegionManager, read-only) - Set after `CreateSession()` is called.
- `CustomConfigPath` (string, read/write) - Path to custom configuration file.
**Methods:**
```csharp
public void CreateSession(bool standalone, string customConfigPath = "")
```
Creates the bootstrapper, resolves core services (`IEventAggregator`, `IServiceLocator`, `IRegionManager`), loads plugins via `PluginManager`, and publishes the plugin list via `AssemblyListNotificationViewer` event.
```csharp
public void Terminate()
```
Empty implementation. Intended for shutdown cleanup per IComponent implementation.
---
### Bootstrapper (Bootstrapper.cs)
**Class Declaration:**
```csharp
public class Bootstrapper : UnityBootstrapper
```
**Properties:**
- `Standalone` (bool, read/write) - Indicates whether the application runs in standalone mode.
- `CustomConfigPath` (string, read/write) - Path to custom

View File

@@ -0,0 +1,43 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:28:49.885454+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "580a1033f3df4c46"
---
# Properties
### Purpose
This module contains assembly-level metadata and configuration for the `DTS.Viewer.PSDReport` assembly. It is a standard .NET Framework properties file that defines version information, COM visibility settings, and assembly identity attributes used by the CLR and build system.
### Public Interface
This module exposes no public types. It defines assembly-level attributes only:
**Assembly Attributes:**
- `[assembly: AssemblyTitle("DTS.Viewer.PSDReport")]` - Defines the assembly title.
- `[assembly: AssemblyDescription("")]` - Empty description.
- `[assembly: AssemblyConfiguration("")]` - Empty configuration.
- `[assembly: AssemblyCompany("")]` - Empty company name.
- `[assembly: AssemblyProduct("DTS.Viewer.PSDReport")]` - Product name.
- `[assembly: AssemblyCopyright("Copyright © 2021")]` - Copyright notice.
- `[assembly: AssemblyTrademark("")]` - Empty trademark.
- `[assembly: AssemblyCulture("")]` - Neutral culture.
- `[assembly: ComVisible(false)]` - Types not visible to COM.
- `[assembly: Guid("3d57ca12-a637-4cdb-b673-d9a5ff0cf062")]` - COM typelib GUID.
- `[assembly: AssemblyVersion("1.0.0.0")]` - Assembly version.
- `[assembly: AssemblyFileVersion("1.0.0.0")]` - File version.
### Invariants
- AssemblyVersion and AssemblyFileVersion are both fixed at "1.0.0.0".
- ComVisible is set to `false`, preventing COM interop by default.
### Dependencies
- **Depends on:** `System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices` (standard .NET Framework assemblies for assembly metadata).
### Gotchas
- Company name, description, and trademark fields are empty, suggesting incomplete assembly metadata configuration.
- The copyright year is 2021, which may need updating for maintenance.
---

View File

@@ -0,0 +1,49 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:12:01.659566+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e841c5ffb3f98572"
---
# Resources
### Purpose
This module provides localization support for the PSD (Power Spectral Density) Report component within the DTS Viewer application. It exists to enable XAML-based string lookup for UI elements, allowing the report configuration interface to be localized. The module contains a WPF markup extension for direct XAML binding and a strongly-typed resource class with strings specific to PSD report settings, data selection, and modifications.
### Public Interface
**`TranslateExtension` class** (public, inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `override object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for the given `_key`. Returns `#stringnotfound#` if the key is null or empty, or `#stringnotfound# <key>` if the resource lookup fails.
**`StringResources` class** (internal sealed)
- `static ResourceManager ResourceManager { get; }` - Returns the cached `ResourceManager` instance for the `DTS.Viewer.PSDReport.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Gets or sets the current thread's `CurrentUICulture` for resource lookups.
- `static string DataHeader { get; }` - Localized string "Data".
- `static string DataSelectionHeader { get; }` - Localized string "Data selection".
- `static string GraphsDefaultTitle { get; }` - Localized string "Graphs".
- `static string ModificationsHeader { get; }` - Localized string "Modify".
- `static string PSDHeader { get; }` - Localized string "PSD".
- `static string PSDResultsHeader { get; }` - Localized string "Results".
- `static string PSDSettingsHeader { get; }` - Localized string "PSD Settings".
- `static string SettingsTitle { get; }` - Localized string "Settings".
- `static string TestsDefaultTitle { get; }` - Localized string "Tests".
### Invariants
- The `TranslateExtension` class is decorated with `[MarkupExtensionReturnType(typeof(string))]`, guaranteeing it returns a string when used in XAML.
- The `ProvideValue` method never returns `null`; it returns a fallback string beginning with `#stringnotfound#` on lookup failure.
- The `StringResources.ResourceManager` property lazily initializes exactly once.
- All resource string properties in `StringResources` are `internal` and return non-null values if the `.resx` file is properly configured.
### Dependencies
- **Depends on**: `System` (for `IServiceProvider`, `String`), `System.Windows.Markup` (for `MarkupExtension`, `MarkupExtensionReturnTypeAttribute`), `System.Resources` (for `ResourceManager`), `System.Globalization` (for `CultureInfo`).
- **Depended on by**: XAML files within `DTS.Viewer.PSDReport` that use `{local:Translate KeyName}` syntax, and any code in that assembly requiring localized strings.
### Gotchas
- The `TranslateExtension` class is defined in namespace `DTS.Viewer.PSDReport` but references `DTS.Viewer.PSDReport.Resources.StringResources`. This namespace structure must be accounted for in XAML namespace declarations.
- The `NotFound` constant value `#stringnotfound#` is hardcoded and will appear in the UI if a resource key is missing, which may be visible to end users during development.
- The `StringResources.Designer.cs` file is auto-generated; manual changes will be overwritten. Edit the corresponding `.resx` file instead.
- The `PSDResultsHeader` resource exists in both `DTS.Viewer.PSDReport.Resources` and `DTS.Viewer.PSDReportResults.Resources` with the same default value "Results". This duplication may indicate shared terminology but could lead to inconsistency if localized differently.

View File

@@ -0,0 +1,48 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/View/PSDReportMainView.xaml.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/View/PSDReportMainViewGrid.xaml.cs
generated_at: "2026-04-17T16:11:57.315846+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a6e4756ad90b5059"
---
# View
### Purpose
This module provides WPF view components for the PSD (Power Spectral Density) Report feature. It contains two partial classes that serve as code-behind for XAML views, handling view initialization and UI event coordination. The module acts as the presentation layer for PSD report visualization, managing tab focus and responding to graph loading events.
### Public Interface
**PSDReportMainView** (implements `IPSDReportMainView`)
- `PSDReportMainView()` - Default constructor that calls `InitializeComponent()`. Contains commented-out code for AvalonDock layout serialization/deserialization via `XmlLayoutSerializer`.
**PSDReportMainViewGrid** (implements `IPSDReportMainViewGrid`)
- `PSDReportMainViewGrid()` - Constructor that calls `InitializeComponent()` and registers a `Loaded` event handler.
- `PSDReportMainViewGrid_Loaded(object sender, RoutedEventArgs e)` - Private event handler that resolves `IEventAggregator` from `ContainerLocator.Container` and subscribes to `GraphLoadedCountNotification` event.
- `OnGraphLoadedCountNotification(GraphLoadedCountNotificationArg arg)` - Private callback that validates the `DataContext` matches `arg.ParentVM`, then spawns a background task that waits 3 seconds before setting focus to `chartResultsTab` via `Dispatcher.BeginInvoke`.
- `SetFocus()` - Private method that selects, makes focusable, and focuses `chartResultsTab`.
### Invariants
- `PSDReportMainViewGrid._eventAggregator` is null until the `Loaded` event fires.
- `OnGraphLoadedCountNotification` will early-return if `DataContext` is null or does not match `arg.ParentVM` (cast to `IBaseViewModel`).
- The 3-second delay in `OnGraphLoadedCountNotification` is hardcoded and unconditional when the callback proceeds.
### Dependencies
**Depends on:**
- `DTS.Common.Interface` (`IPSDReportMainView`, `IPSDReportMainViewGrid`, `IBaseViewModel`)
- `DTS.Common.Base` (referenced but usage unclear from source)
- `DTS.Common.Events` (`GraphLoadedCountNotification`, `GraphLoadedCountNotificationArg`)
- `Prism.Ioc` (`ContainerLocator`)
- `Prism.Events` (`IEventAggregator`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- **FB 14797 reference:** The code comments reference a bug/feature request number, indicating the event subscription pattern was added to fix a timing issue with `IEventAggregator` availability.
- **Hardcoded 3-second delay:** The `Thread.Sleep(TimeSpan.FromSeconds(3))` is a magic number with no configuration. This may be insufficient on slower systems or unnecessarily long on faster ones.
- **Commented-out AvalonDock code:** `PSDReportMainView` contains significant commented-out code for dock layout persistence. It's unclear if this functionality was removed intentionally or is work-in-progress.
- **Namespace suppression:** Multiple ReSharper disable comments suggest the namespace may not match the folder structure convention.
---

View File

@@ -0,0 +1,60 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReport/ViewModel/PSDReportMainViewModel.cs
generated_at: "2026-04-17T15:59:14.887503+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a4bc49aeb12b2337"
---
# PSDReportMainViewModel Documentation
## 1. Purpose
`PSDReportMainViewModel` serves as the primary view model coordinator for the PSD (Power Spectral Density) Report module within the DTS Viewer application. It manages navigation regions, orchestrates view loading, handles user interaction requests, and coordinates event-driven communication between child views (graphs, tests, charts, settings, and data selection components). This class acts as the central hub binding the PSD report UI regions to their respective views and view models.
---
## 2. Public Interface
### Constructor
```csharp
public PSDReportMainViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the view model with Prism/Unity infrastructure. Resolves `IPSDReportMainViewGrid` from the container and sets itself as the DataContext.
### Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IBaseView` | Gets/sets the associated view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Interaction request for displaying confirmations. |
| `ContextNavigationRegion` | `object` | Wraps `NavigationRegion.Content` from the view. |
| `ContextGraphsRegion` | `object` | Wraps `GraphListRegion.Content` from the view. |
| `ContextGraphListRegion` | `object` | Wraps `GraphListRegion.Content` from the view. |
| `ContextTestsRegion` | `object` | Wraps `TestsRegion.Content` from the view. |
| `ContextLegendRegion` | `object` | Wraps `LegendRegion.Content` from the view. |
| `ContextPropertyRegion` | `object` | Standalone property (no backing view region referenced). |
| `ContextChartOptionsRegion` | `object` | Wraps `ChartOptionsRegion.Content` from the view. |
| `ContextViewerSettingsRegion` | `object` | Wraps `SettingsRegion.Content` from the view. |
| `ContextReportDataSelectRegion` | `object` | Wraps `DataSelectRegion.Content` from the view. |
| `ContextGraphRegion` | `object` | Wraps `GraphRegion.Content` from the view. |
| `ContextReportChartOptionsRegion` | `object` | Wraps `ReportChartOptionsRegion.Content` from the view. |
| `ContextReportResultsRegion` | `object` | Wraps `ReportResultsRegion.Content` from the view. |
| `ConfigPath` | `string` | **Throws `NotImplementedException`** on get/set. |
| `TitleTests` | `string` | Display title for tests section. |
| `TotalSelectedTests` | `int` | Count of selected tests; updates `TitleTests` on set. |
| `TotalLoadedTests` | `int` | Count of loaded tests; updates `TitleTests` on set. |
| `TitleGraphs` | `string` | Display title for graphs section. |
| `TotalSelectedGraphs` | `int` | Count of selected graphs; updates `TitleGraphs` on set. |
| `TotalLoadedGraphs` | `int` | Count of loaded graphs; updates `TitleGraphs` on set. |
| `SelectedDataFolder` | `string` | Publishes `DataFolderChangedEvent` when set (ignores null/empty). |
| `SelectedDataFile` | `string` | Publishes `DataFolderChangedEvent` when set (ignores null/empty). |
| `DoesUserHaveEditPermission` | `bool` | Permission flag (default: `false`). |
| `ChannelCodeViewMode` | `IsoViewMode` | Publishes `ChannelCodesViewChangedEvent` on change. |
| `CalibrationBehaviorSetting` | `CalibrationBehaviors` | Publishes `CalibrationBehaviorSettingChangedEvent` on change. |
| `CalibrationBehaviorSettableInViewer` | `bool` | Controls tab selection and publishes `CalibrationBehaviorSettableInViewerChangedEvent`. |
| `SettingsVisibility` | `Visibility` | Controls settings visibility (default: `Visible`). |
| `IsBusy` | `bool` | Controls busy indicator display. |
| `IsBusyMessage` | `string` | Message displayed during

View File

@@ -0,0 +1,38 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/PSDReportResultsModule.cs
generated_at: "2026-04-17T16:45:15.107658+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f39c541bd90c3ffa"
---
# PSDReportResultsModule Documentation
## 1. Purpose
This module serves as the Prism module initializer for the PSD Report Results feature within the DTS Viewer application. It is responsible for registering the PSD Report Results view and view model with the Unity dependency injection container, and provides assembly-level metadata (name, image, group, and region) that the main application uses to display and categorize this module as an available component.
---
## 2. Public Interface
### `PSDReportResultsModule`
A Prism `IModule` implementation that handles type registration for the PSD Report Results feature.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `PSDReportResultsModule(IUnityContainer unityContainer)` | Accepts an `IUnityContainer` instance stored in `_unityContainer`. |
| `Initialize` | `void Initialize()` | Registers `IPSDReportResultsViewModel``PSDReportResultsViewModel` and `IPSDReportResultsView``PSDReportResultsView` mappings with the Unity container. |
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation (no logic executed). |
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registration. |
### `PSDReportResultsModuleNameAttribute`
An assembly-level attribute extending `TextAttribute` that provides the module's assembly name.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `PSDReportResultsModuleNameAttribute()` | Default constructor; sets `AssemblyName` to `AssemblyNames.PSDReportResults.ToString()`. |
| Constructor | `PSDReportResultsModuleNameAttribute(string s)` | Overload accepting a string parameter (

View File

@@ -0,0 +1,16 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:45:31.357886+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "378a810c6e5d2421"
---
# Documentation: DTS.Viewer.PSDReportResults Assembly Configuration
## 1. Purpose
This file provides assembly-level metadata and configuration for the `DTS.Viewer.PSDReportResults` component. It exists to define the assembly's identity, version, and visibility settings within the larger "DTS Viewer" application ecosystem. As a standard .NET `AssemblyInfo.cs` file, its role is to inject attributes into the compiled manifest, ensuring the component is correctly identified by the common language runtime and tooling.
## 2. Public Interface
This file does not expose classes or methods for invocation. Instead, it configures the following assembly

View File

@@ -0,0 +1,48 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:12:01.658855+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fda3169cc98a4753"
---
# Resources
### Purpose
This module provides localization support for the PSD (Power Spectral Density) Report Results component within the DTS Viewer application. It exists to enable XAML-based string lookup for UI elements, allowing the report results interface to be localized. The module contains a WPF markup extension for direct XAML binding and a strongly-typed resource class with strings specific to PSD report results.
### Public Interface
**`TranslateExtension` class** (public, inherits `MarkupExtension`)
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `override object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for the given `_key`. Returns `#stringnotfound#` if the key is null or empty, or `#stringnotfound# <key>` if the resource lookup fails.
**`StringResources` class** (internal sealed)
- `static ResourceManager ResourceManager { get; }` - Returns the cached `ResourceManager` instance for the `DTS.Viewer.PSDReportResults.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Gets or sets the current thread's `CurrentUICulture` for resource lookups.
- `static string ChannelName { get; }` - Localized string "Name".
- `static string ExportPSDHeader { get; }` - Localized string "Export".
- `static string ExportPSDtoCSV { get; }` - Localized string "Export PSD to CSV".
- `static string ExportPSDtoPDF { get; }` - Localized string "Export PSD to PDF".
- `static string GRMS { get; }` - Localized string "GRMS".
- `static string PSDResultsHeader { get; }` - Localized string "Results".
- `static string SampleRate { get; }` - Localized string "Sample Rate".
### Invariants
- The `TranslateExtension` class is decorated with `[MarkupExtensionReturnType(typeof(string))]`, guaranteeing it returns a string when used in XAML.
- The `ProvideValue` method never returns `null`; it returns a fallback string beginning with `#stringnotfound#` on lookup failure.
- The `StringResources.ResourceManager` property lazily initializes exactly once.
- All resource string properties in `StringResources` are `internal` and return non-null values if the `.resx` file is properly configured.
### Dependencies
- **Depends on**: `System` (for `IServiceProvider`, `String`), `System.Windows.Markup` (for `MarkupExtension`, `MarkupExtensionReturnTypeAttribute`), `System.Resources` (for `ResourceManager`), `System.Globalization` (for `CultureInfo`).
- **Depended on by**: XAML files within `DTS.Viewer.PSDReportResults` that use `{local:Translate KeyName}` syntax, and any code in that assembly requiring localized strings.
### Gotchas
- The `TranslateExtension` class is defined in namespace `DTS.Viewer.PSDReportResults` but references `DTS.Viewer.PSDReportResults.Resources.StringResources`. This namespace structure must be accounted for in XAML namespace declarations.
- The `NotFound` constant value `#stringnotfound#` is hardcoded and will appear in the UI if a resource key is missing, which may be visible to end users during development.
- The `StringResources.Designer.cs` file is auto-generated; manual changes will be overwritten. Edit the corresponding `.resx` file instead.
---

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/View/PSDReportResultsView.xaml.cs
generated_at: "2026-04-17T16:28:49.882661+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6ffd6c8f349a4d16"
---
# View
### Purpose
This module provides a WPF view component for displaying PSD (Particle Size Distribution) report results. It serves as the code-behind file for a XAML-based user interface, implementing the `IPSDReportResultsView` interface to integrate with the broader DTS reporting infrastructure.
### Public Interface
**`PSDReportResultsView`** (class, partial)
- Constructor: `PSDReportResultsView()` - Initializes the component via `InitializeComponent()`.
- Implements: `IPSDReportResultsView`
**Event Handlers:**
- `GridViewColumnHeader_OnClick(object sender, System.Windows.RoutedEventArgs e)` - Handler for column header click events. Currently empty implementation.
- `GridViewColumnHeaderSearchable_OnSearch(object sender, System.Windows.RoutedEventArgs e)` - Handler for searchable column header search events. Currently empty implementation.
### Invariants
- The class must be used as a code-behind partial class paired with a corresponding XAML file (`PSDReportResultsView.xaml`).
- The class implements `IPSDReportResultsView`, implying it is intended to be resolved through dependency injection.
### Dependencies
- **Depends on:** `DTS.Common.Interface` (for `IPSDReportResultsView` interface)
- **Depends on:** `System.Windows` (WPF infrastructure for `RoutedEventArgs`)
### Gotchas
- Both event handlers (`GridViewColumnHeader_OnClick` and `GridViewColumnHeaderSearchable_OnSearch`) have empty implementations. The intended behavior is unclear from source alone—these may be stubs for future functionality or remnants of removed features.
---

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/ViewModel/PSDReportResultsViewModel.cs
generated_at: "2026-04-17T16:45:23.897639+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c04e7218899f6152"
---
# PSDReportResultsViewModel Documentation
## 1. Purpose
`PSDReportResultsViewModel` is a Prism-based ViewModel responsible for displaying PSD (Power Spectral Density) report results, specifically GRMS (G-RMS) summary data for test channels. It serves as a subscriber to data update events from parent view models and provides user interaction capabilities for exporting reports to PDF and CSV formats. This component bridges the gap between data calculation logic and the results presentation layer within the DTS Viewer reporting subsystem.
---
## 2. Public Interface
### Properties
| Name | Type | Description |
|------|------|-------------|
| `View` | `IBaseView` | Gets or sets the associated view instance. Assigned in constructor and has its `DataContext` set to `this`. |
| `Parent` | `IBaseViewModel` | Gets or sets the parent ViewModel. Passed via `Initialize(object parameter)` and used to filter event responses. |
| `Results` | `ObservableCollection<IChannelGRMSSummary>` | Observable collection of GRMS summary results displayed in the view. Cleared and repopulated on `PSDReportGRMSValuesUpdatedEvent`. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Interaction request for displaying notifications to the user. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Interaction request for displaying confirmation dialogs to the user. Declared with `new` keyword. |
| `ExportToPDFCommand` | `DelegateCommand` | Lazily-initialized command that publishes `SaveReportToPDFRequestedEvent` when executed. |
| `ExportToCSVCommand` | `DelegateCommand` | Lazily-initialized command that publishes `SaveReportToCSVRequestedEvent` when executed. |
### Methods
| Name | Signature | Description |
|------|-----------|-------------|
| `Initialize` | `void Initialize(object parameter

View File

@@ -0,0 +1,36 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/PSDReportSettingsModule.cs
generated_at: "2026-04-17T16:12:47.804729+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "77abce46004490fb"
---
# DTS.Viewer.PSDReportSettings
### Purpose
This module is a Prism-based plugin module that provides PSD (Power Spectral Density) Report Settings functionality for the DTS Viewer application. It follows the modular architecture pattern, registering its View, ViewModel, and Model components with the Unity dependency injection container at runtime. The module self-describes its metadata (name, image, group, region) through assembly-level attributes, enabling the main application to discover and display it as an available component.
### Public Interface
- **PSDReportSettingsModule** (class) - Implements `Prism.Modularity.IModule`. The main module entry point.
- `PSDReportSettingsModule(IUnityContainer unityContainer)` - Constructor accepting an injected `IUnityContainer`.
- `Initialize()` - Registers types with Unity container: `IPSDReportSettingsViewModel``PSDReportSettingsViewModel`, `IPSDReportSettingsModel``PSDReportSettingsModel`, `IPSDReportSettingsView``PSDReportSettingsView`.
- `OnInitialized(IContainerProvider containerProvider)` - Empty implementation (no post-initialization logic).
- `RegisterTypes(IContainerRegistry containerRegistry)` - Calls `Initialize()` to perform type registration.
- **PSDReportSettingsModuleNameAttribute** (class) - Extends `TextAttribute`. Assembly-level attribute for module name metadata.
- `AssemblyName` (property) - Returns `AssemblyNames.PSDReportSettings.ToString()`.
- `GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `GetAssemblyName()` - Returns the `AssemblyName` property value.
- **PSDReportSettingsModuleImageAttribute** (class) - Extends `ImageAttribute`. Assembly-level attribute for module image and categorization.
- `AssemblyImage` (property) - Retrieves image via `AssemblyInfo.GetImage(AssemblyNames.PSDReportSettings.ToString())`.
- `AssemblyName` (property) - Returns `AssemblyNames.PSDReportSettings.ToString()`.
- `AssemblyGroup` (property) - Returns `eAssemblyGroups.Viewer.ToString()`.
- `AssemblyRegion` (property) - Returns `eAssemblyRegion.PSDReportSettingsRegion`.
- `GetAssemblyImage()`, `GetAssemblyName()`, `GetAssemblyGroup()`, `GetAssemblyRegion()` - Accessor methods for respective properties.
### Invariants
- The module is registered with Prism using `ModuleName = "PSDReportSettings"`.
- Assembly-level attributes `[assembly: PSDReportSettingsModuleName()]` and `[assembly:

View File

@@ -0,0 +1,24 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Model/PSDReportSettingsModel.cs
generated_at: "2026-04-17T16:45:17.545479+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3cd6b22a3103d4b6"
---
# Documentation: PSDReportSettingsModel
## 1. Purpose
`PSDReportSettingsModel` is a data model class that encapsulates configuration settings for Power Spectral Density (PSD) report generation. It holds state for low-pass and high-pass filter parameters (enabled state, frequency, type, order), windowing configuration (width, type, averaging, overlap), envelope display options, and data range boundaries. The model implements property change notification and automatically propagates changes to a parent view model via the `IPSDReportSettingsModel` interface, supporting a parent-child relationship in an MVVM architecture.
## 2. Public Interface
### Properties
| Property | Type | Default Value | Description |
|----------|------|---------------|-------------|
| `Parent` | `IPSDReportSettingsViewModel` | `null` | Reference to the parent view model. Uses custom equality check before setting. Raises `OnPropertyChanged("Parent")` on change. |
| `CanPublishChanges` | `bool` | `true` | Controls whether property changes trigger `Parent.PublishChanges()`. |
| `LowPassFilter

View File

@@ -0,0 +1,16 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:29:19.010472+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "914b190bf039c9fd"
---
# Properties
### Purpose
This module contains assembly metadata for the DTS.Viewer.Test test project. It is a standard .NET Framework assembly information file that defines version information, COM visibility settings, and other assembly-level attributes used by the runtime and tooling.
### Public Interface
No

View File

@@ -0,0 +1,65 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:55:49.469835+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fa11c9b8329163f4"
---
# Documentation: DTS.Viewer.PSDReportSettings.Resources
## 1. Purpose
This module provides localization infrastructure for the PSD (Power Spectral Density) Report Settings UI within the DTS Viewer application. It combines a WPF XAML markup extension (`TranslateExtension`) for declarative resource binding with a strongly-typed resource accessor class (`StringResources`) that wraps a `.resx` resource file. The module enables UI elements to reference localized strings directly in XAML markup while centralizing string management for the PSD report configuration interface.
---
## 2. Public Interface
### `TranslateExtension` (public class)
**Namespace:** `DTS.Viewer.PSDReportSettings`
**Base Class:** `System.Windows.Markup.MarkupExtension`
**Attribute:** `[MarkupExtensionReturnType(typeof(string))]`
A WPF markup extension that enables XAML bindings to localized string resources.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in a private readonly field `_key`. |
| `ProvideValue` | `public override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for the provided key. Returns `NotFound` constant if key is null or empty. Returns `NotFound + " " + _key` if the resource lookup returns null. |
**Constants:**
- `private const string NotFound = "#stringnotfound#"` — Fallback string returned when a resource key cannot be resolved.
---
### `StringResources` (internal class)
**Namespace:** `DTS.Viewer.PSDReportSettings.Resources`
**Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]`
A strongly-typed resource class auto-generated from a `.resx` file. Provides access to localized UI strings for PSD report settings.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ResourceManager` | `internal static global::System.Resources.ResourceManager ResourceManager { get; }` | Returns the cached `ResourceManager` instance for this assembly. Lazy-initialized on first access. |
| `Culture` | `internal static global::System.Globalization.CultureInfo Culture { get; set; }` | Gets or sets the current UI culture for resource lookups. Overrides `CurrentUICulture` for this resource class. |
**Resource String Properties (all `internal static string`):**
| Property | Default Value (from comments) |
|----------|-------------------------------|
| `EnvelopeHeader` | "Envelope" |
| `ExportPSDHeader` | "Export" |
| `ExportPSDtoCSV` | "Export PSD to CSV" |
| `ExportPSDtoPDF` | "Export PSD to PDF" |
| `FilterCenterFrequency` | "Center frequency" |
| `FilterOrder` | "Filter order" |
| `FilterSettingsHeader` | "Filters" |
| `FilterType` | "Filter type" |
| `FilterType_Bessel` | "Bessel" |
| `FilterType_Butterworth` | "Butterworth" |
| `Filter

View File

@@ -0,0 +1,50 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/View/PSDReportSettingsView.xaml.cs
generated_at: "2026-04-17T16:45:20.395453+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6db79cd084924166"
---
# Documentation: PSDReportSettingsView
## 1. Purpose
`PSDReportSettingsView` is a WPF view component that provides the user interface for configuring PSD (Power Spectral Density) report settings. It implements the `IPSDReportSettingsView` interface and serves as the visual layer for users to select parameters such as window widths for spectral analysis. This view is part of the DTS Viewer reporting subsystem.
## 2. Public Interface
### `PSDReportSettingsView()` (Constructor)
**Signature:** `public PSDReportSettingsView()`
Initializes the view component by calling `InitializeComponent()`, which loads the associated XAML layout.
### `AvailableWindowWidths` (Property)
**Signature:** `public List<int> AvailableWindowWidths { get; }`
Returns a hardcoded list of valid FFT window width options: `{ 512, 1024, 2048, 4096, 8196 }`. These values represent the sample counts available for windowing operations in PSD analysis.
## 3. Invariants
- The `AvailableWindowWidths` property always returns a new `List<int>` instance containing exactly five integer values: 512, 1024, 2048, 4096, and 8192.
- The view must be constructed on the UI thread due to the `InitializeComponent()` call.
- The class implements `IPSDReportSettingsView`, implying it is intended to be consumed through that interface by a presenter or view model.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Interface` - Provides the `IPSDReportSettingsView` interface that this class implements
- `Xceed.Wpf.Toolkit.PropertyGrid.Attributes` - Imported but **not used** in the visible source
- `System.Collections.Generic` - Provides `List<T>` for the `AvailableWindowWidths` property
### What depends on this module:
- Cannot be determined from source alone. Consumers would reference this view through the `IPSDReportSettingsView` interface.
## 5. Gotchas
- **Unused import:** The `Xceed.Wpf.Toolkit.PropertyGrid.Attributes` namespace is imported but has no visible usage in the current code. This may indicate leftover references from removed functionality.
- **Commented-out code:** Three properties (`AvailablePassFilterTypes`, `AvailableWindowAveragingTypes`, `AvailableWindowTypes`) are fully commented out, suggesting this view previously exposed more configuration options. The commented code references types `DTS.Common.Enums.Viewer.Reports.PassFilterTypeEnumItemSource`, `WindowAveragingTypeEnumItemSource`, and `WindowTypeEnumItemSource` that may still exist in the codebase.
- **New list instance per call:** `AvailableWindowWidths` creates and returns a new `List<int>` on every property access rather than returning a cached or static instance. This is inefficient if called frequently.

View File

@@ -0,0 +1,24 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/ViewModel/PSDReportSettingsViewModel.cs
generated_at: "2026-04-17T16:45:17.443820+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a8204d359bfb7c28"
---
# Documentation: PSDReportSettingsViewModel
## 1. Purpose
`PSDReportSettingsViewModel` is a Prism-based view model that manages configuration settings for PSD (Power Spectral Density) reports. It serves as a mediator between graph visualization components and report settings, responding to graph events (channel selection, axis changes, graph clearing) and publishing setting changes to subscribers. The class follows the MVVM pattern using Unity for dependency injection and Prism's EventAggregator for decoupled component communication.
---
## 2. Public Interface
### Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IBaseView` | Gets or sets the associated view instance.

View File

@@ -0,0 +1,35 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Test/ViewerUnitTest.cs
generated_at: "2026-04-17T16:12:47.802919+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f74e8588cbc8e6b6"
---
# DTS.Viewer.Test
### Purpose
This is a unit test project for the DTS Viewer application, created using Microsoft's unit testing framework (MSTest). Currently, this module serves as a placeholder or skeleton for future test implementation, containing no actual test logic. It exists to provide a dedicated testing assembly where developers can add unit tests for the DTS Viewer components.
### Public Interface
- **ViewerUnitTest** (class) - A test class decorated with `[TestClass]` attribute.
- `TestMethod1()` (method) - A single test method decorated with `[TestMethod]`. Currently contains no implementation (empty method body).
### Invariants
- The assembly is configured with MSTest attributes (`[TestClass]`, `[TestMethod]`) for test discovery and execution.
- Assembly version is fixed at `1.0.0.0` via `AssemblyVersion` and `AssemblyFileVersion` attributes.
- COM visibility is explicitly disabled (`ComVisible(false)`).
### Dependencies
**This module depends on:**
- `Microsoft.VisualStudio.TestTools.UnitTesting` - MSTest framework for unit testing attributes and infrastructure.
**What depends on this module:**
- None identified from source alone. This is a leaf test project.
### Gotchas
- The test project contains no actual test logic. `TestMethod1` is an empty placeholder that will pass trivially.
- No production code references are visible in the test file, suggesting tests have not yet been written against any specific implementation.
---

View File

@@ -0,0 +1,16 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Test/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:29:19.009578+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2b84ddda14561f2c"
---
# Properties
### Purpose
This module contains assembly metadata for the DTS.Viewer.Test test project. It is a standard .NET Framework assembly information file that defines version information, COM visibility settings, and other assembly-level attributes used by the runtime and tooling.
### Public Interface
No

View File

@@ -0,0 +1,77 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Settings.cs
- DTS Viewer/DTS.Viewer/ExportModule.cs
- DTS Viewer/DTS.Viewer/ViewerModule.cs
- DTS Viewer/DTS.Viewer/ViewerSession.cs
- DTS Viewer/DTS.Viewer/Bootstrapper.cs
generated_at: "2026-04-17T15:52:11.356156+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "709406bac3f2dc81"
---
# DTS.Viewer Module Documentation
## 1. Purpose
The `DTS.Viewer` namespace provides the core session management and module infrastructure for a Prism-based WPF application. It orchestrates the bootstrapping process, plugin loading, and module initialization for both standalone and integrated modes. The module manages two primary functional modules (`ExportModule` and `ViewerModule`) that communicate via an event aggregation system, and provides a `ViewerSession` class that serves as the main entry point for initializing the entire viewer framework.
---
## 2. Public Interface
### Settings.cs
**Class: `DTS.Viewer.Properties.Settings`** (internal sealed partial)
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `Settings()` | Default constructor with commented-out event handler subscriptions. |
| `SettingChangingEventHandler` | `void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e)` | Handler for the `SettingChanging` event. Currently empty implementation. |
| `SettingsSavingEventHandler` | `void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e)` | Handler for the `SettingsSaving` event. Currently empty implementation. |
---
### ExportModule.cs
**Class: `DTS.Viewer.ExportModule`** (implements `IExportModule`)
| Member | Signature | Description |
|--------|-----------|-------------|
| `SessionStarted` | `bool SessionStarted { get; private set; }` | Indicates whether a session has been started. Set to `true` after `StartSession()` completes. |
| Constructor | `ExportModule(IUnityContainer unityContainer)` | Accepts an injected `IUnityContainer` instance. |
| `Initialize` | `void Initialize()` | Registers `IExportModule` to `ExportModule` with `ContainerControlledLifetimeManager` (singleton). |
| `StartSession` | `void StartSession()` | Resolves `IEventAggregator`, publishes `LoadExportModuleEvent` with `LoadExportModuleArg`, and sets `SessionStarted = true`. |
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. |
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation. |
**Class: `DTS.Viewer.ExportNameAttribute`** (extends `TextAttribute`)
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ExportNameAttribute()` | Default constructor, calls `this(null)`. |
| Constructor | `ExportNameAttribute(string s)` | Ignores parameter `s`; sets `_assemblyName = "Export"`. |
| `AssemblyName` | `string AssemblyName { get; }` | Returns hardcoded `"Export"`. |
| `GetAttributeType` | `Type GetAttributeType()` | Returns `typeof(TextAttribute)`. |
| `GetAssemblyName` | `string GetAssemblyName()` | Returns `AssemblyName` property value. |
---
### ViewerModule.cs
**Class: `DTS.Viewer.ViewerModule`** (implements `IViewerModule`)
| Member | Signature | Description |
|--------|-----------|-------------|
| `SessionStarted` | `bool SessionStarted { get; private set; }` | Indicates whether a session has been started. Set to `true` after `StartSession()` completes. |
| Constructor | `ViewerModule(IUnityContainer unityContainer)` | Accepts an injected `IUnityContainer` instance. |
| `Initialize` | `void Initialize()` | Registers `IViewerModule` to `ViewerModule` with `ContainerControlledLifetimeManager` (singleton). |
| `StartSession` | `void StartSession()` | Resolves `IEventAggregator`, publishes `LoadViewModulEvent` with `LoadViewModulArg`, and sets `SessionStarted = true`. |
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. |
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation. |
**Class: `DTS.Viewer.ViewerNameAttribute`** (extends `TextAttribute`)
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ViewerNameAttribute()` | Default constructor, calls `this(null)`. |
| Constructor | `ViewerNameAttribute(string s)` | Ignores parameter `s`; sets `_assemblyName = "Viewer"`. |
| `AssemblyName` | `string

View File

@@ -0,0 +1,53 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Classes/MenuItem.cs
- DTS Viewer/DTS.Viewer/Classes/TabItem.cs
- DTS Viewer/DTS.Viewer/Classes/NavigationItem.cs
- DTS Viewer/DTS.Viewer/Classes/BindingProxy.cs
- DTS Viewer/DTS.Viewer/Classes/ComplonentsGroupControl.cs
generated_at: "2026-04-17T16:11:25.310253+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "69a4590b22ea60d6"
---
# Classes
### Purpose
This module provides UI helper classes for the DTS Viewer WPF application. It includes a `BindingProxy` for enabling data binding in contexts where the data context is not directly accessible (e.g., within style setters), and a `ComponentsGroupControl` custom control for displaying grouped UI components with an image and title. Several placeholder classes (`MenuItem`, `TabItem`, `NavigationItem`) exist but contain no implementation.
### Public Interface
**BindingProxy** (inherits `Freezable`)
- `protected override Freezable CreateInstanceCore()` - Creates a new instance of `BindingProxy`. Required override for `Freezable` inheritance.
- `public static readonly DependencyProperty DataProperty` - Dependency property identifier for `Data`.
- `public object Data { get; set; }` - Gets or sets the data object to proxy for binding purposes.
**ComponentsGroupControl** (inherits `Control`)
- `public class ClickEventArgs : EventArgs` - Nested event args class with default constructor.
- `public static RoutedCommand ClickCommand { get; }` - Static routed command for click handling.
- `public static readonly DependencyProperty ImageProperty` - Dependency property identifier for `Image`.
- `public ImageSource Image { get; set; }` - Gets or sets the image source for the control.
- `public static readonly DependencyProperty TitleProperty` - Dependency property identifier for `Title`.
- `public string Title { get; set; }` - Gets or sets the title text; default value is "Title".
**MenuItem**
- No public members defined (empty class).
**TabItem**
- No public members defined (empty class).
**NavigationItem**
- No public members defined (empty class).
### Invariants
- `BindingProxy` must inherit from `Freezable` to participate in the WPF property system and support data binding in style setters.
- `ComponentsGroupControl` registers a default style key via `DefaultStyleKeyProperty.OverrideMetadata` in its static constructor, implying a XAML style/template must exist elsewhere.
- `ComponentsGroupControl.ClickCommand` is registered at the class level via `CommandManager.RegisterClassCommandBinding`.
### Dependencies
- **Depends on**: `System.Windows`, `System.Windows.Controls`, `System.Windows.Input`, `System.Windows.Media`.
- **Depended on by**: Unclear from source alone; likely used in DTS Viewer views and XAML templates.
### Gotchas
- **Commented-out code**: `ComponentsGroupControl` contains commented

View File

@@ -0,0 +1,72 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Modules/Main/View/MainView.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerShellView.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/MainViewLite.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainView.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainView.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainViewGrid.xaml.cs
- DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainViewGrid.xaml.cs
generated_at: "2026-04-17T15:50:13.365274+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5917449308f31e2b"
---
# Documentation: DTS.Viewer Main View Components
## 1. Purpose
This module contains the main view components for the DTS Viewer application, implementing a WPF-based visualization and export system. It provides multiple view variants (standard, lite, export, and viewer modes) that serve as UI shells for chart/graph visualization and PDF export functionality. The views follow a code-behind pattern with XAML partial classes, integrating with Prism's event aggregation system for loosely-coupled communication between components.
---
## 2. Public Interface
### MainView
**Signature:** `public partial class MainView : IMainView`
**Constructor:**
- `MainView()` — Initializes the component via `InitializeComponent()`.
**Behavior:** Minimal code-behind for the main window view. Serves as a shell container; actual behavior is defined in XAML and associated ViewModel.
---
### ViewerShellView
**Signature:** `public partial class ViewerShellView : IViewerShellView`
**Constructor:**
- `ViewerShellView()` — Initializes the component via `InitializeComponent()`.
**Behavior:** Shell view for the viewer mode. Minimal code-behind; behavior defined in XAML.
---
### MainViewLite
**Signature:** `public partial class MainViewLite : IMainViewerView`
**Constructor:**
- `MainViewLite()` — Initializes the component via `InitializeComponent()`.
**Behavior:** Lightweight variant of the main viewer view. Inherits from `UserControl`.
---
### ExportMainView
**Signature:** `public partial class ExportMainView : IExportMainView`
**Constructor:**
- `ExportMainView()` — Initializes the component via `InitializeComponent()`.
**Behavior:** View for export mode. Minimal code-behind.
---
### ViewerMainView
**Signature:** `public partial class ViewerMainView : IViewerMainView`
**Constructor:**
- `ViewerMainView()` — Initializes the component via `InitializeComponent()`.
**Behavior:** Main view for viewer mode. Contains commented-out code for AvalonDock layout serialization/deserialization (referencing `DockManager`, `XmlLayoutSerializer`,

View File

@@ -0,0 +1,155 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Modules/Main/ViewModel/ViewerShellViewModel.cs
- DTS Viewer/DTS.Viewer/Modules/Main/ViewModel/MainViewModel.cs
- DTS Viewer/DTS.Viewer/Modules/Main/ViewModel/ExportMainViewModel.cs
generated_at: "2026-04-17T15:54:03.993512+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1f3db03ef2ae0f10"
---
# DTS Viewer Main Module ViewModels Documentation
## 1. Purpose
This module contains the core ViewModel layer for the DTS Viewer application's main shell and content regions. It implements the MVVM pattern using Microsoft Prism and Unity IoC, providing three primary ViewModels: `ViewerShellViewModel` serves as the application shell container, `MainViewModel` manages the primary viewer interface with multiple regions (navigation, graph, property panels), and `ExportMainViewModel` extends functionality for data export operations including PDF generation and layout persistence. The module orchestrates view composition through region management and pub/sub event aggregation for loosely-coupled inter-component communication.
---
## 2. Public Interface
### ViewerShellViewModel
**Signature:** `public class ViewerShellViewModel : NotificationObject, IViewerShellViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ViewerShellViewModel(IViewerShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes the shell, sets up DataContext, creates interaction requests, subscribes to `RaiseNotification` event, and registers `IMainView`/`IMainViewModel` types with Unity. |
| View | `public IViewerShellView View { get; private set; }` | Holds reference to the associated view. |
| NotificationRequest | `public InteractionRequest<Notification> NotificationRequest { get; private set; }` | Prism interaction request for displaying notifications. |
| ConfirmationRequest | `public InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }` | Prism interaction request for confirmation dialogs. |
| Initialize | `public void Initialize()` | No-op implementation (assigns local variable `i = 10`). |
| Initialize | `public void Initialize(object parameter)` | No-op implementation (assigns local variable `i = 22`). |
| Initialize | `public void Initialize(object parameter, object model)` | Empty implementation. |
| Activated | `public void Activated()` | No-op (assigns empty string to local variable). |
| IsBusy | `bool IBaseViewModel.IsBusy { get; set; }` | Explicit interface implementation. |
| GetRegions | `public List<FrameworkElement> GetRegions()` | Returns all elements named "Region" from `MainShell` using `Utils.GetChildrenByName`. |
| ContextMainRegion | `public Object ContextMainRegion { get; set; }` | Gets/sets content of the `MainRegion` on the view. |
| IsMenuIncluded | `public bool IsMenuIncluded { get; set; }` | Bound property with `OnPropertyChanged` notification. |
| IsNavigationIncluded | `public bool IsNavigationIncluded { get; set; }` | Bound property with `OnPropertyChanged` notification. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns constant string `"MainRegion"`. |
| IsBusy | `public bool IsBusy { get; }` | **Throws `NotImplementedException`.** |
| IsDirty | `public bool IsDirty { get; }` | **Throws `NotImplementedException`.** |
| Cleanup | `public void Cleanup()` | **Throws `NotImplementedException`.** |
| CleanupAsync | `public Task CleanupAsync()` | **Throws `NotImplementedException`.** |
| InitializeAsync | `public Task InitializeAsync()` | **Throws `NotImplementedException`.** |
| InitializeAsync | `public Task InitializeAsync(object parameter)` | **Throws `NotImplementedException`.** |
---
### MainViewModel
**Signature:** `public class MainViewModel : BaseViewModel<IMainViewModel>, IMainViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `MainViewModel(IMainView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes view, DataContext, interaction requests, and subscribes to `RaiseNotification` event. |
| View | `public IBaseView View { get; private set; }` | Reference to the associated view. |
| NotificationRequest | `public InteractionRequest<Notification> NotificationRequest { get; private set; }` | Interaction request for notifications. |
| ConfirmationRequest | `public new InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }` | Interaction request for confirmations (hides base member). |
| Initialize | `public override void Initialize()` | Empty override. |
| Initialize | `public override void Initialize(object parameter)` | Casts parameter to `IBaseWindowModel`, sets parent menu/navigation flags, subscribes to `AssemblyListNotification` and `BusyIndicatorChangeNotification` events. |
| Activated | `public override void Activated()` | Empty override. |
| ContextNavigationRegion | `public object ContextNavigationRegion { get; set; }` | Gets/sets `NavigationRegion.Content` from `MainView`. |
| ContextGraphRegion | `public object ContextGraphRegion { get; set; }` | Gets/sets `GraphRegion.Content` from `MainView`. |
| ContextTestsRegion | `public object ContextTestsRegion { get; set; }` | Gets/sets `TestsRegion.Content` from `MainView`. |
| ContextGraphsRegion | `public object ContextGraphsRegion { get; set; }` | Gets/sets `GraphsRegion.Content` from `MainView`. |
| ContextLegendRegion | `public object ContextLegendRegion { get; set; }` | Gets/sets `LegendRegion.Content` from `MainView`. |
| ContextDiagRegion | `public object ContextDiagRegion { get; set; }` | Gets/sets `DiagRegion.Content` from `MainView`. |
| ContextStatsRegion | `public object ContextStatsRegion { get; set; }` | Gets/sets `StatsRegion.Content` from `MainView`. |
| ContextCursorRegion | `public object ContextCursorRegion { get; set; }` | Gets/sets `CursorRegion.Content` from `MainView`. |
| ContextPropertyRegion | `public object ContextPropertyRegion { get; set; }` | Gets/sets `PropertyRegion.Content` from `MainView`. |
| GetRegions | `public List<FrameworkElement> GetRegions()` | Returns all elements named "Region" from `MainShell`. |
| IsBusy | `public new bool IsBusy { get; set; }` | Busy indicator state with notification. |
| IsBusyMessage | `public new string IsBusyMessage { get; set; }` | Message for busy indicator. |
| IsMenuIncluded | `public new bool IsMenuIncluded { get; set; }` | Menu inclusion flag. |
| IsNavigationIncluded | `public new bool IsNavigationIncluded { get; set; }` | Navigation inclusion flag. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns `"MainRegion"`. |
---
### ExportMainViewModel
**Signature:** `public class ExportMainViewModel : BaseViewModel<IExportMainViewModel>, IExportMainViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ExportMainViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes interaction requests, resolves `IExportMainViewGrid` as View, sets DataContext. |
| View | `public IBaseView View { get; set; }` | Reference to the associated view. |
| Standalone | `public bool Standalone { get; set; }` | Determines which view type to cast to (`ExportMainView` vs `ExportMainViewGrid`). |
| SelectedTest | `public string SelectedTest { get; set; }` | Currently selected test identifier. |
| SelectedDTSFile | `public string SelectedDTSFile { get; set; }` | Currently selected DTS file. |
| SelectedEventList | `public List<ITestEvent> SelectedEventList { get; set; }` | List of selected test events. |
| AvailableTestIds | `public List<string> AvailableTestIds { get; set; }` | Available test IDs. |
| AddSelectedEvents | `public void AddSelectedEvents(string groupName, List<ITestEvent> events)` | Publishes busy indicator, adds events to `SelectedEventList`, then clears busy indicator. |
| SelectAndIncludeDataFile | `public void SelectAndIncludeDataFile(string value)` | Sets `_selectedDataFile` and publishes `DataFolderChangedEvent`. |
| Initialize | `public override void Initialize()` | Calls `Subscribe()` to register event handlers. |
| Initialize | `public override void Initialize(object parameter)` | Sets parent, menu/navigation flags, calls `Subscribe()`, sets DataContext. |
| Activated | `public override void Activated()` | Empty override. |
| ZoomReset | `public void ZoomReset()` | Publishes `ResetZoomChangedEvent` with `true`. |
| LeftKeyPress | `public void LeftKeyPress()` | Publishes `ShiftT0Event` with step `-1`. |
| RightKeyPress | `public void RightKeyPress()` | Publishes `ShiftT0Event` with step `1`. |
| LoadLayoutCommand | `public ICommand LoadLayoutCommand { get; }` | Loads AvalonDock layout from `.\DataProViewerAvalonDock.config`. |
| SaveLayoutCommand | `public ICommand SaveLayoutCommand { get; }` | Saves AvalonDock layout to `.\AvalonDock.config`. |
| ContextNavigationRegion | `public object ContextNavigationRegion { get; set; }` | Region content accessor; behavior varies by `Standalone` flag. |
| ContextGraphRegion | `public object ContextGraphRegion { get; set; }` | Region content accessor; behavior varies by `Standalone` flag. |
| ContextGraphListRegion | `public object ContextGraphListRegion { get; set; }` | Region content accessor; behavior varies by `Standalone` flag. |
| ContextTestsRegion | `public object ContextTestsRegion { get; set; }` | Region content accessor; behavior varies by `Standalone` flag. |
| ContextGraphsRegion | `public object ContextGraphsRegion { get; set; }` | Maps to `GraphListRegion` content. |
| ContextPropertyRegion | `public object ContextPropertyRegion { get; set; }` | Property region content. |
| SettingsVisibility | `public Visibility SettingsVisibility { get; private set; }` | Controls settings panel visibility. |
| TotalSelectedTests | `public int TotalSelectedTests { get; set; }` | Count with title update side effect. |
| TotalLoadedTests | `public int TotalLoadedTests { get; set; }` | Count with title update side effect. |
| TotalSelectedGraphs | `public int TotalSelectedGraphs { get; set; }` | Count with title update side effect. |
| TotalLoadedGraphs | `public int TotalLoadedGraphs { get; set; }` | Count with title update side effect. |
| SelectedDataFolder | `public string SelectedDataFolder { get; set; }` | Publishes `DataFolderChangedEvent` on set. |
| SelectedDataFile | `public string SelectedDataFile { get; set; }` | Publishes `DataFolderChangedEvent` on set. |
| ShowModifications | `public bool ShowModifications { get; set; }` | Set to `true` when T0 shift occurs. |
| ChannelCodeViewMode | `public IsoViewMode ChannelCodeViewMode { get; set; }` | Publishes `ChannelCodesViewChangedEvent` on set. |
| CalibrationBehaviorSetting | `public CalibrationBehaviors CalibrationBehaviorSetting { get; set; }` | Publishes `ExportCalibrationBehaviorSettingChangedEvent` on set. |
| CalibrationBehaviorSettableInViewer | `public bool CalibrationBehaviorSettableInViewer { get; set; }` | Publishes event and selects graphs tab on set. |
| IsBusy | `public new bool IsBusy { get; set; }` | Busy indicator state. |
| IsBusyMessage | `public new string IsBusyMessage { get; set; }` | Busy indicator message. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns `"MainRegion"`. |
---
## 3. Invariants
1. **MEF Singleton Shell**: `ViewerShellViewModel` is exported with `CreationPolicy.Shared`, ensuring a single shell instance per application.
2. **Region Naming Convention**: All regions are accessed via properties named `Context*Region` and are retrieved from view controls with corresponding `*Region` property names.
3. **Event Subscription Pattern**: All ViewModels subscribe to events in their constructors or `Initialize` methods; no unsubscription logic is visible in the source.
4. **Parent-Child Relationship**: `MainViewModel` and `ExportMainViewModel` expect `Initialize(object parameter)` to receive an `IBaseWindowModel` castable object.
5. **Standalone Mode Switching**: `ExportMainViewModel` region accessors must check `Standalone` boolean to determine correct view type (`ExportMainView` vs `ExportMainViewGrid`).
6. **Busy Indicator Pairing**: `IsBusy` and `IsBusyMessage` are intended to be used together for UI feedback during operations.
7. **Layout File Dependencies**: `LoadLayoutCommand` requires `.\DataProViewerAvalonDock.config` to exist; `SaveLayoutCommand` writes to `.\AvalonDock.config`.
---
## 4. Dependencies
### External Dependencies (from imports)
- `Microsoft.Practices.Prism.Events` - Event aggregation (`IEventAggregator`, `ThreadOption`)
- `Microsoft.Practices.Prism.Interactivity.InteractionRequest` - `InteractionRequest<T>`, `Notification`, `Confirmation`
- `Microsoft.Practices.Prism.Regions` - `IRegionManager`
- `Microsoft.Practices.Prism.ViewModel` - `NotificationObject`
- `Microsoft.Practices.Unity` - `IUnityContainer`, `ContainerControlledLifetimeManager`
- `System.ComponentModel.Composition` - MEF attributes (`Export`, `PartCreationPolicy`, `CreationPolicy`)
- `Xceed.Wpf.A

View File

@@ -0,0 +1,43 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Properties/Settings.Designer.cs
- DTS Viewer/DTS.Viewer/Properties/AssemblyInfo.cs
- DTS Viewer/DTS.Viewer/Properties/Resources.Designer.cs
generated_at: "2026-04-17T16:11:52.542617+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "756efe4e3038db08"
---
# Properties
### 1. Purpose
This module contains the assembly-level configuration and auto-generated code for the `DTS.Viewer` assembly. It defines the application's identity, version information, and provides strongly-typed access to application settings and localized resources via the `Properties` namespace. It serves as the configuration backbone for the DTS Viewer application.
### 2. Public Interface
**Class: `Settings`** (in `Settings.Designer.cs`)
* `public static Settings Default { get; }`: Provides access to the singleton instance of the application settings wrapper.
**Class: `Resources`** (in `Resources.Designer.cs`)
* `internal static global::System.Resources.ResourceManager ResourceManager { get; }`: Returns the cached resource manager instance used for looking up localized strings.
* `internal static global::System.Globalization.CultureInfo Culture { get; set; }`: Gets or sets the current UI culture for resource lookups.
**Assembly Attributes** (in `AssemblyInfo.cs`)
* `AssemblyTitle`: "DTS.Viewer"
* `AssemblyCompany`: "Diversified Technical Systems, Inc. (DTS)"
* `AssemblyVersion`: "1.0.0.0"
* `AssemblyFileVersion`: "1.0.0.0"
### 3. Invariants
* The `Settings` class is a sealed, singleton wrapper inheriting from `ApplicationSettingsBase`.
* The `Resources` class is auto-generated and intended for internal access only (`internal` class).
* Files `Settings.Designer.cs` and `Resources.Designer.cs` are marked with `GeneratedCodeAttribute`; manual changes will be overwritten by tooling.
### 4. Dependencies
* **Depends on**: `System.Configuration` (for `ApplicationSettingsBase`), `System.Resources` (for `ResourceManager`), `System.Runtime.CompilerServices`, `System.CodeDom.Compiler`.
* **Depended on by**: The main `DTS.Viewer` application logic (for accessing settings and resources).
### 5. Gotchas
* None identified from source alone, other than the standard warning that designer files should not be manually edited.
---

View File

@@ -0,0 +1,21 @@
---
source_files:
- DTS Viewer/DTS.Viewer/RegionAdapters/StackPanelRegionAdapter.cs
generated_at: "2026-04-17T16:13:40.918650+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "02157f0db2bb8b54"
---
# RegionAdapters
### Purpose
This module provides a custom Prism Region Adapter for `StackPanel` controls, enabling the Prism region management system to dynamically add and remove UI elements within a `StackPanel`. It bridges the gap between Prism's region architecture and WPF's `StackPanel` container, allowing views to be composed dynamically at runtime.
### Public Interface
- **`StackPanelRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory)`** (Constructor)
- Initializes the adapter with the specified `IRegionBehaviorFactory`. Required by the base `RegionAdapterBase<StackPanel>`.
- **`protected override void Adapt(IRegion region, StackPanel regionTarget)`**
- Subscribes to the `region.Views.CollectionChanged` event and synchronizes the `StackPanel.Children` collection with the region's views. Handles `NotifyCollection

View File

@@ -0,0 +1,39 @@
---
source_files:
- DTS Viewer/DTS.Viewer/Resources/TranslateExtension.cs
- DTS Viewer/DTS.Viewer/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:12:03.600226+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4d3d5da77d9b6b31"
---
# Resources
### Purpose
This module provides localization infrastructure for the DTS Viewer application. It contains a WPF markup extension for XAML binding to localized strings and an auto-generated strongly-typed resource class that wraps access to the underlying `.resx` resource file.
### Public Interface
**`TranslateExtension` (class)**
- Inherits: `MarkupExtension`
- Attribute: `[MarkupExtensionReturnType(typeof(string))]`
- Constructor: `TranslateExtension(string key)` — Stores the resource key for lookup.
- `object ProvideValue(IServiceProvider serviceProvider)` — Returns the localized string for the stored `_key`. Returns `#stringnotfound#` if the key is null/empty, or `#stringnotfound# {key}` if the lookup fails.
**`StringResources` (class)**
- Attribute: `internal`
- `static ResourceManager ResourceManager` — Gets the cached `ResourceManager` instance for this assembly.
- `static CultureInfo Culture` — Gets or sets the current UI culture for resource lookups.
- **Resource String Properties (static getters):**
- `string ChartOptionsHeader` — Localized string "Chart Options".
- `string GraphsDefaultTitle` — Localized string "Graphs ".
- `string ModificationsHeader` — Localized string "Modify".
- `string SavePDFError` — Localized string "Error occurred saving chart to PDF".
- `string SavePDFSuccess` — Localized string "Chart saved succesfully as {0}{1} and {2}{3}".
- `string SettingsTitle` — Localized string "Settings".
- `string TestIDsDefaultTitle` — Localized string "Test IDs".
- `string TestsDefaultTitle` — Localized string "Tests ".
### Invariants
-

View File

@@ -0,0 +1,53 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/TabView.xaml.cs
- DTS Viewer/DTS.Viewer/View/MenuView.xaml.cs
- DTS Viewer/DTS.Viewer/View/MainView.xaml.cs
- DTS Viewer/DTS.Viewer/View/ShellView.xaml.cs
- DTS Viewer/DTS.Viewer/View/ViewerShellView.xaml.cs
- DTS Viewer/DTS.Viewer/View/NavigationView.xaml.cs
generated_at: "2026-04-17T16:28:39.450430+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "36dc40ad355c1541"
---
# View
### Purpose
This module provides WPF view components for the DTS Viewer application. It contains code-behind files for various XAML views that implement interfaces from `DTS.Common.Interface`, following a view-first architecture where each view is a partial class paired with XAML markup. The views serve as passive containers with no logic beyond initialization.
### Public Interface
**TabView** : `ITabView`
- `TabView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
**MenuView** : `IMenuView`
- `MenuView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
**MainView** : `IMainView`
- `MainView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
**ShellView** : `IViewerShellView`
- `ShellView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
**ViewerShellView** : `IViewerShellView`
- `ViewerShellView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
**NavigationView** : `INavigationView`
- `NavigationView()` - Default constructor that calls `InitializeComponent()` to load the associated XAML.
### Invariants
- Each view must have a corresponding XAML file (e.g., `TabView.xaml`) that defines the UI layout.
- All views implement their respective interfaces from `DTS.Common.Interface`.
- `ShellView` and `ViewerShellView` both implement `IViewerShellView` - unclear if they are intended to be interchangeable or serve different contexts.
### Dependencies
- **Depends on**: `DTS.Common.Interface` (for `ITabView`, `IMenuView`, `IMainView`, `IViewerShellView`, `INavigationView` interfaces)
- **Depended on by**: Not determinable from source alone; likely consumed by a bootstrapper or DI container configuration.
### Gotchas
- **Duplicate shell view implementations**: Both `ShellView` and `ViewerShellView` implement `IViewerShellView`. The source does not clarify which is canonical or under what circumstances each is used. They exist in different namespaces (`DTS.Viewer.View` vs `DTS.Viewer`).
- No view logic beyond initialization is present; any behavior must be implemented in associated ViewModels or elsewhere.
---

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

View File

@@ -0,0 +1,27 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelVertical/View/DockPanelVerticalView.xaml.cs
generated_at: "2026-04-17T16:13:30.756881+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5f012e08f6e61377"
---
# View
### Purpose
The `NavigationViewModel` class serves as the ViewModel component for the navigation region in a Prism-based WPF application. It manages the `ContextNavigationRegion` content area, handles notification display via event aggregation, and coordinates with a parent `IShellViewModel`. This module exists to decouple navigation logic from the view while providing notification capabilities through the Prism InteractionRequest pattern.
### Public Interface
**Constructor**
- `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` — Initializes the view model, sets the view's DataContext, creates `NotificationRequest` and `ConfirmationRequest` interaction requests, and subscribes to the `RaiseNotification` event.
**Properties**
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Interaction request for displaying notifications.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Interaction request for displaying confirmations.
- `object ContextNavigationRegion { get; set; }` — Gets or sets the content of the `NavigationRegion` from the underlying `NavigationView`. Raises `OnPropertyChanged` on set.
- `string HeaderInfo { get; }` — Always returns `"NavigationRegion"`.
- `bool IsBusy { get; set; }` — Throws `NotImplementedException` on both getter and setter.
- `bool IsDirty { get;

View File

@@ -0,0 +1,27 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/DockPanelVertical/ViewModel/DockPanelVerticalViewModel.cs
generated_at: "2026-04-17T16:13:30.756128+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "af40e1e596555938"
---
# ViewModel
### Purpose
The `NavigationViewModel` class serves as the ViewModel component for the navigation region in a Prism-based WPF application. It manages the `ContextNavigationRegion` content area, handles notification display via event aggregation, and coordinates with a parent `IShellViewModel`. This module exists to decouple navigation logic from the view while providing notification capabilities through the Prism InteractionRequest pattern.
### Public Interface
**Constructor**
- `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` — Initializes the view model, sets the view's DataContext, creates `NotificationRequest` and `ConfirmationRequest` interaction requests, and subscribes to the `RaiseNotification` event.
**Properties**
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Interaction request for displaying notifications.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Interaction request for displaying confirmations.
- `object ContextNavigationRegion { get; set; }` — Gets or sets the content of the `NavigationRegion` from the underlying `NavigationView`. Raises `OnPropertyChanged` on set.
- `string HeaderInfo { get; }` — Always returns `"NavigationRegion"`.
- `bool IsBusy { get; set; }` — Throws `NotImplementedException` on both getter and setter.
- `bool IsDirty { get;

View File

@@ -0,0 +1,27 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/Navigation/View/NavigationView.xaml.cs
generated_at: "2026-04-17T16:13:30.755321+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d3b62006cfac1bfc"
---
# View
### Purpose
The `NavigationViewModel` class serves as the ViewModel component for the navigation region in a Prism-based WPF application. It manages the `ContextNavigationRegion` content area, handles notification display via event aggregation, and coordinates with a parent `IShellViewModel`. This module exists to decouple navigation logic from the view while providing notification capabilities through the Prism InteractionRequest pattern.
### Public Interface
**Constructor**
- `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` — Initializes the view model, sets the view's DataContext, creates `NotificationRequest` and `ConfirmationRequest` interaction requests, and subscribes to the `RaiseNotification` event.
**Properties**
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Interaction request for displaying notifications.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Interaction request for displaying confirmations.
- `object ContextNavigationRegion { get; set; }` — Gets or sets the content of the `NavigationRegion` from the underlying `NavigationView`. Raises `OnPropertyChanged` on set.
- `string HeaderInfo { get; }` — Always returns `"NavigationRegion"`.
- `bool IsBusy { get; set; }` — Throws `NotImplementedException` on both getter and setter.
- `bool IsDirty { get;

View File

@@ -0,0 +1,27 @@
---
source_files:
- DTS Viewer/DTS.Viewer/View/Navigation/ViewModel/NavigationViewModel.cs
generated_at: "2026-04-17T16:13:30.752772+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9a2cd7ffc388b646"
---
# ViewModel
### Purpose
The `NavigationViewModel` class serves as the ViewModel component for the navigation region in a Prism-based WPF application. It manages the `ContextNavigationRegion` content area, handles notification display via event aggregation, and coordinates with a parent `IShellViewModel`. This module exists to decouple navigation logic from the view while providing notification capabilities through the Prism InteractionRequest pattern.
### Public Interface
**Constructor**
- `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` — Initializes the view model, sets the view's DataContext, creates `NotificationRequest` and `ConfirmationRequest` interaction requests, and subscribes to the `RaiseNotification` event.
**Properties**
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Interaction request for displaying notifications.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Interaction request for displaying confirmations.
- `object ContextNavigationRegion { get; set; }` — Gets or sets the content of the `NavigationRegion` from the underlying `NavigationView`. Raises `OnPropertyChanged` on set.
- `string HeaderInfo { get; }` — Always returns `"NavigationRegion"`.
- `bool IsBusy { get; set; }` — Throws `NotImplementedException` on both getter and setter.
- `bool IsDirty { get;

View File

@@ -0,0 +1,134 @@
---
source_files:
- DTS Viewer/DTS.Viewer/ViewModel/NavigationViewModel.cs
- DTS Viewer/DTS.Viewer/ViewModel/MenuViewModel.cs
- DTS Viewer/DTS.Viewer/ViewModel/ShellViewModel.cs
- DTS Viewer/DTS.Viewer/ViewModel/ViewerShellViewModel.cs
- DTS Viewer/DTS.Viewer/ViewModel/MainViewModel.cs
generated_at: "2026-04-17T15:52:42.813402+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d5b4057c745da02a"
---
# DTS.Viewer ViewModel Module Documentation
## 1. Purpose
This module provides the core ViewModel layer for the DTS Viewer WPF application, implementing the MVVM pattern with Prism framework integration. It contains the shell-level view models (`ShellViewModel`, `ViewerShellViewModel`), navigation components (`NavigationViewModel`), menu handling (`MenuViewModel`), and main content orchestration (`MainViewModel`). These ViewModels manage view lifecycle, region navigation, event aggregation for decoupled communication, and dependency injection registration for their associated views.
---
## 2. Public Interface
### NavigationViewModel
**Signature:** `public class NavigationViewModel : BaseViewModel<INavigationViewModel>, INavigationViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes the view model, sets DataContext on view, creates interaction requests, and subscribes to `RaiseNotification` event. |
| NavigationView | `public INavigationView NavigationView { get; private set; }` | Holds reference to the associated navigation view. |
| ContextNavigationRegion | `public object ContextNavigationRegion { get; set; }` | Gets/sets content of the `NavigationRegion` from the `NavigationView`. Raises `OnPropertyChanged` on set. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns constant string `"NavigationRegion"`. |
| Initialize | `public override void Initialize()` | Empty implementation. |
| Initialize | `public override void Initialize(object parameter)` | Casts parameter to `IShellViewModel` and assigns to `Parent` field. |
| NotificationRequest | `public InteractionRequest<Notification> NotificationRequest { get; private set; }` | Prism interaction request for notifications. |
| ConfirmationRequest | `public InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }` | Prism interaction request for confirmations. |
**Methods throwing NotImplementedException:** `IsBusy` (getter/setter), `Activated()`, `IsDirty` (getter), `Cleanup()`, `CleanupAsync()`, `InitializeAsync()`, `InitializeAsync(object parameter)`
---
### MenuViewModel
**Signature:** `public class MenuViewModel : BaseViewModel<IMenuViewModel>, IMenuViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `MenuViewModel(IMenuView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes view model, sets DataContext, creates interaction requests, subscribes to `RaiseNotification` event. |
| View | `public IMenuView View { get; private set; }` | Reference to the associated menu view. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns constant string `"MainRegion"`. |
| Initialize | `public override void Initialize()` | Contains placeholder code (`int i = 10;`). |
| Initialize | `public override void Initialize(object parameter)` | Casts parameter to `IShellViewModel` and assigns to `Parent`. |
| CreateViews | `private void CreateViews(Boolean initialize)` | Creates a `ViewDefinition` for `RegionNames.MainRegion` with `IBaseView`/`IBaseViewModel` types. Currently incomplete - view definition is not added to region manager. |
**Methods throwing NotImplementedException:** Same pattern as `NavigationViewModel`.
---
### ShellViewModel
**Signature:** `public class ShellViewModel : NotificationObject, IViewerShellViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ShellViewModel(IViewerShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes view model, subscribes to `RaiseNotification`, registers `IMainView``MainView` and `IMainViewModel``MainViewModel` (singleton) with Unity container. |
| View | `public IViewerShellView View { get; private set; }` | Reference to shell view. |
| ContextMainRegion | `public Object ContextMainRegion { get; set; }` | Gets/sets content of `MainRegion` from `ShellView`. Raises `OnPropertyChanged` on set. |
| IsMenuIncluded | `public bool IsMenuIncluded { get; set; }` | Bound property with `OnPropertyChanged` notification. |
| IsNavigationIncluded | `public bool IsNavigationIncluded { get; set; }` | Bound property with `OnPropertyChanged` notification. |
| HeaderInfo | `public string HeaderInfo { get; }` | Returns constant string `"MainRegion"`. |
| GetRegions | `public List<FrameworkElement> GetRegions()` | Uses `Utils.GetChildrenByName` to find elements named "Region" in `MainShell`. |
| Initialize | `public void Initialize()` | Placeholder implementation (`int i = 10;`). |
| Initialize | `public void Initialize(object parameter)` | Placeholder implementation (`int i = 22;`). |
| Initialize | `public void Initialize(object parameter, object model)` | Empty implementation. |
| Activated | `public void Activated()` | Creates empty string variable. |
**Methods throwing NotImplementedException:** `IsBusy` (getter), `IsDirty` (getter), `Cleanup()`, `CleanupAsync()`, `InitializeAsync()`, `InitializeAsync(object parameter)`
---
### ViewerShellViewModel
**Signature:** `public class ViewerShellViewModel : NotificationObject, IViewerShellViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `ViewerShellViewModel(IViewerShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes view model, subscribes to `RaiseNotification`, registers `IViewerMainView``ViewerMainView` and `IViewerMainViewModel``ViewerMainViewModel` (singleton). |
| ContextMainRegion | `public Object ContextMainRegion { get; set; }` | Gets/sets content of `MainRegion` from `ViewerShellView`. |
| IsMenuIncluded | `public bool IsMenuIncluded { get; set; }` | Property with change notification. |
| IsNavigationIncluded | `public bool IsNavigationIncluded { get; set; }` | Property with change notification. |
| IsBusy | `public bool IsBusy { get; set; }` | **Implemented** - unlike `ShellViewModel`, this has working getter/setter with backing field `_isBusy`. |
| GetRegions | `public List<FrameworkElement> GetRegions()` | Uses `Utils.GetChildrenByName` on `ViewerShellView.MainShell`. |
**Methods throwing NotImplementedException:** `IsDirty` (getter), `Cleanup()`, `CleanupAsync()`, `InitializeAsync()`, `InitializeAsync(object parameter)`, `IBasePropertyChanged.OnPropertyChanged(string propertyName)`
---
### MainViewModel
**Signature:** `public class MainViewModel : BaseViewModel<IMainViewModel>, IMainViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `MainViewModel(IMainView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes view model, subscribes to `RaiseNotification` and `AssemblyListNotification` events. Registers `IMenuView`/`MenuView`, `IMenuViewModel`/`MenuViewModel`, `INavigationView`/`NavigationView`, `INavigationViewModel`/`NavigationViewModel` with Unity. |
| View | `public IMainView View { get; private set; }` | Reference to main view. |
| Initialize | `public override void Initialize()` | Empty implementation. |
| Initialize | `public override void Initialize(object parameter)` | Casts parameter to `IViewerShellViewModel`, sets `Parent.IsMenuIncluded` and `Parent.IsNavigationIncluded`, subscribes to `AssemblyListNotification` event. |
| ContextMainRegion | `public object ContextMainRegion { get; set; }` | Getter returns `null`. Setter raises `OnPropertyChanged` only. |
| IsMenuIncluded | `public new bool IsMenuIncluded { get; set; }` | Property with backing field `_isMenuIncluded`. Marked `new`. |
| IsNavigationIncluded | `public new bool IsNavigationIncluded { get; set; }` | Property with backing field `_isNavigationIncluded`. Marked `new`. |
| OnAssemblyListChange | `private void OnAssemblyListChange(AssemblyListInfo e)` | Handler for `AssemblyListNotification` event. **Entire implementation is commented out.** |
---
## 3. Invariants
1. **Constructor Initialization Order:** All view models set `View.DataContext = this` in the constructor before any other initialization.
2. **Event Subscription Pattern:** All view models subscribe to `RaiseNotification` event via `EventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification)` in the constructor.
3. **Notification Transformation:** `OnRaiseNotification` handlers always transform `NotificationContentEventArgs` to a new instance containing only `Message`, `MessageDetails`, and `Image` (excluding `Title` from content object, passing it separately to `Notification.Title`).
4. **Parent Assignment:** `Initialize(object parameter)` expects `parameter` to be castable to the appropriate parent interface (`IShellViewModel` or `IViewerShellViewModel`).
5. **MEF Export:** `ShellViewModel` and `ViewerShellViewModel` are exported as `IShellView` with `CreationPolicy.Shared`.
6. **Unity Registration Timing:** Type registrations (`RegisterType`) occur in constructors, meaning they execute before any view model methods.
---
## 4. Dependencies
### External Dependencies (from imports):
- `Microsoft.Practices.Prism.Events` - `IEventAggregator`, event infrastructure
- `Microsoft.Practices.Prism.Interactivity.InteractionRequest` - `InteractionRequest<T>`, `Notification`, `Confirmation`
- `Microsoft.Practices.Prism.Regions` - `IRegionManager`
- `Microsoft.Practices.Prism.ViewModel` - `NotificationObject`
- `Microsoft.Practices.Unity` - `IUnityContainer`, `ContainerControlledLifetimeManager`
- `System.ComponentModel.Composition` - MEF attributes (`Export`, `PartCreationPolicy`, `CreationPolicy`)
- `System.Windows` - `FrameworkElement`
### Internal Dependencies:
- `DTS.Common.Base` - `BaseViewModel<T>`, `IBaseViewModel