Files
DP44/docs/ai/DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/View.md
2026-04-17 14:55:32 -04:00

2.9 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/View/PSDReportSettingsView.xaml.cs
2026-04-17T16:45:20.395453+00:00 zai-org/GLM-5-FP8 1 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.