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,45 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/ViewModel/NavigationViewModel.cs
generated_at: "2026-04-17T16:30:27.299010+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0e6a43a095627fba"
---
# ViewModel
### Purpose
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
### Public Interface
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
**Constructor:**
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
**Properties:**
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
- `IsBusy` (`bool`) - Busy state indicator.
- `IsDirty` (`bool`) - Dirty state indicator.
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
**Methods:**
- `void Initialize()` - Empty override.
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
- `void PublishChanges()` - Empty method (implementation appears incomplete).
**Events:**
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
### Invariants
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility