--- source_files: - DataPRO/Modules/Reports/PedestrianAndHeadReports/ViewModel/HeadReportViewModel.cs - DataPRO/Modules/Reports/PedestrianAndHeadReports/ViewModel/TRLReportViewModel.cs generated_at: "2026-04-17T15:58:37.824013+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "bc7bfc2f44c9fcf7" --- # Documentation: PedestrianAndHeadReports ViewModels ## 1. Purpose This module provides ViewModel implementations for report generation within the DataPRO reporting system. It contains two primary ViewModels: `HeadReportViewModel` for head report functionality (currently limited to XML string handling per source comments), and `TRLReportViewModel` for TRL (Test Research Laboratory) reports that manage test data including acceleration, bending, and shear channel measurements. Both ViewModels follow the MVVM pattern using Microsoft Prism framework, providing input/output view management, event aggregation for cross-component communication, and lifecycle methods for initialization and cleanup. --- ## 2. Public Interface ### HeadReportViewModel **Class Signature:** ```csharp [Export(typeof(IHeadReportInputView))] [Export(typeof(IHeadReportOutputView))] [PartCreationPolicy(CreationPolicy.Shared)] public class HeadReportViewModel : IHeadReportViewModel ``` **Constructor:** ```csharp public HeadReportViewModel( IHeadReportInputView inputView, IHeadReportOutputView outputView, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer) ``` **Properties:** | Property | Type | Description | |----------|------|-------------| | `InputView` | `IHeadReportInputView` | The input view instance; DataContext is set to `this` during construction | | `OutputView` | `IHeadReportOutputView` | The output view instance; DataContext is set to `this` during construction | | `NotificationRequest` | `InteractionRequest` | Prism interaction request for displaying notifications | | `ConfirmationRequest` | `InteractionRequest` | Prism interaction request for displaying confirmations | | `IsDirty` | `bool` | Indicates whether the view model has unsaved changes; private setter | | `IsBusy` | `bool` | Controls busy indicator state; raises `PropertyChanged` on set | | `IsMenuIncluded` | `bool` | Indicates whether menu is included; raises `PropertyChanged` on set | | `IsNavigationIncluded` | `bool` | Indicates whether navigation is included; raises `PropertyChanged` on set | | `HeaderInfo` | `string` | Returns constant string `"MainRegion"` | **Methods:** | Method | Return Type | Description | |--------|-------------|-------------| | `Cleanup()` | `void` | Empty implementation | | `CleanupAsync()` | `Task` | Returns `null` | | `Initialize()` | `void` | Empty implementation | | `Initialize(object parameter)` | `void` | Empty implementation | | `Initialize(object parameter, object model)` | `void` | Empty implementation | | `InitializeAsync()` | `Task` | Returns `null` | | `InitializeAsync(object parameter)` | `Task` | Returns `null` | | `Activated()` | `void` | Empty implementation | | `OnPropertyChanged(string propertyName)` | `void` | Raises `PropertyChanged` event | **Events:** - `PropertyChanged` - Standard `INotifyPropertyChanged` implementation --- ### TRLReportViewModel **Class Signature:** ```csharp [Export(typeof(ITRLReportInputView))] [Export(typeof(ITRLReportOutputView))] [PartCreationPolicy(CreationPolicy.Shared)] public class TRLReportViewModel : ITRLReportViewModel ``` **Constructor:** ```csharp public TRLReportViewModel( ITRLReportInputView inputView, ITRLReportOutputView outputView, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer, DTS.Serialization.Test test) ``` **Properties (in addition to those inherited from base pattern):** | Property | Type | Description | |----------|------|-------------| | `Test` | `DTS.Serialization.Test` | The test object containing channel data | | `AvailableTimeUnits` | `ConstantsAndEnums.TimeUnits[]` | Initialized to