--- source_files: - Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs - Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs generated_at: "2026-04-17T16:37:52.583907+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "4781a254be509f2c" --- # Documentation: Viewer Settings Events ## 1. Purpose This module defines two Prism event classes used for decoupled communication within the DTS Viewer subsystem. These events facilitate pub/sub messaging related to viewer settings state changes—specifically, calibration behavior configuration and visibility toggling of the viewer settings UI. Both events leverage Prism's `PubSubEvent` base class to enable loosely-coupled component communication. --- ## 2. Public Interface ### `CalibrationBehaviorSettableInViewerChangedEvent` - **Signature:** `public class CalibrationBehaviorSettableInViewerChangedEvent : PubSubEvent` - **Behavior:** A typed event that carries a `bool` payload indicating whether calibration behavior can be set in the viewer. Publishers broadcast the boolean state; subscribers receive it via the Prism event aggregation mechanism. ### `ViewerSettingsVisibilityChangedEvent` - **Signature:** `public class ViewerSettingsVisibilityChangedEvent : PubSubEvent` - **Behavior:** A typed event that carries a `System.Windows.Visibility` payload. Publishers broadcast visibility state changes (e.g., `Visible`, `Hidden`, `Collapsed`); subscribers receive the new visibility value. --- ## 3. Invariants - **Payload types are fixed:** `CalibrationBehaviorSettableInViewerChangedEvent` always carries `bool`; `ViewerSettingsVisibilityChangedEvent` always carries `Visibility`. - **Inheritance contract:** Both classes inherit from `PubSubEvent` and do not override or extend any members, relying entirely on the Prism base implementation. - **Namespace consistency:** Both types reside in `DTS.Common.Events` regardless of their file location within `DTS.Viewer/ViewerSettings/` subdirectories. --- ## 4. Dependencies ### This module depends on: - `Prism.Events` — Provides `PubSubEvent` base class for event aggregation - `System.Windows` — Provides `Visibility` enum (used by `ViewerSettingsVisibilityChangedEvent` only) ### What depends on this module: - **Unclear from source alone.** Consumers would be any component that publishes or subscribes to these events via Prism's `IEventAggregator`, but such usages are not present in the provided files. --- ## 5. Gotchas - **Namespace/file path mismatch:** The files are located in `Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/`, but the declared namespace is `DTS.Common.Events`. The `// ReSharper disable CheckNamespace` directive suppresses IDE warnings about this discrepancy. This may indicate a deliberate organizational choice or historical refactoring artifact. - **No explicit constructors or members:** Both classes are empty declarations inheriting from `PubSubEvent`. This is idiomatic for Prism events but may confuse developers expecting explicit publish/subscribe methods on the class itself—those are accessed via `IEventAggregator.GetEvent()`.