36 lines
1.8 KiB
Markdown
36 lines
1.8 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/ViewModel/GraphViewModel.cs
|
||
|
|
generated_at: "2026-04-17T15:54:22.914651+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "469500f219f64049"
|
||
|
|
---
|
||
|
|
|
||
|
|
# GraphViewModel Documentation
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
`GraphViewModel` is a Prism-based MVVM ViewModel that manages graph visualization within the DTS Viewer application. It serves as a coordinator between parent views (`IViewerMainViewModel` or `IPSDReportMainViewModel`), child views (`ITestDataSeriesView`), and the event aggregation system. The class handles channel selection state, displays progress indicators during data loading operations, and manages UI visibility states for messaging and graph display regions.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### Constructor
|
||
|
|
```csharp
|
||
|
|
public GraphViewModel(IGraphView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||
|
|
```
|
||
|
|
Initializes the ViewModel, sets the View's DataContext to itself, and creates `NotificationRequest` and `ConfirmationRequest` instances.
|
||
|
|
|
||
|
|
### Properties
|
||
|
|
|
||
|
|
| Property | Type | Access | Description |
|
||
|
|
|----------|------|--------|-------------|
|
||
|
|
| `View` | `IGraphView` | get; private set; | The associated graph view interface. |
|
||
|
|
| `Parent` | `IBaseViewModel` | internal get; set; | Reference to the parent ViewModel. |
|
||
|
|
| `DataSeriesView` | `ITestDataSeriesView` | get; set; | The data series view associated with this graph. |
|
||
|
|
| `NotificationRequest` | `InteractionRequest<Notification>` | get; private set; | Used to raise notification dialogs. |
|
||
|
|
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | get; private set; | Used to raise confirmation dialogs. |
|
||
|
|
| `ContextGraphRegion` | `object` | get; set; | Wraps `((GraphView)View).GraphRegion.Content` with property change notification. |
|
||
|
|
|
|