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