init
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/View/PSDReportSettingsView.xaml.cs
|
||||
generated_at: "2026-04-16T13:39:00.678252+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5b2351e33ed49693"
|
||||
---
|
||||
|
||||
# Documentation: PSDReportSettingsView
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`PSDReportSettingsView` is a WPF view component providing the user interface logic for configuring PSD (Power Spectral Density) report settings. It implements `IPSDReportSettingsView` and serves as the code-behind for a XAML view, exposing configuration options for report parameters such as window widths used in spectral analysis.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `PSDReportSettingsView()` (Constructor)
|
||||
**Signature:** `public PSDReportSettingsView()`
|
||||
|
||||
Initializes the view component by calling `InitializeComponent()`, which loads the associated XAML layout.
|
||||
|
||||
---
|
||||
|
||||
### `AvailableWindowWidths`
|
||||
**Signature:** `public List<int> AvailableWindowWidths { get; }`
|
||||
|
||||
Returns a new `List<int>` containing five predefined window width values: `{ 512, 1024, 2048, 4096, 8192 }`. These values represent FFT window sizes available for selection in the PSD report configuration.
|
||||
|
||||
**Note:** Creates a new list instance on every property access.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- The class always implements the `IPSDReportSettingsView` interface.
|
||||
- `AvailableWindowWidths` always returns exactly five integer values in ascending order: 512, 1024, 2048, 4096, 8192.
|
||||
- The view requires `InitializeComponent()` to be called (via constructor) before the XAML elements are accessible.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `DTS.Common.Interface` — provides `IPSDReportSettingsView` interface
|
||||
- `System.Collections.Generic` — provides `List<T>`
|
||||
- `Xceed.Wpf.Toolkit.PropertyGrid.Attributes` — imported but not visibly used in this file (likely referenced in XAML)
|
||||
|
||||
### What depends on this module:
|
||||
- Cannot be determined from source alone (no consumers visible in this file).
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **New list instance per access:** `AvailableWindowWidths` creates a new `List<int>` on every property getter call. If called frequently, this could cause unnecessary allocations. Consider caching if performance becomes a concern.
|
||||
|
||||
2. **Commented-out code:** Three properties (`AvailablePassFilterTypes`, `AvailableWindowAveragingTypes`, `AvailableWindowTypes`) are commented out, suggesting either:
|
||||
- Features were moved elsewhere or removed
|
||||
- Implementation is incomplete
|
||||
- These may be defined in the XAML or a separate partial class
|
||||
|
||||
3. **Unused import:** `Xceed.Wpf.Toolkit.PropertyGrid.Attributes` is imported but no attributes from this namespace are used in the visible code. This may indicate usage in XAML or remnants of refactored code.
|
||||
Reference in New Issue
Block a user