5.5 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:18:12.505284+00:00 | zai-org/GLM-5-FP8 | 1 | 329090afc20c7c34 |
Documentation: DTS.Common.Interface.StatusAndProgressBar
1. Purpose
This module defines the contract layer for status and progress bar UI components within the DTS application. It provides interfaces for views and view models following a Model-View-ViewModel (MVVM) pattern, along with a set of delegate types used for progress reporting, status updates, and error handling callbacks. The module serves as an abstraction layer that decouples UI implementation from business logic, enabling consistent progress tracking and status communication across the application.
2. Public Interface
Interfaces
IStatusAndProgressBarView
Namespace: DTS.Common.Interface
Inheritance: IBaseView
An empty marker interface extending IBaseView. No members defined.
IStatusAndProgressFooterView
Namespace: DTS.Common.Interface
Inheritance: IBaseView
An empty marker interface extending IBaseView. No members defined.
IStatusAndProgressBarFooterViewModel
Namespace: DTS.Common.Interface
Inheritance: IBaseViewModel
| Property | Type | Accessor | Description |
|---|---|---|---|
View |
IStatusAndProgressFooterView |
get; set; | Holds reference to the associated footer view |
IStatusAndProgressBarViewModel
Namespace: DTS.Common.Interface
Inheritance: IBaseViewModel
| Property | Type | Accessor | Description |
|---|---|---|---|
View |
IBaseView |
get; set; | Gets the Search View (per XML comment) |
Parent |
IBaseViewModel |
get; set; | Reference to parent view model |
ProgressBarName |
string |
get; set; | Name identifier for the progress bar |
ContextSearchRegion |
object |
get; set; | Context object for search region (purpose unclear from source) |
Delegates
Namespace: DTS.Common.Interface.StatusAndProgressBar
| Delegate | Signature | Description |
|---|---|---|
SetProgressValueDelegate |
void (double value) |
Callback for setting a progress bar value |
SetStatusTextDelegate |
void (string text) |
Callback for setting status text |
SetProgressVisibilityDelegate |
void (bool bVisible) |
Callback for toggling progress bar visibility |
SetStatusColorDelegate |
void (Color color) |
Callback for setting status color |
ActionCompleteDelegate |
void () |
Callback signaling action completion |
StatusIntDelegate |
void (int status) |
Callback for reporting integer status |
StatusExIntDelegate |
void (int status, params object[] extra) |
Callback for reporting integer status with additional parameters |
ErrorCallback |
DialogResult (string errorString, string unit) |
Callback for error handling that returns a dialog result |
3. Invariants
- All view interfaces (
IStatusAndProgressBarView,IStatusAndProgressFooterView) must inherit fromIBaseView. - All view model interfaces (
IStatusAndProgressBarFooterViewModel,IStatusAndProgressBarViewModel) must inherit fromIBaseViewModel. IStatusAndProgressBarFooterViewModel.Viewmust be assignable toIStatusAndProgressFooterView, not justIBaseView.- The
SetStatusColorDelegateusesSystem.Windows.Media.Color(WPF color type), notSystem.Drawing.Color. - The
ErrorCallbackdelegate returnsSystem.Windows.Forms.DialogResult, indicating Windows Forms interop.
4. Dependencies
This module depends on:
DTS.Common.Base- ProvidesIBaseViewandIBaseViewModelbase interfacesSystem.Windows.Forms- ProvidesDialogResultenum used inErrorCallbackSystem.Windows.Media- ProvidesColorstruct used inSetStatusColorDelegate
What depends on this module:
- Cannot be determined from source alone. Implementations of these interfaces would exist elsewhere in the codebase.
5. Gotchas
-
Mixed UI Framework References: The delegates reference both
System.Windows.Media.Color(WPF) andSystem.Windows.Forms.DialogResult(WinForms). This suggests either hybrid UI usage or legacy interop. Developers should be aware of the correctColortype when implementingSetStatusColorDelegate. -
Misleading XML Comment: The
Viewproperty inIStatusAndProgressBarViewModelhas an XML comment stating "Gets the Search View", which appears unrelated to the interface's purpose (status/progress bar). This may be a copy-paste error from another interface. -
Empty Marker Interfaces: Both
IStatusAndProgressBarViewandIStatusAndProgressFooterViewdefine no members beyond their base interface. Their purpose as separate types (rather than usingIBaseViewdirectly) is unclear from source alone—possibly for DI container registration or type discrimination. -
Vague
ContextSearchRegionProperty: The purpose and expected type ofContextSearchRegion(typed asobject) is not documented. Its relationship to "Search" in a progress bar context is unclear from source alone.