Files
DP44/docs/ai/Common/DTS.Common/Events.md
2026-04-17 14:55:32 -04:00

190 lines
7.9 KiB
Markdown

---
source_files:
- Common/DTS.Common/Events/LoadViewList.cs
- Common/DTS.Common/Events/LoadExportList.cs
- Common/DTS.Common/Events/ClearSelectedExportsEvent.cs
- Common/DTS.Common/Events/LoginUserEvent.cs
- Common/DTS.Common/Events/TextPastedEvent.cs
- Common/DTS.Common/Events/BusyIndicatorChangeNotification.cs
- Common/DTS.Common/Events/ComActiveEvent.cs
- Common/DTS.Common/Events/CloseApplicationRequested.cs
- Common/DTS.Common/Events/TabControlSelectionChanged.cs
- Common/DTS.Common/Events/RaiseNotification.cs
- Common/DTS.Common/Events/PageSetActiveEvent.cs
- Common/DTS.Common/Events/GroupTemplateChangeNotification.cs
- Common/DTS.Common/Events/DatabaseVersionChangedEvent.cs
- Common/DTS.Common/Events/SetSaveButton.cs
- Common/DTS.Common/Events/DBConnectionEvent.cs
- Common/DTS.Common/Events/AutomaticModeStatusEvent.cs
- Common/DTS.Common/Events/SetPageVisibilityEvent.cs
- Common/DTS.Common/Events/LogoutUserEvent.cs
- Common/DTS.Common/Events/TestEvent.cs
- Common/DTS.Common/Events/PageSelectionChanged.cs
- Common/DTS.Common/Events/PageNameEvent.cs
- Common/DTS.Common/Events/UserEvent.cs
- Common/DTS.Common/Events/ListViewStatusEvent.cs
- Common/DTS.Common/Events/HelpTextEvent.cs
- Common/DTS.Common/Events/PageModifiedEvent.cs
- Common/DTS.Common/Events/AssemblyListNotification.cs
- Common/DTS.Common/Events/FeedbackEvent.cs
- Common/DTS.Common/Events/CancelProcess.cs
- Common/DTS.Common/Events/TabControlSelectionEventArgs.cs
- Common/DTS.Common/Events/SLICE6MulticastPropertyEvent.cs
- Common/DTS.Common/Events/AppStatusEvent.cs
- Common/DTS.Common/Events/PageErrorEvent.cs
- Common/DTS.Common/Events/PageNavigationRequestEvent.cs
- Common/DTS.Common/Events/ProgressBarEvent.cs
- Common/DTS.Common/Events/NotificationContentEventArgs.cs
- Common/DTS.Common/Events/ShowStatus.cs
generated_at: "2026-04-17T15:25:56.885398+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "64c6547fc983e8c2"
---
# DTS.Common.Events Module Documentation
## 1. Purpose
This module defines the application-wide event system for the DTS application using the Prism Event Aggregator pattern. It provides a loosely-coupled pub/sub messaging infrastructure that enables communication between decoupled components. The module contains event definitions, their associated argument classes, and related enums for various cross-cutting concerns including UI state management, database connectivity, user authentication, navigation, process status, and hardware communication (SLICE6 devices).
---
## 2. Public Interface
### Event Classes (PubSubEvent<T> implementations)
| Event Class | Payload Type | Description |
|-------------|--------------|-------------|
| `LoadViewModulEvent` | `LoadViewModulArg` | Event for loading view modules |
| `LoadExportModuleEvent` | `LoadExportModuleArg` | Event for loading export modules |
| `ClearSelectedExportsEvent` | `ClearSelectedExportsArg` | Event to clear selected exports |
| `LoginUserEvent` | `LoginUserArg` | Event for user login notifications |
| `TextPastedEvent` | `ITextPastedEventArgs` | Event for text paste operations |
| `BusyIndicatorChangeNotification` | `bool` | Event to toggle busy indicator state |
| `CommActiveEvent` | `ComStatusArg` (enum) | Event for COM status changes |
| `CloseApplicationRequested` | `object` | Event to signal application close request |
| `TabControlSelectionChanged` | `TabControlSelectionEventArgs` | Event for tab control selection changes |
| `RaiseNotification` | `NotificationContentEventArgs` | Event to display notification dialogs |
| `PageSetActiveEvent` | `PageSetActiveEventArg` | Event signaling a page has been set active |
| `GroupTemplateChangeNotification` | `IBaseModel` | Event for group template selection changes |
| `DatabaseVersionChangedEvent` | `DatabaseVersionChangedEventArgs` | Event for database version changes |
| `SetSaveButton` | `SaveButtonUsability` | Event to enable/disable save button |
| `DBConnectionEvent` | `DBConnectionArg` | Event for database connection state changes |
| `AutomaticModeStatusEvent` | `AutomaticModeStatusEventArgs` | Event for automatic mode status changes |
| `SetPageHeaderVisibilityEvent` | `SetPageHeaderVisibilityEventArgs` | Event to control page header visibility |
| `LogoutUserEvent` | `LogoutUserArg` | Event for user logout notifications |
| `TestEvent` | `TestEventArg` | Event for test start/end notifications |
| `PageSelectionChanged` | `PageSelectionChangedArg` | Event for page selection changes |
| `PageNameEvent` | `PageNameEventArg` | Event for page name updates (uses `CompositePresentationEvent<T>`) |
| `UserEvent` | `UserEventArg` | Event for user-related notifications |
| `ListViewStatusEvent` | `ListViewStatusArg` | Event for list view status changes |
| `HelpTextEvent` | `HelpTextEventArg` | Event for tooltip/help text handling |
| `PageModifiedEvent` | `PageModifiedArg` | Event for page modification state changes |
| `AssemblyListNotification` | `AssemblyListInfo` | Event for assembly list notifications |
| `AssemblyListNotificationViewer` | `AssemblyListInfo` | Event for assembly list viewer notifications |
| `FeedbackEvent` | `FeedbackArg` | Event for feedback page updates |
| `CancelProcessEvent` | `CancelProcess` | Event to cancel running processes |
| `SLICE6MulticastPropertyEventChanged` | `SLICE6MulticastPropertyEventArgs` | Event for SLICE6 multicast property changes |
| `AppStatusEvent` | `AppStatusArg` (enum) | Event for application busy/available state |
| `AppStatusExEvent` | `AppStatusExArg` | Extended app status event with process name |
| `PageErrorEvent` | `PageErrorArg` | Event for surfacing page errors |
| `PageNavigationRequestEvent` | `PageNavigationRequest` | Event for page navigation requests |
| `ProgressBarEvent` | `ProgressBarEventArg` | Event for progress bar updates |
| `ShowStatus` | `StatusInfo` | Event for displaying process status |
### Argument Classes
#### `LoginUserArg`
```csharp
public string UserName { get; set; }
```
#### `ITextPastedEventArgs` (interface)
```csharp
string Text { get; }
object Sender { get; }
string Id { get; }
object Tag { get; }
```
#### `PageSetActiveEventArg`
```csharp
public IDataPROPage Page { get; set; }
```
#### `DatabaseVersionChangedEventArgs`
```csharp
public string Version { get; set; } = string.Empty;
```
#### `SaveButtonUsability`
```csharp
public bool IsUsable { get; set; }
```
#### `DBConnectionArg`
```csharp
public bool Connected { get; set; }
public string DBName { get; set; }
public string Server { get; set; }
```
#### `AutomaticModeStatusEventArgs`
```csharp
public bool TextSet { get; set; } = false;
public string Text { get; set; } = string.Empty;
```
#### `SetPageHeaderVisibilityEventArgs`
```csharp
public bool SetVisiblity { get; set; } = false;
public Visibility Visibility { get; set; }
```
#### `LogoutUserArg`
```csharp
public enum Reasons { DatabaseSwitch }
public Reasons Reason { get; }
// Constructor: LogoutUserArg(Reasons reason)
```
#### `TestEventArg`
```csharp
public TestEventStatus Status { get; private set; }
// Constructor: TestEventArg(TestEventStatus status)
```
#### `PageSelectionChangedArg`
```csharp
public object Page { get; }
public int Count { get; }
// Constructor: PageSelectionChangedArg(int count, object page)
```
#### `PageNameEventArg`
```csharp
public string Name { get; private set; }
public object Page { get; private set; }
// Constructor: PageNameEventArg(object page, string name)
```
#### `UserEventArg`
```csharp
public enum Events { ViewingUserChanged }
public Events EventType { get; private set; }
public object Argument { get; private set; }
// Constructor: UserEventArg(Events eventType, object argument)
```
#### `ListViewStatusArg`
```csharp
public enum ListViewStatus { Unloaded, ScrollToBottom }
public ListViewStatus Status { get; }
public string Id { get; }
// Constructor: ListViewStatusArg(ListViewStatus status, string id)
```
#### `HelpTextEventArg`
```csharp
public object Sender { get; set