150 lines
6.4 KiB
Markdown
150 lines
6.4 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/GraphPropertyObject.cs
|
||
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/GraphObject.cs
|
||
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/TreeViewChannels.cs
|
||
|
|
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Model/TreeViewIds.cs
|
||
|
|
generated_at: "2026-04-17T15:53:21.576946+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "7c210f8c04fa36d1"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: DTS.Viewer.GraphList Models
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides the data model classes for the Graph List component of the DTS Viewer application. It defines hierarchical tree structures for displaying test channels and events in WPF TreeView controls, as well as graph property objects for integration with the Xceed WPF Toolkit PropertyGrid. The models implement `INotifyPropertyChanged` for data binding and coordinate selection/locking state with parent ViewModels through defined interfaces.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### GraphPropertyObject
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList.Model`
|
||
|
|
|
||
|
|
A POCO class decorated for use with Xceed WPF Toolkit PropertyGrid.
|
||
|
|
|
||
|
|
| Property | Type | Category | Access | Description |
|
||
|
|
|----------|------|----------|--------|-------------|
|
||
|
|
| `Id` | `int` | Information | Read-only | Graph identifier |
|
||
|
|
| `Name` | `string` | Information | Read-only | Graph name |
|
||
|
|
| `Description` | `string` | Information | Read-only | Graph description |
|
||
|
|
| `Filter` | `string` | Parameters | Read/Write | CFC filter value; uses `ItemsSource(typeof(CFCFilterItemSource))` |
|
||
|
|
| `DataFlag` | `string` | Parameters | Read/Write | Data flag identifier |
|
||
|
|
| `ShiftT0` | `double` | Parameters | Read/Write | Time zero shift in milliseconds |
|
||
|
|
| `EuMultiplier` | `double` | Parameters | Read/Write | Engineering units multiplier |
|
||
|
|
| `EuOffset` | `double` | Parameters | Read/Write | Engineering units offset |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### GraphObject
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList.Model`
|
||
|
|
|
||
|
|
Implements `IBaseClass`. Primary graph data container with synchronized property object.
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `RecordId` | `int` | Record identifier with change notification |
|
||
|
|
| `Id` | `int` | Graph ID; synchronizes to `Property.Id` on set |
|
||
|
|
| `Name` | `string` | Graph name; synchronizes to `Property.Name` on set |
|
||
|
|
| `Description` | `string` | Description; synchronizes to `Property.Description` on set |
|
||
|
|
| `Filter` | `CFCFilter` | Filter enum; synchronizes to `Property.Filter` as string |
|
||
|
|
| `DataFlag` | `string` | Data flag; synchronizes to `Property.DataFlag` |
|
||
|
|
| `ShiftT0` | `double` | T0 shift; synchronizes to `Property.ShiftT0` |
|
||
|
|
| `EuMultiplier` | `double` | EU multiplier; synchronizes to `Property.EuMultiplier` |
|
||
|
|
| `EuOffset` | `double` | EU offset; synchronizes to `Property.EuOffset` |
|
||
|
|
| `Data` | `List<double>` | Graph data points |
|
||
|
|
| `Visable` | `bool` | Visibility toggle (note: typo in property name) |
|
||
|
|
| `Property` | `GraphPropertyObject` | Nested property grid object |
|
||
|
|
|
||
|
|
**Events:**
|
||
|
|
- `PropertyChanged` - Standard `PropertyChangedEventHandler` event
|
||
|
|
|
||
|
|
**Methods:**
|
||
|
|
- `OnPropertyChanged(string propertyName)` - Raises `PropertyChanged` event
|
||
|
|
- `LoadGraphs()` (private) - Contains commented-out service controller code
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### TreeViewChannels
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList`
|
||
|
|
|
||
|
|
Implements `IBaseModel`. Root node for channel-based tree view binding.
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `Name` | `string` | Node name |
|
||
|
|
| `Groups` | `ObservableCollection<TestGroup>` | Child test groups; updates `GroupsCount` on set |
|
||
|
|
| `GroupsCount` | `int` | Count of groups |
|
||
|
|
| `Path` | `string` | File/system path |
|
||
|
|
| `IsSaved` | `bool` | Get-only property (always default) |
|
||
|
|
| `IsExpanded` | `bool` | TreeView expansion state |
|
||
|
|
| `IsSelected` | `bool` | TreeView selection state |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### TestGroup
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList`
|
||
|
|
|
||
|
|
Implements `INotifyPropertyChanged`. Child node representing a test group with channels.
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `Path` | `string` | File path |
|
||
|
|
| `DTSFile` | `string` | Associated DTS file |
|
||
|
|
| `Parent` | `IBaseViewModel` | Reference to parent ViewModel; cast to `IGraphMainViewModel` for locking |
|
||
|
|
| `IsLocked` | `bool` | Lock state; calls `Parent.AddLockedGroupChannels()` on change |
|
||
|
|
| `IsGraph` | `bool` | Graph display flag |
|
||
|
|
| `IsExpanded` | `bool` | Expansion state |
|
||
|
|
| `CanLock` | `bool` | Controls whether selection is permitted |
|
||
|
|
| `IsSelected` | `bool` | Selection state; calls `Parent.AddSelectedGroupChannels()` when selected |
|
||
|
|
| `TestName` | `string` | Parent test name |
|
||
|
|
| `Name` | `string` | Group name |
|
||
|
|
| `DisplayName` | `string` | Display name |
|
||
|
|
| `Channels` | `ObservableCollection<ITestChannel>` | Child channels; updates `ChannelCount` on set |
|
||
|
|
| `ChannelCount` | `int` | Count of channels |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### TreeViewIds
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList`
|
||
|
|
|
||
|
|
Implements `IBaseModel`. Root node for event/ID-based tree view binding.
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `Parent` | `IBaseViewModel` | Parent ViewModel; cast to `IExportGraphMainViewModel` |
|
||
|
|
| `Name` | `string` | Node name |
|
||
|
|
| `TreeIndex` | `int` | Index for selection range operations |
|
||
|
|
| `EventCount` | `int` | Count of events |
|
||
|
|
| `Events` | `ObservableCollection<ITestEvent>` | Child events; updates `EventCount` on set |
|
||
|
|
| `Path` | `string` | File path |
|
||
|
|
| `IsSaved` | `bool` | Get-only property |
|
||
|
|
| `IsExpanded` | `bool` | Expansion state |
|
||
|
|
| `IsSelected` | `bool` | Selection state with cascade to children via `SetChildNodes()` |
|
||
|
|
|
||
|
|
**Methods:**
|
||
|
|
- `SetChildNodes(bool isSelected)` - Sets `IsSelected` on all child `Events`
|
||
|
|
- `SetIsItemSelected(UIElement element, bool value)` - Static attached property setter
|
||
|
|
- `GetTreeViewItems(ItemsControl, bool, List<TreeViewItem>)` - Static recursive TreeView item collector
|
||
|
|
|
||
|
|
**Attached Properties:**
|
||
|
|
- `IsItemSelectedProperty` - `DependencyProperty` registered for `bool` type
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### TestEvent
|
||
|
|
**Namespace:** `DTS.Viewer.GraphList`
|
||
|
|
|
||
|
|
Implements `ITestEvent`. Child node representing a test event with complex multi-select logic.
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `Path` | `string` | File path |
|
||
|
|
| `Parent` | `IBaseViewModel` | Parent ViewModel; cast to `IExportGraphMainViewModel` |
|
||
|
|
| `IsLocked` | `bool` | Lock state; calls `Parent.AddLockedEvents()` on change |
|
||
|
|
| `IsGraph` | `bool` | Graph display flag |
|
||
|
|
| `IsExpanded` | `bool` | Expansion state |
|
||
|
|
| `CanLock` | `bool` | Lock permission flag |
|
||
|
|
| `IsSelected` | `bool
|