This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---
source_files:
- DataPRO/Modules/StatusAndProgressBar/Properties/AssemblyInfo.cs
generated_at: "2026-04-16T04:48:54.414504+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "7f044aeb1a0218ee"
---
# Properties
## 1. Purpose
This module is an assembly named **StatusAndProgressBar**, part of the `DataPRO` codebase, intended to provide UI components related to status reporting and progress indication (e.g., status labels, progress bars). Based solely on the assembly metadata, its purpose is to encapsulate functionality for displaying progress and status information—likely for long-running operations in a desktop or UI-based application—but the actual implementation details (e.g., types, logic) are not present in this file and must reside in other source files within the same module.
## 2. Public Interface
**No public interface elements (classes, methods, properties, etc.) are defined in this file.**
`AssemblyInfo.cs` is a metadata file used by the .NET build system to embed assembly-level attributes (e.g., version, title, GUID). It contains no executable code or declarations beyond assembly attributes.
## 3. Invariants
- The assembly identity is fixed at build time:
- `AssemblyTitle` = `"StatusAndProgressBar"`
- `AssemblyVersion` = `"1.0.0.0"`
- `AssemblyFileVersion` = `"1.0.0.0"`
- `ComVisible` = `false`
- `Guid` = `"1f817d85-4ec6-4300-ab35-085765b97a9a"`
- These attributes are immutable at runtime and cannot be altered without recompilation.
## 4. Dependencies
- **Dependencies**: None declared in this file. As a standard .NET assembly info file, it only references core runtime attributes (`System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices`).
- **Dependents**: This file is part of the `StatusAndProgressBar` assembly, which is presumably referenced by other modules in the `DataPRO` solution (e.g., UI or core logic modules that consume status/progress components). However, no such references are visible here.
## 5. Gotchas
- **Misleading file scope**: Developers may assume this file contains implementation logic; it does not. Actual UI components (e.g., `StatusControl`, `ProgressBarViewModel`) must be in other files (e.g., `.cs` files in the same module).
- **Versioning**: The `AssemblyVersion` is hardcoded to `1.0.0.0` with no wildcard (`*`), meaning build/revision numbers are static unless manually updated.
- **COM visibility**: `ComVisible(false)` means this assembly is not intended for COM interop; attempting to expose types from this assembly via COM will require explicit `[ComVisible(true)]` on individual types (not the assembly).
- **No functional behavior**: This file contributes zero runtime behavior—any bugs or quirks related to status/progress UI are absent here and must be investigated in other source files.
*None identified beyond the above.*

View File

@@ -0,0 +1,46 @@
---
source_files:
- DataPRO/Modules/StatusAndProgressBar/View/StatusAndProgressBarView.xaml.cs
- DataPRO/Modules/StatusAndProgressBar/View/StatusAndProgressFooterView.xaml.cs
generated_at: "2026-04-16T04:49:04.416197+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "496def208a5ef038"
---
# View
## Documentation: StatusAndProgressBar Module (View Layer)
### 1. Purpose
This module provides the WPF view layer for displaying status text and progress indicators in the applications UI. It consists of two distinct view classes—`StatusAndProgressBarView` and `StatusAndProgressFooterView`—which are XAML-backed UI components intended to render status and progress information, likely in a main window and a footer area respectively. These views implement interfaces from `DTS.Common.Interface` to decouple presentation from logic, enabling testability and modularity within the applications architecture.
### 2. Public Interface
Both classes are partial classes with only a parameterless constructor defined in the source. No additional public methods, properties, or events are declared in the provided code.
- **`StatusAndProgressBarView()`**
Constructor. Calls `InitializeComponent()` to load and initialize the associated XAML (`StatusAndProgressBarView.xaml`). Implements `IStatusAndProgressBarView`.
- **`StatusAndProgressFooterView()`**
Constructor. Calls `InitializeComponent()` to load and initialize the associated XAML (`StatusAndProgressFooterView.xaml`). Implements `IStatusAndProgressFooterView`.
> ⚠️ **Note**: The actual UI behavior and data-binding surface (e.g., `Text`, `Value`, `Maximum` properties) are defined in the corresponding `.xaml` files and/or their code-behind logic *not included* in the provided source. The interfaces `IStatusAndProgressBarView` and `IStatusAndProgressFooterView` (from `DTS.Common.Interface`) define the expected contract, but their members are not visible here.
### 3. Invariants
- Both views must be instantiated on the UI thread (standard WPF requirement), as `InitializeComponent()` interacts with the dispatcher-bound UI tree.
- Each view instance must be fully constructed (i.e., constructor completed) before being added to the visual tree; otherwise, XAML binding may fail.
- The views rely on correct XAML structure and resource definitions (e.g., styles, templates) present in their respective `.xaml` files—absent here—so runtime behavior is contingent on those.
### 4. Dependencies
- **External**:
- `DTS.Common.Interface` assembly (contains `IStatusAndProgressBarView`, `IStatusAndProgressFooterView` interfaces).
- **Internal (inferred)**:
- `StatusAndProgressBarView.xaml` and `StatusAndProgressFooterView.xaml` (XAML files defining UI layout and bindings).
- Likely consumed by a view model or presenter in the `DTS.StatusAndProgressBar` module (or elsewhere) that implements the `IStatusAndProgressBarView`/`IStatusAndProgressFooterView` interfaces via dependency injection or direct instantiation.
- **No other dependencies** are visible in the provided code.
### 5. Gotchas
- **No logic in code-behind**: The constructors contain only `InitializeComponent()`. Any state management, progress updates, or status text changes must be handled via data binding to a view model or through interface methods defined in `IStatusAndProgressBarView`/`IStatusAndProgressFooterView`.
- **Namespace quirk**: `// ReSharper disable CheckNamespace` suggests the namespace is intentionally `DTS.StatusAndProgressBar` (not nested under `DTS.StatusAndProgressBar.View`), possibly for compatibility with older naming conventions or XAML xmlns mappings.
- **Interface contract unknown**: Without access to `IStatusAndProgressBarView` and `IStatusAndProgressFooterView`, it is impossible to determine expected properties/methods (e.g., `SetStatus(string)`, `UpdateProgress(double)`). Developers must consult the interface definitions in `DTS.Common.Interface`.
- **No error handling visible**: If `InitializeComponent()` fails (e.g., due to missing XAML or resource resolution), exceptions will propagate—no try/catch is present.

View File

@@ -0,0 +1,106 @@
---
source_files:
- DataPRO/Modules/StatusAndProgressBar/ViewModel/StatusAndProgressFooterViewModel.cs
- DataPRO/Modules/StatusAndProgressBar/ViewModel/StatusAndProgressBarViewModel.cs
generated_at: "2026-04-16T04:48:57.785641+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "8cccc53a0c9317e7"
---
# ViewModel
## Documentation: StatusAndProgressBar Module ViewModels
---
### 1. Purpose
This module provides shared UI state management for progress tracking and status reporting across the application. It exposes two distinct view models—`StatusAndProgressBarViewModel` (for main/status-bar contexts) and `StatusAndProgressFooterViewModel` (for footer-level progress)—that listen to `ProgressBarEvent` and `StatusAndProgressBarEvent` events respectively, and update corresponding UI properties (`ProgressText`, `ProgressBarValue`, `ProgressBarVisibility`, etc.). The module decouples progress producers from consumers via Prisms `IEventAggregator`, enabling modular, event-driven progress updates without tight coupling.
---
### 2. Public Interface
#### `StatusAndProgressFooterViewModel`
- **`StatusAndProgressFooterViewModel(IStatusAndProgressFooterView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`**
Constructor. Initializes view binding, sets up `NotificationRequest` and `ConfirmationRequest` interaction triggers, and subscribes to `ProgressBarEvent` with handler `OnStatusAndProgressBarEvent`.
- **`Visibility ProgressBarVisiblity { get; set; }`**
Binds to the visibility of the progress bar in the footer view. *Note: Property name contains a typo (`Visiblity` instead of `Visibility`).*
- **`int ProgressBarValue { get; set; }`**
Current progress percentage (0100).
- **`string ProgressText { get; set; }`**
Human-readable status text (e.g., `"Saving changes..."`).
#### `StatusAndProgressBarViewModel`
- **`StatusAndProgressBarViewModel(IStatusAndProgressBarView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`**
Constructor. Binds view to view model, subscribes to `StatusAndProgressBarEvent` (with `ThreadOption.PublisherThread`), and initializes `_searchButtonVisability = false`.
- **`override void Initialize(object parameter)`**
Overrides base initialization. Stores `parameter` as `Parent` and subscribes to `ProgressBarEvent` (with `ThreadOption.UIThread`).
- **`string AggregateStatusText { get; set; }`**
Combined status text (e.g., `"Processing"`, or `"Processing - Error occurred"` if `ErrorText` is present).
- **`Color AggregateStatusColor { get; set; }`**
Status color (e.g., `Colors.AliceBlue` by default).
- **`Visibility ProgressBarVisibility { get; set; }`**
Visibility of the main progress bar.
- **`int ProgressBarValue { get; set; }`**
Current progress percentage (0100).
- **`bool SearchButtonVisability { get; set; }`**
Controls visibility of a search button (note: typo in property name; *should be `SearchButtonVisibility`*).
- **`Visibility AlertVisibility { get; set; }`**
Controls visibility of an alert indicator (default `Visibility.Hidden`).
---
### 3. Invariants
- **Event Filtering by Name/Requester**:
- `StatusAndProgressFooterViewModel.OnStatusAndProgressBarEvent` only processes events where `args.ProgressBarName == "Footer"`.
- `StatusAndProgressBarViewModel.OnUpdate` only processes events where `args.Requester == Parent`.
- **Progress Value Range**:
`ProgressBarValue` is set via `Convert.ToInt32(args.ProgressBarPercentage)`, implying values are expected to be numeric (though no explicit validation is present).
- **Thread Safety**:
- `StatusAndProgressBarViewModel` subscribes to `StatusAndProgressBarEvent` on `PublisherThread`, but `ProgressBarEvent` in `Initialize(object)` on `UIThread`.
- `StatusAndProgressFooterViewModel` subscribes to `ProgressBarEvent` without specifying `ThreadOption` (defaults to `UIThread` per Prism).
- **Property Change Notifications**:
Properties use `OnPropertyChanged` (or `SetProperty` for `StatusAndProgressBarViewModel`), but only for explicitly named properties—no automatic `INotifyPropertyChanged` implementation beyond overrides.
---
### 4. Dependencies
#### Imports/References
- **Prism Libraries**: `Prism.Events.IEventAggregator`, `Prism.Regions.IRegionManager`, `Prism.Interactivity.InteractionRequest`.
- **Unity Container**: `Unity.IUnityContainer` for DI.
- **Common Infrastructure**:
- `DTS.Common.Base.BaseViewModel<T>` (base class).
- `DTS.Common.Events.ProgressBarEvent`, `ProgressBarEventArg`.
- `DTS.Common.Events.StatusAndProgressBarEvent`, `StatusAndProgressBarEventArgs`.
- `DTS.Common.Interface.IStatusAndProgressBarFooterView`, `IStatusAndProgressBarView`, `IBaseView`, `IBaseViewModel`.
#### Consumed By
- View layers (`IStatusAndProgressBarFooterView`, `IStatusAndProgressBarView`) bind to these view models.
- Other modules publish `ProgressBarEvent` (e.g., long-running operations) and `StatusAndProgressBarEvent` (e.g., context-aware status updates).
---
### 5. Gotchas
- **Typo in Property Names**:
- `ProgressBarVisiblity` (missing 'i' in `Visibility`) in `StatusAndProgressFooterViewModel`.
- `SearchButtonVisability` (same typo) in `StatusAndProgressBarViewModel`.
*Risk: Binding failures if XAML uses correct spelling.*
- **Event Subscription Overlap**:
`StatusAndProgressBarViewModel` subscribes to *two* events:
- `StatusAndProgressBarEvent` in constructor (for general status updates).
- `ProgressBarEvent` in `Initialize(object)` (for named progress bars).
This may cause redundant updates if both events are published for the same operation.
- **No Cleanup of Event Subscriptions**:
Neither view model unsubscribes from events in `Cleanup()` or `Dispose`, risking memory leaks if instances outlive their lifecycle.
- **Assumed Event Payload Structure**:
`ProgressBarEventArg` is assumed to have properties like `ProgressBarName`, `SetPercentage`, `ProgressBarPercentage`, etc., but their exact contract is not defined here.
- **Color Handling**:
`AggregateStatusColor` is set directly from `args.ProgressBarColor` without validation—invalid `Color` values may cause rendering issues.
- **Missing `IsDirty` Implementation**:
`IsDirty` is declared as a read-only property (`public new bool IsDirty { get; }`) but has no setter or backing field—its value is always `false`.
*None identified beyond these.*