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,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.