13 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:57:51.242968+00:00 | zai-org/GLM-5-FP8 | 1 | c067eaab6be3056e |
Documentation: DTS.Common.Interface Namespace
1. Purpose
This module defines the core abstraction layer for the DTS application's WPF-based UI framework, establishing the view and view-model contracts that implement the Model-View-ViewModel (MVVM) pattern. It provides interfaces for shell containers, navigation components, tab views, menu systems, plugin integration, and DataPRO page definitions. These interfaces enable loose coupling between UI components and their consumers, supporting a modular, plugin-friendly architecture.
2. Public Interface
View Interfaces
ITabView
public interface ITabView : IBaseView { }
Marker interface for tab view components. Inherits from IBaseView.
IMainView
public interface IMainView : IBaseView { }
Marker interface for main view components. Inherits from IBaseView.
IMenuView
public interface IMenuView : IBaseView { }
Marker interface for menu view components. Inherits from IBaseView.
IShellView
public interface IShellView : IBaseWindow { }
Marker interface for shell window views. Note: Inherits from IBaseWindow, not IBaseView.
INavigationView
public interface INavigationView : IBaseView { }
Marker interface for navigation view components. Inherits from IBaseView.
IViewerShellView
public interface IViewerShellView : IBaseView { }
Marker interface for viewer shell view components. Inherits from IBaseView.
ViewModel Interfaces
ITabViewModel
public interface ITabViewModel : IBaseViewModel
{
ITabView View { get; }
}
Contract for tab view models. Provides access to the associated ITabView instance.
IMenuViewModel
public interface IMenuViewModel : IBaseViewModel
{
IMenuView View { get; }
}
Contract for menu view models. Provides access to the associated IMenuView instance.
INavigationViewModel
public interface INavigationViewModel : IBaseViewModel
{
INavigationView NavigationView { get; }
}
Contract for navigation view models. Provides access to the associated INavigationView instance via NavigationView property.
IShellViewModel
public interface IShellViewModel : IBaseWindowModel
{
IShellView View { get; }
List<FrameworkElement> GetRegions();
object ContextMainRegion { get; set; }
}
Contract for shell view models. Inherits from IBaseWindowModel. Provides:
View: The associatedIShellViewinstanceGetRegions(): Returns a list ofFrameworkElementregionsContextMainRegion: Gets/sets the main region context object
IViewerShellViewModel
public interface IViewerShellViewModel : IBaseViewModel
{
IViewerShellView View { get; }
List<FrameworkElement> GetRegions();
Object ContextMainRegion { get; set; }
}
Contract for viewer shell view models. Inherits from IBaseViewModel. Provides:
View: The associatedIViewerShellViewinstanceGetRegions(): Returns a list ofFrameworkElementregionsContextMainRegion: Gets/sets the main region context object
IMainViewModel
public interface IMainViewModel : IBaseViewModel
{
IBaseView View { get; }
object ContextNavigationRegion { get; set; }
object ContextGraphRegion { get; set; }
object ContextTestsRegion { get; set; }
object ContextGraphsRegion { get; set; }
object ContextLegendRegion { get; set; }
object ContextDiagRegion { get; set; }
object ContextStatsRegion { get; set; }
object ContextCursorRegion { get; set; }
object ContextPropertyRegion { get; set; }
List<FrameworkElement> GetRegions();
}
Contract for main view models with multiple named regions. Provides context properties for: Navigation, Graph, Tests, Graphs, Legend, Diag, Stats, Cursor, and Property regions.
Plugin Interface
IPluginComponent
public interface IPluginComponent
{
string ProgId { get; }
}
Contract for plugin modules. The ProgId property provides a program identifier used to instantiate the plugin object.
Assembly Metadata Interfaces and Attributes
IAssemblyImageAttribute
public interface IAssemblyImageAttribute
{
string AssemblyName { get; }
BitmapImage AssemblyImage { get; }
eAssemblyRegion AssemblyRegion { get; }
Type GetType();
BitmapImage GetAssemblyImage();
string GetAssemblyName();
eAssemblyRegion GetAssemblyRegion();
}
ImageAttribute (Abstract)
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public abstract class ImageAttribute : Attribute, IAssemblyImageAttribute
{
public abstract string AssemblyName { get; }
public abstract string AssemblyGroup { get; }
public abstract eAssemblyRegion AssemblyRegion { get; }
public abstract BitmapImage AssemblyImage { get; }
public abstract Type GetAttributeType();
public abstract BitmapImage GetAssemblyImage();
public abstract string GetAssemblyName();
public abstract string GetAssemblyGroup();
public abstract eAssemblyRegion GetAssemblyRegion();
}
Abstract attribute for assembly-level image metadata. Restricted to single instance per assembly.
IAssemblyNameAttribute
public interface IAssemblyNameAttribute
{
String AssemblyName { get; }
Type GetType();
string GetAssemblyName();
}
TextAttribute (Abstract)
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public abstract class TextAttribute : Attribute, IAssemblyNameAttribute
{
public abstract string AssemblyName { get; }
public abstract Type GetAttributeType();
public abstract string GetAssemblyName();
}
Abstract attribute for assembly-level name metadata. Restricted to single instance per assembly.
DataPRO Page Interface
IDataPROPage
public interface IDataPROPage : INotifyPropertyChanged
Comprehensive interface for DataPRO UI pages. Key members include:
Properties:
| Property | Type |
|---|---|
TestSetupChangeButtonVisible |
Visibility |
AutomaticModeStatusVisible |
Visibility |
PageName |
string |
PageImage |
ImageSource |
IsAdd |
bool |
UsesModifyEnhancements |
bool |
EditIDString |
string |
AddIDString |
string |
ModifiedObjectName |
string |
AutomaticProgression |
bool |
RecoveryDownloadMode |
bool |
UniqueId |
string (read-only) |
TileColor |
Color (read-only) |
CurrentSearchTerm |
string |
UsesNAVControl |
bool |
UsesSearchControl |
bool |
UsesSelectControl |
bool |
HasBackButton |
bool |
HasRefreshButton |
bool |
HasCancelButton |
bool |
HasSaveButton |
bool |
HasNextButton |
bool |
ContentBackgroundColor |
Color |
MainContent |
object |
ControlInOnSetActive |
bool |
Methods:
string GetName()long GetID()void SetID(long id)void SetTileColor(Color c)void SavePage(object obj)void ClearSearchTerm()void SetEnabled(bool bEnable)void VerifyProgress(object o)void SaveAndExit()void RefreshButtonPressed()void SetDoneButtonIsEnabled(bool bEnabled)void SetBackButtonIsEnabled(bool bEnabled)void DoneButtonPress()void SetCancelEnabled(bool bEnabled)ContentControl GetMainContentControl()void SetReturning()bool Validate(ref List<string> errors, ref List<string> warnings, bool displayWindow)bool OKToProceed()void FormClosing(Action OnComplete = null)void OnSetActive()void UnSet()void SetCurrentItem(object o)void SetupPageAvailable()
DataProPageProperties (Enum)
public enum DataProPageProperties
{
UsesModifyEnhancements,
TestSetupChangeButtonVisible,
AutomaticModeStatusVisible,
PageName,
PageImage,
IsAdd,
EditIDString,
AddIDString,
ModifiedObjectName,
AutomaticProgression,
RecoveryDownloadMode,
UsesNAVControl,
UsesSearchControl,
UsesSelectControl,
HasBackButton,
HasRefreshButton,
HasCancelButton,
HasSaveButton,
HasNextButton,
ContentBackgroundColor,
MainContent,
GenerateReportsVisible
}
Enumeration of mutable IDataPROPage properties that may require external observation or reaction.
3. Invariants
- View Hierarchy: All view interfaces (
ITabView,IMainView,IMenuView,INavigationView,IViewerShellView) inherit fromIBaseView, exceptIShellViewwhich inherits fromIBaseWindow. - ViewModel Hierarchy: All view-model interfaces inherit from
IBaseViewModel, exceptIShellViewModelwhich inherits fromIBaseWindowModel. - Attribute Restrictions:
ImageAttributeandTextAttributeare decorated with[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)], meaning they can only be applied to assemblies and only one instance of each is permitted per assembly. - Abstract Attributes: Both
ImageAttributeandTextAttributeare abstract classes; concrete implementations must override all abstract members. - IDataPROPage Identity:
UniqueIdandTileColorare read-only properties; values must be set viaSetID(long)andSetTileColor(Color)methods respectively. - IDataPROPage Validation: The
Validatemethod accepts errors and warnings by reference, suggesting callers must initialize these lists before invocation.
4. Dependencies
External Dependencies (Inferred from imports)
DTS.Common.Base- Provides base interfaces:IBaseView,IBaseWindow,IBaseViewModel,IBaseWindowModelSystem.Windows- ForFrameworkElement,Visibility,ContentControl,DependencyObject,UIElementSystem.Windows.Media- ForImageSource,ColorSystem.Windows.Media.Imaging- ForBitmapImageSystem.ComponentModel- ForINotifyPropertyChangedSystem.Collections.Generic- ForList<T>System- ForType,Object,String,Action,Attribute
Consumers
- Unknown from source alone. These interfaces are likely consumed by:
- Concrete view and view-model implementations
- Plugin modules implementing
IPluginComponent - Assembly metadata classes deriving from
ImageAttributeorTextAttribute - Page implementations conforming to
IDataPROPage
5. Gotchas
-
IShellView Base Interface Difference:
IShellViewinherits fromIBaseWindowwhile all other view interfaces inherit fromIBaseView. This suggests shell views represent top-level windows rather than embedded controls. -
INavigationViewModel Property Naming Inconsistency:
INavigationViewModelexposesNavigationViewproperty, whileITabViewModel,IMenuViewModel,IViewerShellViewModel, andIShellViewModelexposeViewproperty. This naming inconsistency may cause confusion. -
IDataPROPage Interface Size: The
IDataPROPageinterface is exceptionally large (30+ members), violating the Interface Segregation Principle. Implementers must provide all members even if some are unused. -
Mixed Property/Method Patterns in IDataPROPage: Some state is accessed via properties (e.g.,
TileColoris read-only property) while similar state requires methods (e.g.,SetTileColor(Color)). TheUniqueIdproperty has no corresponding setter method visible, butSetID(long)exists for a numeric ID. -
eAssemblyRegion Type Undefined: The
eAssemblyRegionenum type is referenced inIAssemblyImageAttributeandImageAttributebut is not defined in the provided source files. Its definition must exist elsewhere inDTS.Common.Baseor another namespace. -
IDataPROPage.Validate Ref Parameters: The
Validatemethod usesrefparameters for error/warning lists, requiring callers to initialize collections before calling. Failure to do so would result in compiler error or runtime issues.