7.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:24:51.311433+00:00 | zai-org/GLM-5-FP8 | 1 | 95ec9f6198f586ac |
Documentation: DTS.Common.Interface MainView Interfaces
1. Purpose
This module defines the core view and ViewModel interfaces for the main window of a DTS Viewer application. It establishes the contract for a modular, region-based UI layout using what appears to be a MVVM (Model-View-ViewModel) architecture. The interfaces support multiple UI regions (navigation, graphs, tests, legends, diagnostics, statistics, cursor, and property panels) and provide keyboard interaction handling, zoom control, and configuration management for a data visualization and analysis tool.
2. Public Interface
View Interfaces
IMainView
public interface IMainView : IBaseView { }
Marker interface for a main view component. Extends IBaseView. No members defined.
IViewerMainView
public interface IViewerMainView : IBaseView { }
Marker interface for a viewer main view component. Extends IBaseView. No members defined.
IViewerMainViewGrid
public interface IViewerMainViewGrid : IBaseView { }
Marker interface for a viewer main view grid component. Extends IBaseView. No members defined.
ViewModel Interfaces
IMainViewModel
public interface IMainViewModel : IBaseViewModel
| Member | Type | Access | Description |
|---|---|---|---|
View |
IBaseView |
get |
Gets the Main View instance |
ContextNavigationRegion |
object |
get; set |
Navigation region context |
ContextGraphRegion |
object |
get; set |
Graph region context |
ContextTestsRegion |
object |
get; set |
Tests region context |
ContextGraphsRegion |
object |
get; set |
Graphs region context |
ContextLegendRegion |
object |
get; set |
Legend region context |
ContextDiagRegion |
object |
get; set |
Diagnostics region context |
ContextStatsRegion |
object |
get; set |
Statistics region context |
ContextCursorRegion |
object |
get; set |
Cursor region context |
ContextPropertyRegion |
object |
get; set |
Property region context |
GetRegions() |
List<FrameworkElement> |
method | Returns a list of all region FrameworkElements |
IViewerMainViewModel
public interface IViewerMainViewModel : IBaseViewModel, ISelectedDataViewModel
| Member | Type | Access | Description |
|---|---|---|---|
View |
IBaseView |
get; set |
Gets or sets the Main View instance |
Standalone |
bool |
get; set |
Indicates if viewer is running in standalone mode |
ContextNavigationRegion |
object |
get; set |
Navigation region context |
ContextGraphRegion |
object |
get; set |
Graph region context |
ContextTestsRegion |
object |
get; set |
Tests region context |
ContextGraphsRegion |
object |
get; set |
Graphs region context |
ContextLegendRegion |
object |
get; set |
Legend region context |
ContextDiagRegion |
object |
get; set |
Diagnostics region context |
ContextStatsRegion |
object |
get; set |
Statistics region context |
ContextCursorRegion |
object |
get; set |
Cursor region context |
ContextPropertyRegion |
object |
get; set |
Property region context |
GetRegions() |
List<FrameworkElement> |
method | Returns a list of all region FrameworkElements |
ConfigPath |
string |
get; set |
Path to configuration file |
DoesUserHaveEditPermission |
bool |
get; set |
User edit permission flag |
ZoomReset() |
void |
method | Resets zoom to default state |
LeftKeyPress() |
void |
method | Handles left arrow key press notification |
RightKeyPress() |
void |
method | Handles right arrow key press notification |
ChannelCodeViewMode |
Common.Enums.IsoViewMode |
get; set |
Channel code view mode setting |
CalibrationBehaviorSetting |
Common.Enums.Sensors.CalibrationBehaviors |
get; set |
Calibration behavior configuration |
CalibrationBehaviorSettableInViewer |
bool |
get; set |
Whether calibration behavior can be set in viewer |
SettingsVisibility |
Visibility |
get |
Visibility state of settings UI |
3. Invariants
-
Namespace Mismatch: All interfaces are declared in namespace
DTS.Common.Interfacedespite file paths suggestingDTS.Viewer.MainViewsub-namespaces. The ReSharper disable comments indicate this is intentional. -
Region Context Types: All
Context*Regionproperties are typed asobject, suggesting late binding or multiple possible region types. Implementations must handle assignment of appropriate region types. -
View Property Mutability:
IMainViewModel.Viewis read-only (get), whileIViewerMainViewModel.Viewis read-write (get; set). Implementations must respect this difference. -
Inheritance Chain:
- All view interfaces must implement
IBaseView IMainViewModelmust implementIBaseViewModelIViewerMainViewModelmust implement bothIBaseViewModelandISelectedDataViewModel
- All view interfaces must implement
-
GetRegions() Contract: Must return a non-null
List<FrameworkElement>containing the UI regions.
4. Dependencies
External Dependencies (Imports)
| Namespace | Usage |
|---|---|
DTS.Common.Base |
IBaseView, IBaseViewModel, ISelectedDataViewModel base types |
System.Collections.Generic |
List<T> for GetRegions() return type |
System.Windows |
FrameworkElement, Visibility types |
Common.Enums |
IsoViewMode enum |
Common.Enums.Sensors |
CalibrationBehaviors enum |
Downstream Dependencies
Unclear from source alone - These are interface definitions; concrete implementations and consumers are not present in the provided files.
5. Gotchas
-
Namespace Inconsistency: The file paths suggest namespaces like
DTS.Viewer.MainView, but all interfaces are declared inDTS.Common.Interface. The// ReSharper disable CheckNamespacedirectives indicate this mismatch is known and suppressed. New developers should be aware that file location does not match declared namespace. -
View Property Asymmetry:
IMainViewModel.Viewis read-only whileIViewerMainViewModel.Viewis read-write. This inconsistency could cause confusion when implementing or consuming these interfaces. -
Magic Object Types: All region context properties use
objecttype rather than specific region interfaces. The actual types expected/returned are unclear from the source alone. -
Duplicate Region Definitions: Both
IMainViewModelandIViewerMainViewModeldefine identical region properties. This suggests either parallel evolution or a design that could benefit from a shared base interface for region management. -
Partial Enum Paths: The types
Common.Enums.IsoViewModeandCommon.Enums.Sensors.CalibrationBehaviorsare referenced but their definitions are not provided, making their exact values and usage unclear from this source alone.