--- source_files: - Common/DTS.CommonCore/Events/LoginUserEvent.cs - Common/DTS.CommonCore/Events/TextPastedEvent.cs - Common/DTS.CommonCore/Events/BusyIndicatorChangeNotification.cs - Common/DTS.CommonCore/Events/ComActiveEvent.cs - Common/DTS.CommonCore/Events/CloseApplicationRequested.cs - Common/DTS.CommonCore/Events/TabControlSelectionChanged.cs - Common/DTS.CommonCore/Events/RaiseNotification.cs - Common/DTS.CommonCore/Events/PageSetActiveEvent.cs - Common/DTS.CommonCore/Events/GroupTemplateChangeNotification.cs - Common/DTS.CommonCore/Events/DatabaseVersionChangedEvent.cs - Common/DTS.CommonCore/Events/SetSaveButton.cs - Common/DTS.CommonCore/Events/DBConnectionEvent.cs - Common/DTS.CommonCore/Events/AutomaticModeStatusEvent.cs - Common/DTS.CommonCore/Events/SetPageVisibilityEvent.cs - Common/DTS.CommonCore/Events/LogoutUserEvent.cs - Common/DTS.CommonCore/Events/PageNameEvent.cs - Common/DTS.CommonCore/Events/TestEvent.cs - Common/DTS.CommonCore/Events/PageSelectionChanged.cs - Common/DTS.CommonCore/Events/UserEvent.cs - Common/DTS.CommonCore/Events/ListViewStatusEvent.cs - Common/DTS.CommonCore/Events/HelpTextEvent.cs - Common/DTS.CommonCore/Events/PageModifiedEvent.cs - Common/DTS.CommonCore/Events/FeedbackEvent.cs - Common/DTS.CommonCore/Events/AssemblyListNotification.cs - Common/DTS.CommonCore/Events/CancelProcess.cs - Common/DTS.CommonCore/Events/TabControlSelectionEventArgs.cs - Common/DTS.CommonCore/Events/SLICE6MulticastPropertyEvent.cs - Common/DTS.CommonCore/Events/AppStatusEvent.cs - Common/DTS.CommonCore/Events/PageErrorEvent.cs - Common/DTS.CommonCore/Events/PageNavigationRequestEvent.cs - Common/DTS.CommonCore/Events/ProgressBarEvent.cs - Common/DTS.CommonCore/Events/NotificationContentEventArgs.cs - Common/DTS.CommonCore/Events/ShowStatus.cs generated_at: "2026-04-16T12:07:09.645358+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "9cee3f5e2ea58fa5" --- # Documentation: DTS.Common.Events ## 1. Purpose This module defines the application-wide event aggregation contract for the DTS system using the Microsoft Prism Library (`Microsoft.Practices.Prism.Events`). It provides a centralized catalog of event types (`CompositePresentationEvent`) and their associated payload classes (EventArgs) to facilitate loosely-coupled communication between components. The events cover a broad range of concerns including user authentication, database connectivity, UI state management (busy indicators, tabs, notifications), hardware communication (COM status, SLICE6), and page lifecycle management. ## 2. Public Interface ### Event Classes All event classes inherit from `CompositePresentationEvent` and are designed to be used with an `IEventAggregator`. | Event Class | Payload Type | Description | | :--- | :--- | :--- | | **`AppStatusEvent`** | `AppStatusArg` (enum) | Notifies the application to mark itself as busy, available, or handle shutdown/close/logout states. | | **`AppStatusExEvent`** | `AppStatusExArg` | Extended app status notification including the name of the process notifying the status. | | **`AssemblyListNotification`** | `AssemblyListInfo` | Used to display notification content regarding assembly lists. | | **`AssemblyListNotificationViewer`** | `AssemblyListInfo` | Viewer-specific event for assembly list notifications. | | **`AutomaticModeStatusEvent`** | `AutomaticModeStatusEventArgs` | Informs the app that Automatic Mode status has changed. | | **`BusyIndicatorChangeNotification`** | `bool` | Notifies changes to the busy indicator state. | | **`CancelProcessEvent`** | `CancelProcess` | Used by services to display status or cancel the current process. | | **`CloseApplicationRequested`** | `object` | Notifies subscribers that the application is requested to be closed. | | **`CommActiveEvent`** | `ComStatusArg` (enum) | Informs the app that COM status has changed (CommandStart/ResponseStart). | | **`DatabaseVersionChangedEvent`** | `DatabaseVersionChangedEventArgs` | Informs the app that the database version has changed. | | **`DBConnectionEvent`** | `DBConnectionArg` | Informs the app about database connection status (Connected/DBName/Server). | | **`FeedbackEvent`** | `FeedbackArg` | Informs the feedback page to update with severity and message. | | **`GroupTemplateChangeNotification`** | `IBaseModel` | Notifies that the selected Group Template has changed. | | **`HelpTextEvent`** | `HelpTextEventArg` | Handles tooltip events for help text. | | **`ListViewStatusEvent`** | `ListViewStatusArg` | Notifies ListView status changes (Unloaded/ScrollToBottom). | | **`LoginUserEvent`** | `LoginUserArg` | Event related to user login. | | **`LogoutUserEvent`** | `LogoutUserArg` | Event related to user logout, includes reason (e.g., DatabaseSwitch). | | **`PageErrorEvent`** | `PageErrorArg` | Surfaces page errors to the application. | | **`PageModifiedEvent`** | `PageModifiedArg` | Notifies that a page has been modified, cleared, or saved. | | **`PageNameEvent`** | `PageNameEventArg` | Informs the app that a page name has been updated. | | **`PageNavigationRequestEvent`** | `PageNavigationRequest` | Requests navigation to a specific destination (Sensor/TestSetups). | | **`PageSelectionChanged`** | `PageSelectionChangedArg` | Notifies that page selection has changed. | | **`PageSetActiveEvent`** | `PageSetActiveEventArg` | Informs that a page has been set active. | | **`ProgressBarEvent`** | `ProgressBarEventArg` | Notification event for progress bars (color, percentage, text, visibility). | | **`RaiseNotification`** | `NotificationContentEventArgs` | Displays notification content (message, details, icon, title). | | **`SetPageHeaderVisibilityEvent`** | `SetPageHeaderVisibilityEventArgs` | Sets the visibility of the page header. | | **`SetSaveButton`** | `SaveButtonUsability` | Enables or disables the Save button. | | **`ShowStatus`** | `StatusInfo` | Used by services to display current process status (Idle/Busy/Done). | | **`SLICE6MulticastPropertyEventChanged`** | `SLICE6MulticastPropertyEventArgs` | Notifies changes to SLICE6 multicast properties. | | **`TabControlSelectionChanged`** | `TabControlSelectionEventArgs` | Indicates that a TabControl's tab has been changed (Added/Removed). | | **`TestEvent`** | `TestEventArg` | Informs the app that a test status has changed (Started/Ended). | | **`TextPastedEvent`** | `ITextPastedEventArgs` | Handles text paste operations. | | **`UserEvent`** | `UserEventArg` | Notifies user-related events (e.g., ViewingUserChanged). | ### Key Payload Classes & Arguments * **`AppStatusArg` (enum)**: `Busy`, `Available`, `Shutdown`, `Close`, `UserLogout`. * **`AppStatusExArg`**: * `Status` (`AppStatusArg`): The status being notified. * `Name` (`string`): Name of the process notifying. * **`AutomaticModeStatusEventArgs`**: * `TextSet` (`bool`): Default `false`. * `Text` (`string`): Default `string.Empty`. * **`CancelProcess`**: * `IsBusy` (`bool`): Indicates if the process is busy. * `ProcessId` (`int`): ID of the process. * **`ComStatusArg` (enum)**: `CommandStart`, `ResponseStart`. * **`DatabaseVersionChangedEventArgs`**: * `Version` (`string`): The new version string. * **`DBConnectionArg`**: * `Connected` (`bool`). * `DBName` (`string`). * `Server` (`string`). * **`FeedbackArg`**: * `Severity` (`Severity` enum): `Information`, `Warning`, `Error`, `ResponseStarting`, `CommandStarting`. * `Message` (`string`). * **`ListViewStatusArg`**: * `Status` (`ListViewStatus` enum): `Unloaded`, `ScrollToBottom`. * `Id` (`string`). * **`LogoutUserArg`**: * `Reason` (`Reasons` enum): Currently only supports `DatabaseSwitch`. * **`NotificationContentEventArgs`**: * `Message` (`string`). * `MessageDetails` (`string`). * `Image` (`PopupWindowImage` enum): Default is `Error`. * `Title` (`string`). * **`PageErrorArg`**: * `Errors` (`string[]`). * `Page` (`object`). * `Handled` (`bool`). * **`PageModifiedArg`**: * `PageStatus` (`Status` enum): `Clear`, `Modified`, `Saved`. * `Page` (`object`). * `Handled` (`bool`). * **`PageNavigationRequest`**: * `Destination` (`Destinations` enum): `Sensor`, `TestSetups`. * `DestinationArg` (`object`). * `Caller` (`object`). * **`ProgressBarEventArg`**: * `ProgressBarName` (`string`): Default constructor sets to "Footer". * `ProgressBarColor` (`Color`). * `ProgressBarPercentage` (`double`). * `ProgressBarText` (`string`). * `ProgressBarVisibility` (`Visibility`). * Boolean flags: `SetPercentage`, `SetText`, `SetVisibility`. * **`StatusInfo`**: * `CurrentState` (`StatusState` enum): `Idle`, `Busy`, `DoneNoError`, `DoneFailed`. * `IsBusy` (`bool`): Calculated property (true if `Busy`). * `IsOk` (`bool`). * `Percentage` (`decimal`). * `Text` (`string`). * `ProcessId` (`int`). * Method: `Unsubscribe(ShowStatus showStatus)` (Resets Text and State). * **`TabControlSelectionEventArgs`**: * `Operation` (`TabControlOperation`). * `Item` (`object`). ### Special Methods * **`PageErrorEvent.SurfaceApplicationError(string msg)`** * A `static` helper method that resolves `IEventAg