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,57 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Classes/VirtualToggleButton.cs
generated_at: "2026-04-17T15:59:03.091690+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b9f03ca53fe295ee"
---
# VirtualToggleButton Documentation
## 1. Purpose
`VirtualToggleButton` is a static utility class that provides attached dependency properties to imbue any WPF element with toggle button behavior. It allows arbitrary `DependencyObject` instances (specifically those implementing `IInputElement`) to respond to mouse and keyboard input as if they were `ToggleButton` controls, raising the standard `Checked`, `Unchecked`, and `Indeterminate` routed events. This enables toggle-style interactions on elements that cannot inherit from `ToggleButton` directly, such as `TreeViewItem` or custom controls in the `DTS.Viewer.GraphList` module.
---
## 2. Public Interface
### Attached Properties
#### `IsLockedProperty`
```csharp
public static readonly DependencyProperty IsLockedProperty
```
- **Type:** `Nullable<bool>`
- **Default Value:** `false`
- **Metadata Flags:** `BindsTwoWayByDefault | Journal`
- **Description:** Represents the toggle state of the virtual button. When set to `true`, raises `ToggleButton.CheckedEvent`; when `false`, raises `ToggleButton.UncheckedEvent`; when `null`, raises `ToggleButton.IndeterminateEvent`.
#### `IsThreeStateProperty`
```csharp
public static readonly DependencyProperty IsThreeStateProperty
```
- **Type:** `bool`
- **Default Value:** `false`
- **Description:** Determines whether the control supports three states. When `true`, `IsLocked` can cycle through `null` as a third state.
#### `IsVirtualToggleButtonProperty`
```csharp
public static readonly DependencyProperty IsVirtualToggleButtonProperty
```
- **Type:** `bool`
- **Default Value:** `false`
- **Description:** When set to `true` on an element implementing `IInputElement`, attaches mouse and keyboard handlers to enable toggle button behavior.
### Getter/Setter Methods
```csharp
public static Nullable<bool> GetIsLocked(DependencyObject d)
public static void SetIsLocked(DependencyObject d, Nullable<bool> value)
public static bool GetIsThreeState(DependencyObject d)
public static void SetIsThreeState(DependencyObject d, bool value)
public static bool GetIsVirtualToggleButton(DependencyObject d)
public static void SetIsVirtualToggleButton(DependencyObject

View File

@@ -0,0 +1,150 @@
---
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

View File

@@ -0,0 +1,35 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:13:20.044128+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e5fafc2a04e682f0"
---
# Properties
### Purpose
Standard .NET assembly metadata configuration for the DTS.Viewer.TestModification module. This file exists to define the assembly's identity, version information, and COM visibility settings using .NET assembly attributes. It plays no runtime role beyond providing metadata to the CLR and tooling.
### Public Interface
No public types or functions are defined. This module consists entirely of assembly-level attributes:
- `AssemblyTitle("DTS.Viewer.TestModification")` - Sets the assembly title
- `AssemblyDescription("")` - Empty description
- `AssemblyVersion("1.0.0.0")` - Sets the assembly version
- `AssemblyFileVersion("1.0.0.0")` - Sets the file version
- `ComVisible(false)` - Disables COM visibility for types in this assembly
- `Guid("5ee7c61f-e9fe-479b-be1f-78a142341c3b")` - COM type library identifier
### Invariants
- AssemblyVersion and AssemblyFileVersion must both be "1.0.0.0"
- ComVisible is always false
- The GUID "5ee7c61f-e9fe-479b-be1f-78a142341c3b" uniquely identifies this assembly for COM interop scenarios
### Dependencies
**Imports:**
- `System.Reflection`
- `System.Runtime.CompilerServices`
- `System.Runtime.InteropServices`
**Depended on by:** Unclear from source alone - this is a leaf

View File

@@ -0,0 +1,40 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/View/ExportGraphMainView.xaml.cs
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/View/GraphMainView.xaml.cs
generated_at: "2026-04-17T16:11:57.316727+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cfdd9801dd7a1dcf"
---
# View
### Purpose
This module provides WPF view components for graph list functionality, specifically for displaying and exporting graphs. Both views implement a pattern of suppressing the `ApplicationCommands.Undo` command by adding a `CommandBinding` that marks the command as handled. This prevents undo operations from propagating in these views.
### Public Interface
**ExportGraphMainView** (implements `IExportGraphMainView`)
- `ExportGraphMainView()` - Constructor that calls `InitializeComponent()` and adds a `CommandBinding` for `ApplicationCommands.Undo`. Both the `Execute` and `CanExecute` handlers set `e.Handled = true` with no other action.
**GraphMainView** (implements `IGraphMainView`)
- `GraphMainView()` - Constructor that calls `InitializeComponent()` and adds a `CommandBinding` for `ApplicationCommands.Undo`. Both the `Execute` and `CanExecute` handlers set `e.Handled = true`. Contains commented-out code for focusing `TvTestChannels` and checking `root.IsChecked`.
### Invariants
- Both views unconditionally suppress `ApplicationCommands.Undo` by handling it without action.
- The `CanExecute` handler does not set `e.CanExecute`, only `e.Handled`.
### Dependencies
**Depends on:**
- `DTS.Common.Interface` (`IExportGraphMainView`, `IGraphMainView`)
- `System.Windows.Input` (`CommandBinding`, `ApplicationCommands`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- **Undo suppression pattern:** Both views suppress undo without any conditional logic. This may interfere with expected user behavior if undo is needed elsewhere in the application.
- **Commented-out code in GraphMainView:** References to `root.IsChecked` and `TvTestChannels.Focus()` suggest incomplete or removed functionality.
- **Namespace suppression:** ReSharper disable comments indicate potential namespace convention violations.
---

View File

@@ -0,0 +1,44 @@
---
source_files:
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/ViewModel/GraphMainViewModel.cs
generated_at: "2026-04-17T15:56:47.220918+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2bd73de841af2654"
---
# Documentation: GraphMainViewModel
## 1. Purpose
The `GraphMainViewModel` class serves as the presentation logic controller for the Graph List module within the DTS Viewer application. Its primary responsibility is to manage the display, filtering, selection, and locking of test channels (including graph channels, calculated channels, and raw test channels) derived from `ITestSummary` objects. It acts as a bridge between the data layer (test summaries) and the UI layer (tree views, lists), coordinating user interactions via Prism's `IEventAggregator` to publish channel selections and notify other modules of state changes.
## 2. Public Interface
### Properties
* **`IFilterView FilterView`**: Gets the filter view instance associated with this model.
* **`IGraphMainView View`**: Gets or sets the associated view interface.
* **`IBaseViewModel Parent`**: Gets or sets the parent ViewModel (checked specifically for `IPSDReportMainViewModel` during initialization).
* **`InteractionRequest<Notification> NotificationRequest`**: Gets the interaction request for displaying notifications.
* **`InteractionRequest<Confirmation> ConfirmationRequest`**: Gets the interaction request for displaying confirmations.
* **`bool IsFilterEnabled`**: Gets or sets a value indicating whether the filter UI is enabled (true when `ChannelList` has items).
* **`string SelectedGroupName`**: Gets or sets the name of the currently selected group.
* **`string LockedGroupName`**: Gets or sets the name of the currently locked group.
* **`List<ITestChannel> LockedChannelList`**: Gets or sets the list of channels currently locked by the user.
* **`List<ITestChannel> SelectedChannelList`**: Gets or sets the list of channels currently selected by the user.
* **`ObservableCollection<ITestChannel> ChannelList`**: Gets or sets the full list of available channels.
* **`ObservableCollection<ITestChannel> FilteredChannelList`**: Gets or sets the list of channels displayed after filtering.
* **`ObservableCollection<TreeViewChannels> TestChannelsTree`**: Gets or sets the hierarchical tree structure of channels displayed in the UI.
* **`object ContextGraphMainRegion`**: Gets or sets the data context for the `GraphMainRegion` within the view.
* **`string HeaderInfo`**: Returns the constant string "GraphRegion".
* **`bool TestModified`**: Gets or sets a flag indicating if the test has been modified.
### Methods
* **`void Initialize()`**: Overrides base method. Empty implementation.
* **`void Initialize(object parameter)`**: Initializes the ViewModel, sets the parent, determines if locked-only mode is required, initializes the filter view, and subscribes to events.
* **`void PublishSelectedChannels()`**: Publishes the current lists of locked and selected channels via `GraphSelectedChannelsNotification` and `GraphSelectedChannelCountNotification`.
* **`void OnFilterChanged(FilterParameterArgs args)`**: Filters the `ChannelList` based on the string parameter provided in `args`, updating `FilteredChannelList`.
* **`void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)`**: Adds or removes a group of channels to/from the `LockedChannelList`.
* **`void AddLockedChannel(ITestChannel channel, bool isLocked)`**: Adds or removes a single channel to/from the `LockedChannelList`.
* **`void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)`**: Selects a specific group of channels, resetting previous selections.
* **`void AddSelectedGroup(TestGroup group)`**: Marks a specific `TestGroup` as selected.
* **`void AddSelectedChannel(ITestChannel channel, bool reset)`**: