Files
2026-04-17 14:55:32 -04:00

4.0 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs
Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs
2026-04-16T03:26:29.245992+00:00 Qwen/Qwen3-Coder-Next-FP8 1 aa456ba674677929

ViewerSettings

1. Purpose

This module defines two Prism-based pub/sub events used for broadcasting changes to viewer settings in the DTS system: one signaling whether calibration behavior is settable in the viewer (CalibrationBehaviorSettableInViewerChangedEvent), and another signaling changes to the visibility state of the viewer settings UI (ViewerSettingsVisibilityChangedEvent). These events enable decoupled communication between components—e.g., view models or services—responsible for managing viewer configuration and UI state, allowing subscribers to react to runtime updates without tight coupling.

2. Public Interface

  • CalibrationBehaviorSettableInViewerChangedEvent

    • Inherits from: PubSubEvent<bool>
    • Behavior: A Prism event used to publish and subscribe to changes in whether the calibration behavior settings are editable within the viewer. The payload is a bool: true indicates calibration behavior is settable in the viewer; false indicates it is not.
  • ViewerSettingsVisibilityChangedEvent

    • Inherits from: PubSubEvent<Visibility>
    • Behavior: A Prism event used to publish and subscribe to changes in the visibility of the viewer settings panel. The payload is a System.Windows.Visibility value (Visible, Collapsed, or Hidden), reflecting the current UI state of the settings panel.

3. Invariants

  • CalibrationBehaviorSettableInViewerChangedEvent payloads must be strictly true or false; no null or intermediate values are possible (since bool is non-nullable).
  • ViewerSettingsVisibilityChangedEvent payloads must be one of the three Visibility enum values defined in System.Windows: Visible, Collapsed, or Hidden.
  • Events are published only when the respective state actually changes; no redundant or duplicate publications are implied by the source (though enforcement of this is outside the scope of the event definitions themselves).
  • No ordering guarantees are specified or implied between these two events; they are independent.

4. Dependencies

  • Dependencies of this module:
    • Prism.Events (specifically PubSubEvent<T>), indicating reliance on the Prism library for event aggregation.
    • System.Windows (only for ViewerSettingsVisibilityChangedEvent, via Visibility).
  • Dependencies on this module:
    • Not inferable from the provided source files alone. However, any consumer (e.g., view models, services) that needs to react to viewer settings changes or calibration behavior availability must subscribe to these events via the Prism IEventAggregator.
    • These events are likely published by components managing viewer configuration state (e.g., a viewer settings view model or calibration service), but such publishers are not visible in this source.

5. Gotchas

  • Namespace flattening: The // ReSharper disable CheckNamespace directive suggests the namespace is intentionally DTS.Common.Events (not nested under a more specific sub-namespace), possibly to avoid deep nesting in legacy or tooling-constrained contexts.
  • No validation in event definition: The events themselves do not enforce semantics (e.g., that Visibility.Collapsed and Visibility.Hidden are treated differently); interpretation of payload values is deferred to subscribers.
  • No documentation comments: The source lacks XML documentation comments, so semantic meaning (e.g., why calibration behavior might be settable or not) is not embedded here—consumers must infer intent from usage.
  • No versioning or deprecation markers: No indication of whether these events are stable, experimental, or scheduled for change.
  • None identified from source alone.