3.2 KiB
3.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:11:57.315846+00:00 | zai-org/GLM-5-FP8 | 1 | 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 callsInitializeComponent(). Contains commented-out code for AvalonDock layout serialization/deserialization viaXmlLayoutSerializer.
PSDReportMainViewGrid (implements IPSDReportMainViewGrid)
PSDReportMainViewGrid()- Constructor that callsInitializeComponent()and registers aLoadedevent handler.PSDReportMainViewGrid_Loaded(object sender, RoutedEventArgs e)- Private event handler that resolvesIEventAggregatorfromContainerLocator.Containerand subscribes toGraphLoadedCountNotificationevent.OnGraphLoadedCountNotification(GraphLoadedCountNotificationArg arg)- Private callback that validates theDataContextmatchesarg.ParentVM, then spawns a background task that waits 3 seconds before setting focus tochartResultsTabviaDispatcher.BeginInvoke.SetFocus()- Private method that selects, makes focusable, and focuseschartResultsTab.
Invariants
PSDReportMainViewGrid._eventAggregatoris null until theLoadedevent fires.OnGraphLoadedCountNotificationwill early-return ifDataContextis null or does not matcharg.ParentVM(cast toIBaseViewModel).- The 3-second delay in
OnGraphLoadedCountNotificationis 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
IEventAggregatoravailability. - 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:
PSDReportMainViewcontains 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.