init
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/AddCalculatedChannelModule.cs
|
||||
generated_at: "2026-04-17T16:45:39.586862+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "bf1eaf68424d2d4f"
|
||||
---
|
||||
|
||||
# Documentation: AddCalculatedChannelModule
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module is a Prism-based plugin for the DTS Viewer application that provides functionality to add calculated channels. It follows the module pattern to register its View and ViewModel with the Unity dependency injection container, and exposes assembly metadata (name, image, group, region) via custom attributes for display in the main application's component list. The module is designed to be dynamically loaded and integrated into the larger DTS Viewer modular architecture.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `AddCalculatedChannelModule`
|
||||
|
||||
The main module class implementing `Prism.Modularity.IModule`.
|
||||
|
||||
**Constructor:**
|
||||
```csharp
|
||||
public AddCalculatedChannelModule(IUnityContainer unityContainer)
|
||||
```
|
||||
Accepts a Unity container instance via dependency injection and stores it in a private readonly field `_unityContainer`.
|
||||
|
||||
**Methods:**
|
||||
|
||||
```csharp
|
||||
public void Initialize()
|
||||
```
|
||||
Registers the View and ViewModel interfaces with their concrete implementations in the Unity container:
|
||||
- `IAddCalculatedChannelView` → `AddCalculatedChannelView`
|
||||
- `IAddCalculatedChannelViewModel` → `AddCalculatedChannelViewModel`
|
||||
|
||||
```csharp
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
```
|
||||
Empty implementation — no initialization logic executed when the module is loaded.
|
||||
|
||||
```csharp
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
```
|
||||
Calls `Initialize()` to perform type registrations.
|
||||
|
||||
---
|
||||
|
||||
### `AddCalculatedChannelModuleNameAttribute`
|
||||
|
||||
Assembly-level attribute extending `TextAttribute` that provides the module's display name.
|
||||
|
||||
**Constructor:**
|
||||
```csharp
|
||||
public AddCalculatedChannelModuleNameAttribute()
|
||||
public AddCalculatedChannelModuleNameAttribute(string s)
|
||||
```
|
||||
The string parameter `s` is accepted but not used.
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Model/CalculatedChannelCreator.cs
|
||||
generated_at: "2026-04-17T15:59:43.455218+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0bdba55cc7806845"
|
||||
---
|
||||
|
||||
# CalculatedChannelCreator Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
The `CalculatedChannelCreator` class is a factory responsible for creating derived data channels from existing sensor input channels. It performs mathematical transformations—including 3D IR-TRACC displacement calculations, aggregate operations (SUM, AVE, Resultant, HIC), and binary operations (integration, differentiation, trigonometric functions)—on channel data and persists the results to memory-mapped files. This module exists to support post-processing of crash test data, enabling engineers to synthesize new measurement channels from raw sensor inputs.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `CreateChannels` (static method)
|
||||
```csharp
|
||||
public static Test.Module.CalculatedChannel[] CreateChannels(
|
||||
string testId,
|
||||
string folder,
|
||||
Calculation calculation,
|
||||
List<Test.Module.Channel> inputChannels,
|
||||
string channelName,
|
||||
int startingNumber,
|
||||
List<Test.Module.Channel> allChannels,
|
||||
int clipLength,
|
||||
out List<string> errorList,
|
||||
int defaultEncoding)
|
||||
```
|
||||
**Behavior:** Main entry point for creating calculated channels. Dispatches to appropriate private methods based on the `Calculation` enum value. Returns an array of `Test.Module.CalculatedChannel` objects on success, or `null` if validation fails. Populates `errorList` with validation errors.
|
||||
|
||||
### `ValidateChannelName` (static method)
|
||||
```csharp
|
||||
public static bool ValidateChannelName(
|
||||
string channelName,
|
||||
List<Test.Module.Channel> inputChannels,
|
||||
List<Test.Module.Channel> allChannels,
|
||||
out List<string> errorList)
|
||||
```
|
||||
**Behavior:** Validates that the channel name is non-empty and unique across both input channels and all channels. Returns `true` if valid; `false` otherwise. If `allChannels` is `null`, validation is bypassed and returns `true`.
|
||||
|
||||
### `ThreeDIRTraccType` (public enum)
|
||||
```csharp
|
||||
public enum ThreeDIRTraccType
|
||||
{
|
||||
Thorax,
|
||||
Abdomen,
|
||||
LowerThorax
|
||||
}
|
||||
```
|
||||
**Behavior:** Specifies the anatomical location for 3D IR-TRACC calculations, which affects the constants (`δ` and `D0`) used in the displacement formulas.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Channel Number Offset:** All calculated channels use `ChannelNumberCalculationChannelIndicator` (constant value `100000`) as a base offset for their channel numbers.
|
||||
2. **Sample Rate Compatibility:** For aggregate and 3D IR-TRACC operations, the maximum sample rate among input channels must be an integer multiple of each individual channel's sample rate. Otherwise, `NotSupportedException` is thrown.
|
||||
3. **3D IR-TRACC Input Count:** `Create3DIRTraccChannels` asserts that exactly 3 input channels are provided.
|
||||
4. **Aggregate Operation Input Count:** `CreateChannelsAggregateOperation` asserts that at least 2 input channels are provided (assertion message says "at least 1" but checks `1 < inputChannels.Count`).
|
||||
5. **File Overwrite Safety:** `CreatePersistentInformationObject` deletes any existing file at the target filepath before creating a new persistent channel, using `GC.Collect()` followed by `FileUtils.DeleteFileOrMove`.
|
||||
6. **Engineering Units Padding:** When persisting engineering units, the string is padded to even length for word-alignment if its length is odd.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On:
|
||||
- `DTS.Common.Enums.Sensors` - For `SensorConstants` (δ and D0 values)
|
||||
- `DTS.Common.Utilities.Logging` - For `APILogger.Log`
|
||||
- `DTS.Common.Utils` - For `FileUtils`
|
||||
- `DTS.Serialization` - For `SliceRaw.File` format handling
|
||||
- `DTS.Slice.Control` - Unclear specific usage (imported but no direct reference visible)
|
||||
- `DTS.Common` - For `Constants.ADC_MIDPOINT`, `ZeroMethodType`
|
||||
- `DTS.Common.Events` - For `PageErrorEvent`, `PageErrorArg`
|
||||
- `DTS.Common.Calculations` - For `HeadInjuryCriterion`
|
||||
- `DTS.Common.Utilities.Math.Nhtsa` - For `Integration`, `Differentiation`
|
||||
- `Prism.Ioc` - For `ContainerLocator`
|
||||
- `Prism.Events` - For `IEventAggregator`
|
||||
- `Test.Module` namespace - For `Channel`, `CalculatedChannel`, `AnalogInputChannel`
|
||||
- `Event.Module` namespace - For `Channel`, `AnalogInputChannel`
|
||||
|
||||
### What Depends On This Module:
|
||||
- **Unclear from source alone** - No consumers are shown in this file.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
### Critical Bugs Identified:
|
||||
|
||||
1. **Copy-Paste Error in `PerformCalculation` (line ~378):**
|
||||
```csharp
|
||||
var stepRPot1 = Convert.ToInt32(Math.Ceiling(indexAtCurrentTimeIRTracc) - actualIndexAtCurrentTimeIRTracc);
|
||||
```
|
||||
Uses `indexAtCurrentTimeIRTracc` instead of `indexAtCurrentTimeRPot1`. This causes incorrect interpolation for the R-Pot1 channel.
|
||||
|
||||
2. **Assignment Instead of Subtraction in `PerformCalculation` (line ~403):**
|
||||
```csharp
|
||||
incrementRPot2 = (valueRPot2AtPoint = rPot2EUData[actualIndexAtCurrentTimeRPot2 - 1]) / rateRPot2;
|
||||
```
|
||||
This is an assignment (`=`) inside parentheses, overwriting `valueRPot2AtPoint`, when it should be a subtraction (`-`).
|
||||
|
||||
3. **Unused Variable in `PerformCalculationsAggregate` (line ~151):**
|
||||
```csharp
|
||||
var timeAtIndex =
|
||||
```
|
||||
Variable is declared but never assigned or used. This is a syntax error or incomplete implementation.
|
||||
|
||||
### Non-Obvious Behaviors:
|
||||
|
||||
4. **Debug/Test Data Injection:** The method calls `DiskUtility.ReplaceDataIfNeeded(ref irTraccEUData, "DISPLEU.txt")` and similar for other channels. This appears to be a debug feature that can override channel data from disk files. Production behavior is unclear.
|
||||
|
||||
5. **Explicit `GC.Collect()` Call:** In `CreatePersistentInformationObject`, `GC.Collect()` is called before file deletion to handle file locks. This is a heavy operation that may cause performance issues.
|
||||
|
||||
6. **ScaleEuData Logic Appears Inverted:** When `max > short.MaxValue`, the scale factor calculation `scaleFactor = max / short.MaxValue` produces a value ≥ 1, which would amplify data that's already too large, potentially causing overflow when casting to `short`.
|
||||
|
||||
7. **HIC Unit Conversion:** For HIC calculations, if engineering units are not "g", the code multiplies by `9.80665` to convert from m/s² to g's. This assumes the input is in m/s², which may not always be true.
|
||||
|
||||
8. **Commented-Out Code:** There is a commented-out `DeleteChannelFile` method and associated logic for deferred file deletion, suggesting historical changes to file handling behavior.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:29:26.442754+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a42ffb66848e031f"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains assembly metadata for the `DTS.Viewer.AddCalculatedChannel` component. It is a standard .NET assembly information file that defines versioning, copyright, and COM visibility settings for the compiled output. It exists solely to provide identity and configuration information for the assembly at build time.
|
||||
|
||||
### Public Interface
|
||||
No public types or functions are defined. This file only declares assembly-level attributes:
|
||||
- `AssemblyTitle`: "DTS.Viewer.AddCalculatedChannel"
|
||||
- `AssemblyDescription`: Empty
|
||||
- `AssemblyProduct`: "DTS.Viewer.AddCalculatedChannel"
|
||||
- `AssemblyCopyright`: "Copyright © 2017"
|
||||
- `AssemblyVersion`: "1.0.0.0"
|
||||
- `AssemblyFileVersion`: "1.0.0.0"
|
||||
- `ComVisible`: false
|
||||
- `Guid`: "6451f3ed-934e-47e3-a1ca-33c223a6507a"
|
||||
|
||||
### Invariants
|
||||
- Assembly version is fixed at 1.0.0.0 (no auto-increment wildcard).
|
||||
- COM visibility is disabled for all types in this assembly.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Unclear from source alone (consumed by the build system).
|
||||
|
||||
### Gotchas
|
||||
None identified from source alone. This is boilerplate assembly metadata.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T15:56:15.275064+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "485d316f89383148"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.AddCalculatedChannel.Resources
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides localization/internationalization infrastructure for the "Add Calculated Channel" feature within the DTS Viewer application. It consists of a WPF markup extension (`TranslateExtension`) that enables XAML-based string localization, backed by an auto-generated strongly-typed resource class (`StringResources`) that exposes localized strings for UI labels, calculation types, error messages, and sensor-related terminology (IR-TRACC, HIC calculations, etc.).
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `TranslateExtension` (Markup Extension)
|
||||
|
||||
**Namespace:** `DTS.Viewer.AddCalculatedChannel`
|
||||
|
||||
A WPF markup extension for retrieving localized strings in XAML bindings.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/View/AddCalculatedChannelView.xaml.cs
|
||||
generated_at: "2026-04-17T16:13:40.916446+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9d3bcf84fac09edf"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides the code-behind for the `AddCalculatedChannelView` XAML view, serving as the UI component for adding calculated channels within the DTS Viewer application. It implements the `IAddCalculatedChannelView` interface to integrate with the application's view abstraction layer, enabling loose coupling between the view and its consuming components.
|
||||
|
||||
### Public Interface
|
||||
|
||||
- **`AddCalculatedChannelView()`** (Constructor)
|
||||
- Initializes the component by calling `InitializeComponent()`. No additional parameters or logic.
|
||||
|
||||
- **`IAddCalculatedChannelView`** (Implemented Interface)
|
||||
- The class implements this interface from `DTS.Common.Interface`, making it usable wherever the interface type is required.
|
||||
|
||||
### Invariants
|
||||
- The view must be a partial class to support WPF's code-generation model for XAML.
|
||||
- `InitializeComponent()` must be called exactly once during construction to load the associated XAML.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on:** `DTS.Common.Interface` (for `IAddCalculatedChannelView` interface)
|
||||
- **Depended on by:** Cannot be determined from source alone (likely consumed by a presenter/viewmodel or region navigation in the broader application)
|
||||
|
||||
### Gotchas
|
||||
- The file includes a ReSharper directive `// ReSharper disable CheckNamespace`, suggesting the namespace `DTS.Viewer.AddCalculatedChannel` may not match the project's default namespace structure. This could cause confusion during refactoring or when locating the view.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,207 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/ViewModel/AddCalculatedChannelViewModel.cs
|
||||
generated_at: "2026-04-17T16:00:17.185622+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "71a9c8acbea4fb64"
|
||||
---
|
||||
|
||||
# Documentation: AddCalculatedChannelViewModel
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the ViewModel for the "Add Calculated Channel" feature in the DTS Viewer application. It manages the UI logic and business rules for creating derived data channels from existing test data, supporting multiple calculation types including mathematical operations (Integral, Derivative, Sin, Cos), aggregations (SUM, Average, Resultant), and specialized biomechanical calculations (HIC, 3D IR-Tracc variants). The ViewModel handles channel selection, validation, file I/O operations, and coordinates with the event aggregation system to notify other application components of changes.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Class: `AddCalculatedChannelViewModel`
|
||||
**Inherits:** `BaseViewModel<IAddCalculatedChannelViewModel>`
|
||||
**Implements:** `IAddCalculatedChannelViewModel`
|
||||
|
||||
### Constructor
|
||||
```csharp
|
||||
public AddCalculatedChannelViewModel(
|
||||
IAddCalculatedChannelView view,
|
||||
IRegionManager regionManager,
|
||||
IEventAggregator eventAggregator,
|
||||
IUnityContainer unityContainer)
|
||||
```
|
||||
Initializes the ViewModel, sets up the View's DataContext, creates interaction requests, and registers the `AddCalculatedChannelCommand`.
|
||||
|
||||
### Public Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `View` | `IBaseView` | The associated view instance. |
|
||||
| `Parent` | `IBaseViewModel` | The parent ViewModel passed during initialization. |
|
||||
| `ContextSearchRegion` | `object` | Context for search region (usage unclear from source). |
|
||||
| `NotificationRequest` | `InteractionRequest<Notification>` | Raises notification dialogs. |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Raises confirmation dialogs. |
|
||||
| `HeaderInfo` | `string` | Returns `"AddCalculatedChannelRegion"`. |
|
||||
| `IsBusy` | `bool` | **Throws `NotImplementedException`** on get/set. |
|
||||
| `IsDirty` | `bool` | **Throws `NotImplementedException`** on get. |
|
||||
| `IsAddCalculatedChannelIncluded` | `bool` | Gets/sets inclusion flag. |
|
||||
| `IncludeGroupNameInISOExport` | `bool` | Controls whether group names are included in ISO export. |
|
||||
| `DefaultDTSEncoding` | `int` | Encoding code page for DTS file operations. |
|
||||
| `ChannelName` | `string` | Name for the new calculated channel. |
|
||||
| `ChannelDescription` | `string` | Auto-generated description based on selected calculation and channels. |
|
||||
| `IsoCode` | `string` | ISO code for the channel (defaults to `"NONE"`). |
|
||||
| `SingleChannelSelectorVisibility` | `bool` | Controls visibility for single-channel selection UI. |
|
||||
| `HICChannelSelectorVisibility` | `bool` | Controls visibility for HIC channel selection UI. |
|
||||
| `MultipleChannelSelectorVisibility` | `bool` | Controls visibility for multi-channel selection UI. |
|
||||
| `ThreeDIRTRACCVisibility` | `bool` | Controls visibility for 3D IR-Tracc channel selection UI. |
|
||||
| `CalculationList` | `CalculationHelper[]` | Lazy-initialized list of available calculations. |
|
||||
| `SelectedCalculation` | `CalculationHelper` | Currently selected calculation type. |
|
||||
| `ChannelList` | `ObservableCollection<ITestChannel>` | All available input channels. |
|
||||
| `ChannelListObjects` | `ObservableCollection<ChannelHelper>` | Wrapped channel objects with `IsIncluded` tracking. |
|
||||
| `AvailableHICChannels` | `ChannelHelper[]` | Channels with acceleration units valid for HIC calculation. |
|
||||
| `HICAccelerationX` | `ChannelHelper` | Selected X-axis acceleration channel for HIC. |
|
||||
| `HICAccelerationY` | `ChannelHelper` | Selected Y-axis acceleration channel for HIC. |
|
||||
| `HICAccelerationZ` | `ChannelHelper` | Selected Z-axis acceleration channel for HIC. |
|
||||
| `HICLength` | `int` | HIC calculation length parameter (default: 16). |
|
||||
| `SourceChannel` | `ITestChannel` | Selected source channel for single-channel calculations. |
|
||||
| `IRTraccChannelList` | `ObservableCollection<ChannelHelper>` | Valid IR-Tracc channels. |
|
||||
| `IRTraccChannel` | `ChannelHelper` | Selected IR-Tracc channel. |
|
||||
| `Pot1ChannelList` | `ObservableCollection<ChannelHelper>` | Valid potentiometer 1 channels. |
|
||||
| `Pot1Channel` | `ChannelHelper` | Selected potentiometer 1 channel. |
|
||||
| `Pot2ChannelList` | `ObservableCollection<ChannelHelper>` | Valid potentiometer 2 channels. |
|
||||
| `Pot2Channel` | `ChannelHelper` | Selected potentiometer 2 channel. |
|
||||
|
||||
### Public Commands
|
||||
|
||||
| Command | Handler | Description |
|
||||
|---------|---------|-------------|
|
||||
| `AddCalculatedChannelCommand` | `AddCalculatedChannel(object obj)` | Validates input, creates calculated channel(s), writes to DTS file, and publishes refresh event. |
|
||||
|
||||
### Public Methods
|
||||
|
||||
```csharp
|
||||
public void PublishChanges() // Throws NotImplementedException
|
||||
public override void Initialize()
|
||||
public override void Initialize(object parameter)
|
||||
public override void Activated()
|
||||
public override void Cleanup()
|
||||
public bool Validate(ref List<string> errors, ref List<string> warnings, bool displayWindow)
|
||||
```
|
||||
|
||||
### Public Enum: `Calculation`
|
||||
|
||||
| Value | Name | Description Attribute |
|
||||
|-------|------|------------------------|
|
||||
| 0 | `Integral` | "Integral" |
|
||||
| 1 | `DoubleIntegral` | "Double Integral" |
|
||||
| 2 | `Derivative` | "Derivative" |
|
||||
| 3 | `Sin` | "Sin" |
|
||||
| 4 | `Cos` | "Cos" |
|
||||
| 5 | `ThreeDIRTracc` | "3D IR-Tracc" |
|
||||
| 6 | `SUM` | "SUM" |
|
||||
| 7 | `AVE` | "Average" |
|
||||
| 8 | `ThreeDIRTraccAbdomen` | "3D IR-TRACC Abdomen" |
|
||||
| 9 | `ThreeDIRTraccLowerThorax` | "3D IR-TRACC Lower Thorax" |
|
||||
| 10 | `Resultant` | "Resultant" |
|
||||
| 11 | `HIC` | "HIC" |
|
||||
|
||||
### Public Nested Classes
|
||||
|
||||
#### `ChannelHelper`
|
||||
Wraps `ITestChannel` with display formatting and inclusion tracking.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `MyChannel` | `ITestChannel` | The wrapped channel. |
|
||||
| `DisplayName` | `string` | Formatted display name based on `IsoViewMode`. |
|
||||
| `ChannelName` | `string` | Returns `ToString()` of the channel. |
|
||||
| `IsIncluded` | `bool` | Tracks whether channel is included in multi-select calculations. |
|
||||
|
||||
#### `CalculationHelper`
|
||||
Wraps `Calculation` enum with localized string representation.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `MyCalculation` | `Calculation` | The wrapped calculation type. |
|
||||
| `ToString()` | `string` | Returns localized name from resources or enum name. |
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Channel List Ordering**: `ChannelList` is always sorted by `AbsoluteDisplayOrder` via `CompareDisplayOrders` comparison.
|
||||
|
||||
2. **IR-Tracc Channel Eligibility**: Channels in `IRTraccChannelList` must satisfy all of:
|
||||
- `ChannelType` equals `Test.Module.AnalogInputChannel` type string
|
||||
- `LinearizationFormula` is valid (via `LinearizationFormula.IsValid()`)
|
||||
- `ZeroMethod` equals `ZeroMethodType.None`
|
||||
- `ZeroPoint` is not zero
|
||||
- `FactoryExcitationVoltage` is not zero
|
||||
|
||||
3. **Potentiometer Channel Eligibility**: Channels in `Pot1ChannelList` and `Pot2ChannelList` must satisfy:
|
||||
- `ChannelType` equals `Test.Module.AnalogInputChannel` type string
|
||||
- `Eu` (engineering units) is `"deg"` or `"deg-ang"` (case-insensitive)
|
||||
- `ZeroMethod` equals `ZeroMethodType.None`
|
||||
- `FactoryExcitationVoltage` is not zero
|
||||
|
||||
4. **HIC Channel Eligibility**: Channels in `AvailableHICChannels` must have engineering units contained in `Constants.ACCELERATION_UNITS`.
|
||||
|
||||
5. **Resultant Validation**: All included channels for Resultant calculation must have matching `SensitivityUnits` and `SampleRateHz`.
|
||||
|
||||
6. **HIC Validation**: HIC calculation requires all three acceleration channels (X, Y, Z) to be non-null.
|
||||
|
||||
7. **File Backup**: DTS file backup is only created if a backup file does not already exist.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Direct Dependencies (Imports)
|
||||
- `DTS.Common` / `DTS.Common.Base` / `DTS.Common.Utils` / `DTS.Common.Utilities.Logging`
|
||||
- `DTS.Common.Classes.Viewer.Commands` (for `RelayCommand`)
|
||||
- `DTS.Common.DAS.Concepts`
|
||||
- `DTS.Common.Enums.Sensors` (for `ZeroMethodType`)
|
||||
- `DTS.Common.Events` (for event types)
|
||||
- `DTS.Common.Interactivity` (for `InteractionRequest`, `Notification`, `Confirmation`)
|
||||
- `DTS.Common.Interface`
|
||||
- `DTS.Slice.Control`
|
||||
- `DTS.Viewer.AddCalculatedChannel.Model`
|
||||
- `DTS.Serialization.Test` (aliased as `Test`)
|
||||
- `Prism.Events` (for `IEventAggregator`)
|
||||
- `Prism.Regions` (for `IRegionManager`)
|
||||
- `Unity` (for `IUnityContainer`)
|
||||
|
||||
### Events Subscribed
|
||||
- `RaiseNotification` → `OnRaiseNotification`
|
||||
- `TestSummaryChangeNotification` → `OnTestSummaryChanged`
|
||||
|
||||
### Events Published
|
||||
- `SetSaveButton` (via `SaveButtonUsability` payload)
|
||||
- `PageErrorEvent` (via `PageErrorArg` payload)
|
||||
- `RefreshTestRequestEvent` (with DTS file path)
|
||||
- `RaiseNotification` (via `NotificationContentEventArgs`)
|
||||
|
||||
### Consumers
|
||||
Unknown from source alone. The module is instantiated via Unity dependency injection and navigated to via Prism regions.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Unimplemented Members**: `IsBusy`, `IsDirty`, and `PublishChanges()` throw `NotImplementedException`. These appear to be interface requirements that were never implemented.
|
||||
|
||||
2. **HIC Save Button Logic Appears Inverted**: In `UpdateSaveButtonVisibility()`, the HIC case sets `IsUsable = true` when acceleration channels are null and `IsUsable = false` when they are set. This appears to be a bug—the logic should likely be inverted.
|
||||
|
||||
```csharp
|
||||
case Calculation.HIC:
|
||||
if (null == HICAccelerationX || null == HICAccelerationY || null == HICAccelerationZ)
|
||||
{
|
||||
_eventAggregator.GetEvent<SetSaveButton>().Publish(new SaveButtonUsability() { IsUsable = true }); // Suspect
|
||||
}
|
||||
else
|
||||
{
|
||||
_eventAggregator.GetEvent<SetSaveButton>().Publish(new SaveButtonUsability() { IsUsable = false }); // Suspect
|
||||
}
|
||||
break;
|
||||
```
|
||||
|
||||
3. **Member Hiding with `new` Keyword**: The class uses `new` to hide inherited members (`PropertyChanged`, `OnPropertyChanged`, `IsBusy`, `IsDirty`, `ConfirmationRequest`). This can lead to unexpected behavior when the ViewModel is accessed via base class references.
|
||||
|
||||
4. **Thread.Sleep in File Write**: A `Thread.Sleep(10)` follows the file write operation in `AddCalculatedChannel()`. This suggests a timing-related workaround for file system operations.
|
||||
|
||||
5. **Backup File Deletion**: After successful save, the backup file is deleted only if it was created during that save operation (`!backupExisted`). Original backups are preserved.
|
||||
|
||||
6. **Channel Loading Side Effect**: `OnTestSummaryChanged` triggers lazy loading of channel data via `Utils.SetChannelInfo()` when `ts.Channels.FirstOrDefault() == null`, modifying the test metadata in place.
|
||||
|
||||
7. **Default Encoding Fallback**: If `Encoding.GetEncoding(DefaultDTSEncoding)` fails, the code falls back to `Encoding.Default` without re-throwing, potentially causing encoding mismatches.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/ChartOptionsModule.cs
|
||||
generated_at: "2026-04-17T16:45:35.849303+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "dbbe5595baa7b41f"
|
||||
---
|
||||
|
||||
# Documentation: ChartOptionsModule.cs
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module serves as the Prism module initializer for the `DTS.Viewer.ChartOptions` assembly. Its primary role is to register chart options-related views, view models, and models with the Unity dependency injection container, enabling the DTS Viewer application to discover and load chart configuration functionality. Additionally, it defines assembly-level metadata attributes that expose the module's name, image icon, group classification, and target region to the main application shell.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ChartOptionsModule` (class)
|
||||
Implements `Prism.Modularity.IModule`. The main module entry point for the ChartOptions feature.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `ChartOptionsModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
|
||||
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. Required by `IModule`. |
|
||||
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation. Required by `IModule`. |
|
||||
| `Initialize` | `void Initialize()` | Registers three types with Unity: `IChartOptionsView` → `ChartOptionsView`, `IChartOptionsViewModel` → `ChartOptionsViewModel`, `IChartOptionsModel` → `ChartOptionsModel`. |
|
||||
|
||||
### `ChartOptionsModuleNameAttribute` (class)
|
||||
Extends `TextAttribute`. Assembly-level attribute providing the module's name.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `ChartOptionsModuleNameAttribute()` | Initializes with `AssemblyName` set to `AssemblyNames.ChartOptions.ToString()`. |
|
||||
| Constructor | `ChartOptionsModuleNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
|
||||
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `AssemblyNames.ChartOptions.ToString()`. |
|
||||
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Model/ChartOptionsModel.cs
|
||||
generated_at: "2026-04-17T15:59:30.841040+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f69f24106dae95d3"
|
||||
---
|
||||
|
||||
# Documentation: ChartOptionsModel
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`ChartOptionsModel` is a model class within the `DTS.Viewer.ChartOptions` module that encapsulates configuration state for chart visualization options. It serves as a data-bound model in an MVVM architecture, managing
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:21.103396+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3d3c0935753bde1d"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains assembly-level metadata for the `DTS.Viewer.Test` assembly. It provides versioning, copyright, and COM visibility configuration using standard .NET Framework assembly attributes. This is a boilerplate configuration module with no runtime logic.
|
||||
|
||||
### Public Interface
|
||||
No public types are exposed by this module. It contains only assembly-level attributes:
|
||||
|
||||
- **`AssemblyTitle`**: "DTS.Viewer.Test"
|
||||
- **`AssemblyDescription`**: Empty
|
||||
- **`AssemblyVersion`**: "1.0.0.0"
|
||||
- **`AssemblyFileVersion`**: "1.0.0.0"
|
||||
- **`ComVisible`**: false
|
||||
- **`Guid`**: "b2b2b862-1b93-476a-8246-91e1310c7ec7"
|
||||
|
||||
### Invariants
|
||||
- Assembly version is fixed at 1.0.0.0; manual updates required for version increments.
|
||||
- COM visibility is disabled for all types in this assembly.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on:** `System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices` (standard .NET Framework assemblies)
|
||||
- **Depended on by:** Not applicable; this is configuration metadata.
|
||||
|
||||
### Gotchas
|
||||
- The `AssemblyTitle` is "DTS.Viewer.Test" while the module path suggests "DTS.Viewer.TestSummaryList". This discrepancy may indicate a rename occurred without updating assembly metadata, or the title attribute is intentionally generic.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:11:50.603414+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b9710c66f9ec0c0d"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### Purpose
|
||||
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`TranslateExtension` class** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
|
||||
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
|
||||
|
||||
**`StringResources` class** (internal, auto-generated)
|
||||
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
|
||||
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
|
||||
- `static string Search { get; }` - Localized string resource for "Search".
|
||||
|
||||
### Invariants
|
||||
- `ProvideValue` always returns a non-null string.
|
||||
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
|
||||
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
|
||||
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
|
||||
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
|
||||
|
||||
### Gotchas
|
||||
- `StringResources`
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/View/ChartOptionsView.xaml.cs
|
||||
generated_at: "2026-04-17T16:13:13.901944+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4ba631a9f013b7f7"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides the WPF view component for chart configuration options in the DTS Viewer application. It implements `IChartOptionsView` and serves as a data provider for available filter classes (CFC - Class Filter Classes) used in sensor data analysis, exposing filter options through the `AnalogSettingDefaults` infrastructure.
|
||||
|
||||
### Public Interface
|
||||
|
||||
- **`ChartOptionsView()`** - Constructor that initializes the XAML component via `InitializeComponent()`.
|
||||
|
||||
- **`AvailableCFC`** (`List<IFilterClass>`) - Read-only property that returns available filter
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/ViewModel/ChartOptionsViewModel.cs
|
||||
generated_at: "2026-04-17T15:59:04.271654+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c0b9efc3f556df6f"
|
||||
---
|
||||
|
||||
# Documentation: ChartOptionsViewModel
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`ChartOptionsViewModel` is a Prism-based view model responsible for managing chart configuration options within the DTS Viewer application. It serves as an intermediary between the UI (`IChartOptionsView`) and the charting system, handling user interactions for cursor display, zoom reset, PDF export, and unit type selection (EU, mV, ADC). The module communicates with parent view models and other components via Prism's `IEventAggregator`, publishing chart option changes and responding to external events such as channel selection and axis changes.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Class Signature
|
||||
```csharp
|
||||
public class Chart
|
||||
34
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter.md
Normal file
34
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/FilterModule.cs
|
||||
generated_at: "2026-04-17T16:29:16.940341+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9b2fb11444b566f3"
|
||||
---
|
||||
|
||||
# DTS.Viewer.Filter
|
||||
|
||||
### 1. Purpose
|
||||
This module serves as a Prism module responsible for registering the "Filter" component within the DTS Viewer application. It integrates with the Unity dependency injection container to register a view (`FilterView`) and its corresponding view-model (`FilterViewModel`). Additionally, it defines assembly-level attributes to expose metadata (name, image, region, and group) to the broader application, likely for dynamic UI generation or module listing in the main shell.
|
||||
|
||||
### 2. Public Interface
|
||||
* **`FilterModule` class**
|
||||
* `FilterModule(IUnityContainer unityContainer)`: Constructor that accepts a Unity container instance for dependency injection.
|
||||
* `RegisterTypes(IContainerRegistry containerRegistry)`: Implements `IModule`. Invokes the `Initialize()` method to register types.
|
||||
* `OnInitialized(IContainerProvider containerProvider)`: Implements `IModule`. Currently empty in this implementation.
|
||||
* `Initialize()`: Registers `IFilterView` to `FilterView` and `IFilterViewModel` to `FilterViewModel` with the Unity container.
|
||||
* **`FilterPropertiesNameAttribute` class** (inherits `TextAttribute`)
|
||||
* `FilterPropertiesNameAttribute()`: Default constructor.
|
||||
* `FilterPropertiesNameAttribute(string s)`: Overloaded constructor (parameter unused).
|
||||
* `AssemblyName`: Property returning `AssemblyNames.Filter.ToString()`.
|
||||
* `GetAttributeType()`: Returns `typeof(TextAttribute)`.
|
||||
* **`FilterPropertiesImageAttribute` class** (inherits `ImageAttribute`)
|
||||
* `AssemblyImage`: Property that fetches a `BitmapImage` using `AssemblyInfo.GetImage`.
|
||||
* `AssemblyName`: Property returning `AssemblyNames.Filter.ToString()`.
|
||||
* `AssemblyGroup`: Property returning `eAssemblyGroups.Viewer.ToString()`.
|
||||
* `AssemblyRegion`: Property returning `eAssemblyRegion.FilterRegion`.
|
||||
|
||||
### 3. Invariants
|
||||
* The module is named "FilterProperties" (defined in `[Module(ModuleName = "FilterProperties")]`).
|
||||
* The `FilterPropertiesNameAttribute
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:15.475534+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7eadeb859dc3edcd"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
|
||||
|
||||
### Public Interface
|
||||
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
|
||||
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
|
||||
- `AssemblyVersion`: "1.0.0.0"
|
||||
- `AssemblyFileVersion`: "1.0.0.0"
|
||||
- `ComVisible`: false
|
||||
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
|
||||
|
||||
### Invariants
|
||||
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
|
||||
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
|
||||
|
||||
### Gotchas
|
||||
- `AssemblyDescription` is empty, providing no documentation
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:11:50.600783+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c29875f02a7ceb6f"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### Purpose
|
||||
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`TranslateExtension` class** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
|
||||
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
|
||||
|
||||
**`StringResources` class** (internal, auto-generated)
|
||||
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
|
||||
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
|
||||
- `static string Search { get; }` - Localized string resource for "Search".
|
||||
|
||||
### Invariants
|
||||
- `ProvideValue` always returns a non-null string.
|
||||
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
|
||||
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
|
||||
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
|
||||
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
|
||||
|
||||
### Gotchas
|
||||
- `StringResources`
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/View/FilterView.xaml.cs
|
||||
generated_at: "2026-04-17T16:13:21.098165+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0165fcfef81ef95d"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides the `FilterView` class, a WPF view component that serves as a filter interface within the DTS Viewer application. It implements the `IFilterView` interface, indicating it follows a view abstraction pattern likely used for dependency injection or MVP/MVVM architecture.
|
||||
|
||||
### Public Interface
|
||||
|
||||
- **`FilterView()` (Constructor)**
|
||||
- Initializes the view component by calling `InitializeComponent()`, which loads the associated XAML-defined UI elements.
|
||||
|
||||
- **`IFilterView` (Implemented Interface)**
|
||||
- The class implements `DTS.Common.Interface.IFilterView`, though the specific interface members are not visible in this source file.
|
||||
|
||||
### Invariants
|
||||
- The view must be properly paired with a corresponding XAML file (`FilterView.xaml`) that defines the visual layout.
|
||||
- The `InitializeComponent()` method must be called exactly once during construction.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on:** `DTS.Common.Interface` (for `IFilterView` interface)
|
||||
- **Depended on by:** Not determinable from source alone; likely consumed by a presenter or higher-level view composition system.
|
||||
|
||||
### Gotchas
|
||||
- The file includes a ReSharper directive `// ReSharper disable CheckNamespace`, suggesting the namespace `DTS.Viewer.Filter` may not match the project's default namespace structure. This could cause confusion during refactoring or when locating the class.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Filter/ViewModel/FilterViewModel.cs
|
||||
generated_at: "2026-04-17T16:30:27.298538+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "013c5b7190e62e52"
|
||||
---
|
||||
|
||||
# ViewModel
|
||||
|
||||
### Purpose
|
||||
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
|
||||
|
||||
**Constructor:**
|
||||
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
|
||||
|
||||
**Properties:**
|
||||
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
|
||||
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
|
||||
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
|
||||
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
|
||||
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
|
||||
- `IsBusy` (`bool`) - Busy state indicator.
|
||||
- `IsDirty` (`bool`) - Dirty state indicator.
|
||||
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
|
||||
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
|
||||
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
|
||||
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
|
||||
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
|
||||
|
||||
**Methods:**
|
||||
- `void Initialize()` - Empty override.
|
||||
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
|
||||
- `void PublishChanges()` - Empty method (implementation appears incomplete).
|
||||
|
||||
**Events:**
|
||||
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
|
||||
|
||||
### Invariants
|
||||
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility
|
||||
29
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph.md
Normal file
29
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/GraphModule.cs
|
||||
generated_at: "2026-04-17T16:45:33.522591+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "203ebb9274cae2d1"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.Graph Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
The `GraphModule` is a Prism module responsible for registering graph-related views and view models with the Unity dependency injection container in the DTS Viewer application. It serves as the composition root for the Graph subsystem, wiring up the `IGraphView`/`GraphView` and `ITestDataSeriesView`/`TestDataSeriesView` pairs with their respective view models. The module also defines assembly-level metadata attributes (`GraphNameAttribute` and `GraphImageAttribute`) that expose the module's name, image icon, group classification, and region assignment for consumption by the main application shell.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### GraphModule Class
|
||||
|
||||
**Implements:** `Prism.Modularity.IModule`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `GraphModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
|
||||
| RegisterTypes | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registrations. |
|
||||
| OnInitialized | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation; no post-initialization logic executed. |
|
||||
| Initialize | `void Initialize()` | Registers view/view-model
|
||||
159
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model.md
Normal file
159
docs/ai/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model.md
Normal file
@@ -0,0 +1,159 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model/TestDataSeries.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Model/TestDataSeriesModel.cs
|
||||
generated_at: "2026-04-17T15:56:35.752282+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2fa01244d764d6f0"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.Graph Module - Test Data Series
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the data model and factory logic for rendering test channel data on graphs within the DTS Viewer application. `TestDataSeries` serves as the serializable, property-change-notifying data transfer object that holds channel metadata, time/frequency domain data, and computed statistics. `TestDataSeriesModel` acts as the factory that transforms raw `ITestChannel` binary data into `TestDataSeries` instances, handling time-domain, FFT, and PSD (Power Spectral Density) transformations with optional filtering and windowing.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TestDataSeries Class
|
||||
**Namespace:** `DTS.Viewer.Graph.Model`
|
||||
**Inherits:** `Common.Base.BasePropertyChanged`
|
||||
**Implements:** `ITestDataSeries`
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `HIC` | `bool` | Indicates if Head Injury Criteria data is present. |
|
||||
| `HICValue` | `string` | Formatted HIC value. |
|
||||
| `T1Time` / `T2Time` | `string` | T1/T2 timestamp strings for HIC calculations. |
|
||||
| `TestGroup` | `string` | Test group identifier. |
|
||||
| `TestId` | `string` | Unique test identifier. |
|
||||
| `TestSetupName` | `string` | Name of the test setup configuration. |
|
||||
| `ChannelId` | `string` | Channel identifier. |
|
||||
| `Xvalue` | `double[]` | X-axis data array (time or frequency values). |
|
||||
| `Yvalue` | `double[]` | Y-axis data array (amplitude values). |
|
||||
| `GraphColor` | `Brush` | WPF brush for graph rendering. Getter creates new `SolidColorBrush` from internal `byte[]`. |
|
||||
| `HardwareChannel` | `string` | Hardware channel name. |
|
||||
| `Bridge` | `string` | Bridge type identifier. |
|
||||
| `SWAAF` | `string` | Software anti-aliasing filter setting. |
|
||||
| `HWAAF` | `string` | Hardware anti-aliasing filter rate. |
|
||||
| `SampleRate` | `string` | Sample rate in Hz. |
|
||||
| `RecordingMode` | `string` | Recording mode description. |
|
||||
| `ISOCode` / `ISOChannelName` | `string` | ISO channel identification. |
|
||||
| `UserCode` / `UserChannelName` | `string` | User-defined channel identification. |
|
||||
| `ChannelName` | `string` | Display channel name. |
|
||||
| `Description` | `string` | Channel description. |
|
||||
| `SensorSN` | `string` | Sensor serial number. |
|
||||
| `SensorSNDisplay` | `string` | Returns `Strings.Table_NA` if sensor is test-specific embedded, otherwise returns `SensorSN`. |
|
||||
| `EngineeringUnits` | `string` | Engineering units string. |
|
||||
| `Excitation` | `string` | Excitation voltage. |
|
||||
| `Polarity` | `string` | Sensor polarity. |
|
||||
| `MinY` / `MaxY` / `AvgY` / `StdDevY` | `string` | Statistical values, default to `Strings.Table_NA`. |
|
||||
| `PeakMagnitude` | `double` | Peak magnitude of frequencies (valid only when `FFT` is true). |
|
||||
| `PeakFrequency` | `double` | Frequency of highest magnitude (valid only when `FFT` is true). |
|
||||
| `GRMS` | `double` | Root-mean-squared acceleration (calculated in PSD results). |
|
||||
| `FFT` | `bool` | Indicates whether series is FFT-transformed data. |
|
||||
| `T0EUValue` | `string` | T0 value regardless of units. |
|
||||
| `IsSaved` | `bool` | Get-only property (purpose unclear from source). |
|
||||
|
||||
#### Methods
|
||||
|
||||
```csharp
|
||||
public void SetStatsFromYValues()
|
||||
```
|
||||
Sets `AvgY`, `StdDevY`, `MinY`, `MaxY`, `T0EUValue` using internal `Yvalue` array. Formats using `"G5"` format string.
|
||||
|
||||
```csharp
|
||||
public void SetStatsFromYValues(double[] values)
|
||||
```
|
||||
Overload that accepts an external `double[]` array. Handles null/empty arrays by setting all stats to `NaN` (displayed as `Strings.Table_NA`).
|
||||
|
||||
```csharp
|
||||
public void SetStatsFromChannel(ITestChannel channel)
|
||||
```
|
||||
Sets statistics from pre-calculated values on an `ITestChannel` instance (`channel.MinY`, `channel.MaxY`, `channel.AveY`, `channel.StdDevY`, `channel.T0Value`).
|
||||
|
||||
---
|
||||
|
||||
### TestDataSeriesModel Class
|
||||
**Namespace:** `DTS.Viewer.Graph`
|
||||
**Implements:** `IBaseModel`
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Parent` | `IGraphViewModel` | Parent view model reference. |
|
||||
| `_eventAggregator` | `IEventAggregator` | Prism event aggregator for publishing progress events. |
|
||||
| `ErrorMessage` | `string` | Error message with property change notification. |
|
||||
| `IsSaved` | `bool` | Get-only property (purpose unclear from source). |
|
||||
|
||||
#### Methods
|
||||
|
||||
```csharp
|
||||
public Task<ITestDataSeries> GetTestDataAsync(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
|
||||
```
|
||||
Async wrapper that calls synchronous `GetTestData`. Returns a single `ITestDataSeries`.
|
||||
|
||||
```csharp
|
||||
public Task<List<ITestDataSeries>> GetTestDataAsync(List<ITestChannel> channels, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
|
||||
```
|
||||
Async wrapper for batch channel processing. If `psdSettings.ShowEnvelope` is true, appends an envelope channel to results.
|
||||
|
||||
```csharp
|
||||
public List<ITestDataSeries> GetTestData(List<ITestChannel> channels, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
|
||||
```
|
||||
Synchronous batch processing. Catches `OutOfDataException` and re-throws with sample index context.
|
||||
|
||||
```csharp
|
||||
public ITestDataSeries GetTestData(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
|
||||
```
|
||||
Entry point for single channel processing, delegates to `AddTestChannelToChart`.
|
||||
|
||||
```csharp
|
||||
public TestDataSeries AddTestChannelToChart(ITestChannel channel, IChartOptionsModel chartOptions, bool bVolts, IPSDReportSettingsModel psdSettings = null)
|
||||
```
|
||||
**Primary factory method.** Reads binary channel data via `Serialization.SliceRaw.File.Reader.ReadChannelsBinaryData`, then:
|
||||
- For **FFT mode** (`chartOptions.UnitType == FFT` and no PSD settings): Sets `FFT=true`, populates `PeakFrequency`, `PeakMagnitude`, `Xvalue`, `Yvalue`.
|
||||
- For **regular time-domain**: Calculates time axis with unit conversion (ms or s), handles HIC data if present, sets stats from channel.
|
||||
- For **PSD mode**: Applies data range selection, resizes to power-of-2 length, applies optional low-pass/high-pass filters, computes PSD via `FftSharp.Transform.PSD_Welch`, calculates GRMS.
|
||||
|
||||
Returns `null` if `channel.ErrorMessage` is not empty.
|
||||
|
||||
```csharp
|
||||
private ITestDataSeries GetEnvelopeChannel(List<ITestDataSeries> data)
|
||||
```
|
||||
Creates an envelope channel by taking the maximum Y value at each frequency across all input series. Sets `ChannelId` and related fields to `Strings.EnvelopeUnique`.
|
||||
|
||||
```csharp
|
||||
private double CalculateGRMS(double[] freq, double[] psd)
|
||||
```
|
||||
Calculates Grms using numerical integration of PSD curve. Handles logarithmic slope calculation with special case for N=-1.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Array Initialization**: `Xvalue` and `Yvalue` are initialized to empty arrays (`new double[0]`), never null.
|
||||
2. **GraphColor Thread Safety**: `GraphColor` getter always creates a new `SolidColorBrush` instance; internal storage is `byte[] _graphColorARGB` to ensure thread safety (per comment referencing issue 34455).
|
||||
3. **FFT/PSD Filter Bypass**: When `chartOptions.UnitType` is `FFT` or `PSD`, `channel.SoftwareFilter` is forcibly set to `"none"` before reading data.
|
||||
4. **Statistics Format**: All statistical string properties use `"G5"` format specifier via `STAT_FORMAT` constant.
|
||||
5. **PSD Data Length**: PSD processing resizes input arrays to the next enclosing power of 2 via `Utils.GetEnclosingPower2`.
|
||||
6. **Frequency Array First Element**: In PSD processing, `freq[0]` is explicitly set to `1` after calculation.
|
||||
7. **SensorSNDisplay Logic**: Returns `Strings.Table_NA` when `SensorConstants.IsTestSpecificEmbedded(SensorSN)` returns true.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Imports (What this module depends on):
|
||||
|
||||
**TestDataSeries.cs:**
|
||||
- `DTS.Common.Enums.Sensors` - `SensorConstants` for embedded sensor detection
|
||||
- `DTS.Common.Interface` - `ITestDataSeries` interface
|
||||
- `DTS.Common.Strings` - Localized string constants
|
||||
- `System.Windows.Media` - WPF `Brush
|
||||
@@ -0,0 +1,207 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/AssemblyInfo.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/Annotations.cs
|
||||
generated_at: "2026-04-17T15:56:49.185438+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "88f7afb7b05c4748"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.Graph Properties
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides assembly metadata and JetBrains ReSharper code analysis annotations for the `DTS.Viewer.Graph` component within the DTS Viewer application. The `AssemblyInfo.cs` file defines standard .NET assembly attributes including versioning, copyright, and COM visibility settings. The `Annotations.cs` file contains a comprehensive set of custom attributes (sourced from JetBrains under MIT license) that enable enhanced static code analysis, nullability checking, and IDE assistance within the `DTS.Viewer.Graph.Annotations` namespace. These annotations have no runtime behavior but improve developer experience through compile-time hints and warnings.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### AssemblyInfo.cs - Assembly Attributes
|
||||
|
||||
| Attribute | Value |
|
||||
|-----------|-------|
|
||||
| `AssemblyTitle` | "Graph" |
|
||||
| `AssemblyDescription` | "" (empty) |
|
||||
| `AssemblyCompany` | "" (empty) |
|
||||
| `AssemblyProduct` | "Graph" |
|
||||
| `AssemblyCopyright` | "Copyright © 2017" |
|
||||
| `ComVisible` | `false` |
|
||||
| `Guid` | "61261c58-c32e-4dea-a87a-d7f956f28b4d" |
|
||||
| `AssemblyVersion` | "1.0.0.0" |
|
||||
| `AssemblyFileVersion` | "1.0.0.0" |
|
||||
|
||||
### Annotations.cs - Nullability Attributes
|
||||
|
||||
- **`CanBeNullAttribute`** - Indicates the marked element's value may be `null`. Applicable to methods, parameters, properties, delegates, fields, events, classes, interfaces, and generic parameters.
|
||||
|
||||
- **`NotNullAttribute`** - Indicates the marked element's value will never be `null`. Same applicability as `CanBeNullAttribute`.
|
||||
|
||||
- **`ItemNotNullAttribute`** - For `IEnumerable`, `Task`, or `Lazy` types, indicates collection items, `Task.Result`, or `Lazy.Value` are never `null`.
|
||||
|
||||
- **`ItemCanBeNullAttribute`** - For `IEnumerable`, `Task`, or `Lazy` types, indicates collection items, `Task.Result`, or `Lazy.Value` may be `null`.
|
||||
|
||||
### Annotations.cs - String Formatting Attributes
|
||||
|
||||
- **`StringFormatMethodAttribute(string formatParameterName)`** - Marks a method as using a format string pattern. Constructor takes the parameter name containing the format string.
|
||||
|
||||
- **`ValueProviderAttribute(string name)`** - Indicates a parameter accepts values from a limited set. Constructor takes the provider name.
|
||||
|
||||
### Annotations.cs - Property Change Notification
|
||||
|
||||
- **`NotifyPropertyChangedInvocatorAttribute`** - Marks methods used to notify property changes in `INotifyPropertyChanged` implementations. Optional constructor takes `parameterName` (string).
|
||||
|
||||
### Annotations.cs - Contract Annotations
|
||||
|
||||
- **`ContractAnnotationAttribute(string contract, bool forceFullStates = false)`** - Describes method input/output dependencies using Function Definition Table syntax. Properties: `Contract` (string), `ForceFullStates` (bool).
|
||||
|
||||
### Annotations.cs - Usage Annotations
|
||||
|
||||
- **`UsedImplicitlyAttribute`** - Marks symbols used implicitly (reflection, external libraries). Constructors accept `ImplicitUseKindFlags` and/or `ImplicitUseTargetFlags`.
|
||||
|
||||
- **`MeansImplicitUseAttribute`** - Applied to attributes to prevent marking decorated symbols as unused.
|
||||
|
||||
- **`PublicAPIAttribute`** - Marks publicly available API that should not be removed. Optional constructor takes `comment` (string).
|
||||
|
||||
### Annotations.cs - Method Behavior Attributes
|
||||
|
||||
- **`PureAttribute`** - Indicates a method makes no observable state changes.
|
||||
|
||||
- **`MustUseReturnValueAttribute`** - Indicates the return value must be used. Optional constructor takes `justification` (string).
|
||||
|
||||
- **`InstantHandleAttribute`** - Indicates a parameter is fully handled during method execution (delegates executed, enumerables enumerated).
|
||||
|
||||
- **`LinqTunnelAttribute`** - Marks pure LINQ methods with postponed enumeration.
|
||||
|
||||
- **`NoEnumerationAttribute`** - Indicates an `IEnumerable` parameter is not enumerated.
|
||||
|
||||
- **`TerminatesProgramAttribute`** - **[Obsolete]** Use `[ContractAnnotation("=> halt")]` instead.
|
||||
|
||||
### Annotations.cs - Assertion Attributes
|
||||
|
||||
- **`AssertionMethodAttribute`** - Marks a method as an assertion method.
|
||||
|
||||
- **`AssertionConditionAttribute(AssertionConditionType conditionType)`** - Marks the condition parameter of an assertion method.
|
||||
|
||||
- **`AssertionConditionType`** (enum) - Values: `IS_TRUE` (0), `IS_FALSE` (1), `IS_NULL` (2), `IS_NOT_NULL` (3).
|
||||
|
||||
### Annotations.cs - Collection Attributes
|
||||
|
||||
- **`CollectionAccessAttribute(CollectionAccessType collectionAccessType)`** - Describes how a method affects collection content.
|
||||
|
||||
- **`CollectionAccessType`** (flags enum) - Values: `None` (0), `Read` (1), `ModifyExistingContent` (2), `UpdatedContent` (6).
|
||||
|
||||
### Annotations.cs - Implicit Use Enums
|
||||
|
||||
- **`ImplicitUseKindFlags`** (flags enum) - Values: `Default`, `Access` (1), `Assign` (2), `InstantiatedWithFixedConstructorSignature` (4), `InstantiatedNoFixedConstructorSignature` (8).
|
||||
|
||||
- **`ImplicitUseTargetFlags`** (flags enum) - Values: `Default`, `Itself` (1), `Members` (2), `WithMembers` (3).
|
||||
|
||||
### Annotations.cs - ASP.NET MVC Attributes
|
||||
|
||||
- **`AspMvcActionAttribute`** - Marks MVC action parameters/methods. Optional constructor takes `anonymousProperty` (string).
|
||||
- **`AspMvcAreaAttribute`** - Marks MVC area parameters.
|
||||
- **`AspMvcControllerAttribute`** - Marks MVC controller parameters/methods.
|
||||
- **`AspMvcMasterAttribute`** - Marks MVC Master parameters.
|
||||
- **`AspMvcModelTypeAttribute`** - Marks MVC model type parameters.
|
||||
- **`AspMvcPartialViewAttribute`** - Marks MVC partial view parameters/methods.
|
||||
- **`AspMvcViewAttribute`** - Marks MVC view component parameters/methods.
|
||||
- **`AspMvcViewComponentAttribute`** - Marks MVC view component name parameters.
|
||||
- **`AspMvcViewComponentViewAttribute`** - Marks MVC view component view parameters/methods.
|
||||
- **`AspMvcActionSelectorAttribute`** - Marks MVC action name parameters in attributes.
|
||||
- **`AspMvcSuppressViewErrorAttribute`** - Disables MVC view inspections for a class/method.
|
||||
- **`AspMvcDisplayTemplateAttribute`** - Marks MVC display template parameters.
|
||||
- **`AspMvcEditorTemplateAttribute`** - Marks MVC editor template parameters.
|
||||
- **`AspMvcTemplateAttribute`** - Marks MVC template parameters.
|
||||
|
||||
### Annotations.cs - ASP.NET MVC Location Format Attributes
|
||||
|
||||
- **`AspMvcAreaMasterLocationFormatAttribute(string format)`**
|
||||
- **`AspMvcAreaPartialViewLocationFormatAttribute(string format)`**
|
||||
- **`AspMvcAreaViewLocationFormatAttribute(string format)`**
|
||||
- **`AspMvcMasterLocationFormatAttribute(string format)`**
|
||||
- **`AspMvcPartialViewLocationFormatAttribute(string format)`**
|
||||
- **`AspMvcViewLocationFormatAttribute(string format)`**
|
||||
|
||||
### Annotations.cs - ASP.NET Control Attributes
|
||||
|
||||
- **`AspChildControlTypeAttribute(string tagName, Type controlType)`**
|
||||
- **`AspDataFieldAttribute`**
|
||||
- **`AspDataFieldsAttribute`**
|
||||
- **`AspMethodPropertyAttribute`**
|
||||
- **`AspRequiredAttributeAttribute(string attribute)`**
|
||||
- **`AspTypePropertyAttribute(bool createConstructorReferences)`**
|
||||
|
||||
### Annotations.cs - Razor Attributes
|
||||
|
||||
- **`RazorSectionAttribute`** - Marks Razor section parameters/methods.
|
||||
- **`RazorImportNamespaceAttribute(string name)`** - Assembly-level, multiple allowed.
|
||||
- **`RazorInjectionAttribute(string type, string fieldName)`** - Assembly-level, multiple allowed.
|
||||
- **`RazorDirectiveAttribute(string directive)`** - Assembly-level, multiple allowed.
|
||||
- **`RazorHelperCommonAttribute`** - Method-level.
|
||||
- **`RazorLayoutAttribute`** - Property-level.
|
||||
- **`RazorWriteLiteralMethodAttribute`** - Method-level.
|
||||
- **`RazorWriteMethodAttribute`** - Method-level.
|
||||
- **`RazorWriteMethodParameterAttribute`** - Parameter-level.
|
||||
|
||||
### Annotations.cs - HTML Attributes
|
||||
|
||||
- **`HtmlElementAttributesAttribute`** - Optional constructor takes `name` (string).
|
||||
- **`HtmlAttributeValueAttribute(string name)`**
|
||||
|
||||
### Annotations.cs - XAML Attributes
|
||||
|
||||
- **`XamlItemsControlAttribute`** - Marks types with `ItemsSource` property.
|
||||
- **`XamlItemBindingOfItemsControlAttribute`** - Marks `BindingBase`-derived properties.
|
||||
|
||||
### Annotations.cs - Other Attributes
|
||||
|
||||
- **`LocalizationRequiredAttribute(bool required = true)`** - Indicates localization requirements.
|
||||
|
||||
- **`CannotApplyEqualityOperatorAttribute`** - Disallows `==`/`!=` operators (except with `null`).
|
||||
|
||||
- **`BaseTypeRequiredAttribute(Type baseType)`** - Applied to attributes to require implementers to inherit/implement a type.
|
||||
|
||||
- **`ProvidesContextAttribute`** - Indicates a context value provider.
|
||||
|
||||
- **`PathReferenceAttribute`** - Marks file/folder path parameters. Optional constructor takes `basePath` (string).
|
||||
|
||||
- **`SourceTemplateAttribute`** - Marks extension methods as source templates.
|
||||
|
||||
- **`MacroAttribute`** - Specifies macros for source template parameters. Properties: `Expression` (string), `Editable` (int), `Target` (string).
|
||||
|
||||
- **`RegexPatternAttribute`** - Marks regex pattern parameters.
|
||||
|
||||
- **`NoReorderAttribute`** - Prevents member reordering in the marked type.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Assembly Versioning**: Both `AssemblyVersion` and `AssemblyFileVersion` are fixed at "1.0.0.0".
|
||||
- **COM Visibility**: `ComVisible` is `false`, making types invisible to COM components by default.
|
||||
- **Namespace Consistency**: All annotation attributes reside in `DTS.Viewer.Graph.Annotations` namespace.
|
||||
- **Attribute Usage Constraints**: Each attribute has specific `AttributeUsage` constraints defining valid targets (method, parameter, property, etc.).
|
||||
- **License Requirement**: The `Annotations.cs` file is MIT licensed from JetBrains; the copyright notice must be preserved in copies.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Imports (AssemblyInfo.cs)
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
### Imports (Annotations.cs)
|
||||
- `System`
|
||||
|
||||
### Downstream Dependencies
|
||||
- **Unclear from source alone** - The annotation attributes are designed for consumption by JetBrains ReSharper and Rider IDEs. The `DTS.Viewer.Graph` assembly likely contains graph-related functionality used by other modules in the DTS Viewer application, but the actual consumers cannot be determined from these files alone.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`TerminatesProgramAttribute` is Obsolete**: This attribute is marked `[Obsolete]` with guidance to use `[ContractAnnotation("=> halt")]` instead. New code should not use it.
|
||||
|
||||
- **Annotations are Compile-Time Only**: All attributes in `Annotations.cs` are for static analysis only. They have no runtime behavior and will not affect execution.
|
||||
|
||||
- **Pragma Warnings Disabled**: The `Annotations.cs` file disables warning 1591 (missing XML documentation) and includes multiple ReSharper directive disables at the file level.
|
||||
|
||||
- **Empty Assembly Metadata**: Several assembly attributes (`AssemblyDescription`, `AssemblyConfiguration`, `AssemblyCompany`) are empty strings, which may indicate incomplete configuration.
|
||||
|
||||
- **Hardcoded Copyright Year**: The copyright is hardcoded to 2017; this may need updating for newer releases.
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:11:57.317533+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "324d8a7946627095"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### Purpose
|
||||
This module provides localization support for the Graph module through a XAML markup extension and strongly-typed resource access. It follows the same pattern as the ViewerSettings/Resources module but contains graph-specific localized strings for error messages, status messages, and save operation feedback related to chart and report operations.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**TranslateExtension** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string from `StringResources.ResourceManager.GetString(_key)`. Returns `"#stringnotfound#"` if key is null/empty, or `"#stringnotfound# " + _key` if the key is not found in resources.
|
||||
|
||||
**StringResources** (auto-generated)
|
||||
- `ResourceManager` - Static property returning the cached `ResourceManager` instance for the `"DTS.Viewer.Graph.Resources.StringResources"` resource name.
|
||||
- `Culture` - Static property for getting/setting the `CultureInfo` for resource lookups.
|
||||
- `BadDataFromCustomFilter` - Error message for custom filter frequency out of bounds (includes format placeholders `{0}`, `{1}`
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/GraphView.xaml.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/TestDataView.xaml.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/View/TestDataSeriesView.xaml.cs
|
||||
generated_at: "2026-04-17T15:54:31.440283+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "00811c8a21090fcd"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.Graph Views
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides WPF view components for graph and chart visualization within the DTS Viewer application. It contains three partial classes—`GraphView`, `TestDataView`, and `TestDataSeriesView`—that serve as code-behind files for their respective XAML views. These views implement interfaces from `DTS.Common.Interface` and provide chart rendering, user interaction handling, and export functionality (PDF and CSV) for test data series visualization.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### GraphView
|
||||
**Signature:** `public partial class GraphView : IGraphView`
|
||||
|
||||
- **`GraphView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
|
||||
|
||||
---
|
||||
|
||||
### TestDataView
|
||||
**Signature:** `public partial class TestDataView : ITestDataView`
|
||||
|
||||
- **`TestDataView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
|
||||
|
||||
---
|
||||
|
||||
### TestDataSeriesView
|
||||
**Signature:** `public partial class TestDataSeriesView : ITestDataSeriesView`
|
||||
|
||||
- **`TestDataSeriesView()`** - Constructor. Calls `InitializeComponent()` to load the XAML-defined UI.
|
||||
|
||||
- **`bool SaveReportToPDF(string directory)`** - Generates a PDF report containing the chart image and a gRMS data table. Returns `true` on success, `false` on failure. Creates the directory if it does not exist. Logs success/failure via `APILogger`.
|
||||
|
||||
- **`bool SaveReportToCSV(string directory)`** - Exports chart data to a CSV file with frequency and PSD values. Returns `true` on success, `false` on failure. Creates the directory if it does not exist. Logs success/failure via `APILogger`.
|
||||
|
||||
---
|
||||
|
||||
### AxisExtension (Static Class)
|
||||
**Signature:** `public static class AxisExtension`
|
||||
|
||||
- **`double GetDispMin(this Axis axis)`** - Extension method that calculates the displayed minimum value based on `ActualMin`, `ActualMax`, `Value`, and `Scale` properties.
|
||||
|
||||
- **`double GetDispMax(this Axis axis)`** - Extension method that calculates the displayed maximum value based on `ActualMin`, `ActualMax`, `Value`, and `Scale` properties.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **`SaveReportToPDF`**: The `directory` parameter must not be null, empty, or whitespace; otherwise, a `DirectoryNotFoundException` is thrown.
|
||||
- **`SaveReportToPDF`**: `MainChart.DataContext` must be castable to `TestDataSeriesViewModel`; a direct cast is performed without null checking.
|
||||
- **`SaveReportToPDF`**: `GraphDataSeries` must contain at least one element (accesses `dataSeries[0]` for test setup name and test ID).
|
||||
- **`SaveReportToCSV`**: All data series in `GraphDataSeries` must have `Xvalue` and `Yvalue` arrays of equal or greater length than
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
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. |
|
||||
|
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/GraphListModule.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.GraphList/ExportGraphListModule.cs
|
||||
generated_at: "2026-04-17T15:55:51.678467+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6e3f2e8fbad61bee"
|
||||
---
|
||||
|
||||
# Documentation: GraphList and ExportGraphList Modules
|
||||
|
||||
## 1.
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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.
|
||||
|
||||
---
|
||||
@@ -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)`**:
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/NavigationModule.cs
|
||||
generated_at: "2026-04-17T16:45:37.366507+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2085d49a3bec9fca"
|
||||
---
|
||||
|
||||
# NavigationModule Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module serves as the Prism-based navigation component for the DTS Viewer application. It is responsible for registering the navigation view and view-model with the Unity dependency injection container and providing assembly-level metadata (name, image, region, and group) that the main application uses to display and categorize available modules. The module follows the Prism modularity pattern and integrates with the larger DTS Viewer shell.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `NavigationModule` Class
|
||||
Implements `Prism.Modularity.IModule`. The primary module entry point.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `NavigationModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. |
|
||||
| `Initialize` | `void Initialize()` | Registers `INavigationView` → `NavigationView` and `INavigationViewModel` → `NavigationViewModel` with the Unity container. |
|
||||
| `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation (no post-initialization logic). |
|
||||
| `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()` to perform type registration. |
|
||||
|
||||
### `NavigationPropertiesNameAttribute` Class
|
||||
Extends `TextAttribute`. Assembly-level attribute providing the module's display name.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `NavigationPropertiesNameAttribute()` | Default constructor; initializes `_assemblyName` to `AssemblyNames.Navigation.ToString()`. |
|
||||
| Constructor | `NavigationPropertiesNameAttribute(string s)` | Overload accepting a string parameter (parameter is unused). |
|
||||
| `AssemblyName` | `override string AssemblyName { get; }` | Returns `_assemblyName`. |
|
||||
| `GetAttributeType` | `override Type GetAttributeType()` | Returns `typeof(TextAttribute)`. |
|
||||
| `GetAssemblyName` | `override string GetAssemblyName()` | Returns `AssemblyName` property value. |
|
||||
|
||||
### `NavigationPropertiesImageAttribute` Class
|
||||
Extends `ImageAttribute`. Assembly-level attribute providing the module's image and categorization metadata.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `NavigationPropertiesImageAttribute()` | Default constructor; initializes `_img` via `AssemblyInfo.GetImage()
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:45:41.819326+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4042d03e7c7c8fac"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.Navigation Assembly Configuration
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This file provides assembly-level metadata for the `DTS.Viewer.Navigation` module, which appears to be a navigation component within the larger DTS Viewer application. It defines version information, COM visibility settings, and identification attributes using the traditional .NET Framework assembly attribute pattern. This module exists to configure build output metadata and control COM interop visibility for the navigation assembly.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
This file contains no public classes, methods, or functions. It defines only assembly-level attributes:
|
||||
|
||||
| Attribute | Value |
|
||||
|-----------|-------|
|
||||
| `AssemblyTitle` | `"DTS.Viewer.Navigation"` |
|
||||
| `AssemblyDescription` | `""` (empty) |
|
||||
| `AssemblyConfiguration` | `""` (empty) |
|
||||
| `AssemblyCompany` | `""` (empty) |
|
||||
| `AssemblyProduct` | `"DTS.Viewer.Navigation"` |
|
||||
| `AssemblyCopyright` | `"Copyright © 2017"` |
|
||||
| `AssemblyTrademark` | `""` (empty) |
|
||||
| `AssemblyCulture` | `""` (empty) |
|
||||
| `ComVisible` | `false` |
|
||||
| `Guid` | `"237c6e9f-9118-4bec-a55a-e194232ac330"` |
|
||||
| `AssemblyVersion` | `"1.0.0.0"` |
|
||||
| `AssemblyFileVersion` | `"1.0.0.0"` |
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **COM Visibility**: All types in this assembly are not visible to COM components by default (`ComVisible(false)`). Individual types must explicitly set `ComVisible(true)` if COM exposure is required.
|
||||
- **Version Consistency**: Both `AssemblyVersion` and `AssemblyFileVersion` are set to `"1.0.0.0"` and should be updated in tandem for releases.
|
||||
- **Assembly Identity**: The GUID `237c6e9f-9118-4bec-a55a-e194232ac330` uniquely identifies this assembly's type library if exposed to COM.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
**This module depends on:**
|
||||
- `System.Reflection` - Provides `AssemblyTitleAttribute`, `AssemblyDescriptionAttribute`, `AssemblyConfigurationAttribute`, `AssemblyCompanyAttribute`, `AssemblyProductAttribute`, `AssemblyCopyrightAttribute`, `AssemblyTrademarkAttribute`, `AssemblyCultureAttribute`, `AssemblyVersionAttribute`
|
||||
- `System.Runtime.CompilerServices` - Imported but no attributes from this namespace are used in this file
|
||||
- `System.Runtime.InteropServices` - Provides `ComVisibleAttribute`, `GuidAttribute`
|
||||
|
||||
**What depends on this module:**
|
||||
- Cannot be determined from this file alone. This is a configuration file for the assembly build process; other modules within
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/View/NavigationItem.xaml.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/View/NavigationView.xaml.cs
|
||||
generated_at: "2026-04-17T16:11:50.604475+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6747a61a8fe21d2c"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`TranslateExtension` class** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
|
||||
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
|
||||
|
||||
**`StringResources` class** (internal, auto-generated)
|
||||
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
|
||||
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
|
||||
- `static string Search { get; }` - Localized string resource for "Search".
|
||||
|
||||
### Invariants
|
||||
- `ProvideValue` always returns a non-null string.
|
||||
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
|
||||
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
|
||||
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
|
||||
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
|
||||
|
||||
### Gotchas
|
||||
- `StringResources`
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Navigation/ViewModel/NavigationViewModel.cs
|
||||
generated_at: "2026-04-17T16:30:27.299010+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0e6a43a095627fba"
|
||||
---
|
||||
|
||||
# ViewModel
|
||||
|
||||
### Purpose
|
||||
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
|
||||
|
||||
**Constructor:**
|
||||
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
|
||||
|
||||
**Properties:**
|
||||
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
|
||||
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
|
||||
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
|
||||
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
|
||||
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
|
||||
- `IsBusy` (`bool`) - Busy state indicator.
|
||||
- `IsDirty` (`bool`) - Dirty state indicator.
|
||||
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
|
||||
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
|
||||
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
|
||||
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
|
||||
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
|
||||
|
||||
**Methods:**
|
||||
- `void Initialize()` - Empty override.
|
||||
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
|
||||
- `void PublishChanges()` - Empty method (implementation appears incomplete).
|
||||
|
||||
**Events:**
|
||||
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
|
||||
|
||||
### Invariants
|
||||
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/TestModificationModule.cs
|
||||
generated_at: "2026-04-17T16:13:23.029316+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "99ff29164bceb605"
|
||||
---
|
||||
|
||||
# DTS.Viewer.TestModification
|
||||
|
||||
### Purpose
|
||||
This module serves as the bootstrapper for the "TestModification" feature within the DTS Viewer application. It integrates the feature into the Prism modular architecture by registering its associated View and ViewModel with the Unity dependency injection container. Additionally, it defines assembly-level metadata attributes that expose the
|
||||
@@ -0,0 +1,189 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/Enums.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/TestModificationModel.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Model/TestModelManipulation.cs
|
||||
generated_at: "2026-04-17T15:55:05.952766+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8c9823f92db20638"
|
||||
---
|
||||
|
||||
# Test Modification Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides functionality for modifying test data within the DTS Viewer application. It enables users to adjust channel parameters (sensitivity, EU multiplier/offset, T0 time shifts, line fit, software filters, data flags, and descriptions) and persist those changes to both binary channel files (`.chn`) and test configuration files (`.dts`). The module implements a backup-and-restore system to allow reverting modifications, and tracks modification state to indicate unsaved changes to the user interface.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Enums.cs
|
||||
|
||||
#### `Keys` Enum
|
||||
```csharp
|
||||
public enum Keys
|
||||
{
|
||||
ApplyShiftT0ModsTestOnly // System Setting for whether to restrict "Shift T0" test modifications to "Test" only.
|
||||
}
|
||||
```
|
||||
A configuration key enum used to control T0 modification behavior restrictions.
|
||||
|
||||
---
|
||||
|
||||
### TestModificationModel.cs
|
||||
|
||||
#### `TestModificationModel` Class
|
||||
Implements `ITestModificationModel` and provides `INotifyPropertyChanged` for data binding.
|
||||
|
||||
**Calibration Properties:**
|
||||
- `string CalDate` — Read-only; returns `Cal.CalibrationDate.ToShortDateString()` or empty string if `Cal` is null.
|
||||
- `string ModifyDate` — Read-only; returns formatted modify date/time or empty string if `Cal` is null.
|
||||
- `double CalSensitivity` — Gets/sets sensitivity from `Cal.Records.Records[0].Sensitivity`; returns `double.NaN` if unavailable.
|
||||
- `bool ProportionalToExcitation` — Read-only; returns `Cal.IsProportional`.
|
||||
- `bool NonLinear` — Read-only; returns `Cal.NonLinear`.
|
||||
- `bool ShowSensorCal` — Read-only; returns true if `Cal` and `Sensor` are non-null and `NonLinear` is false.
|
||||
- `ISensorCalDbRecord Cal` — Gets/sets the latest calibration record; triggers `RebindCalProperties()` on set.
|
||||
- `ISensorDbRecord Sensor` — Gets/sets the sensor record; triggers `RebindCalProperties()` on set.
|
||||
|
||||
**Channel Selection:**
|
||||
- `ITestChannel SelectedChannel` — The currently selected channel for modification.
|
||||
|
||||
**Modification Value Properties:**
|
||||
- `string Description` — Channel description text.
|
||||
- `double EuMultiplier` — EU multiplier value.
|
||||
- `double EuOffset` — EU offset value.
|
||||
- `double T0` — T0 time shift value (milliseconds).
|
||||
- `double T1` — Line fit start point (milliseconds).
|
||||
- `double T2` — Line fit end point (milliseconds).
|
||||
- `double Sensitivity` — Channel sensitivity value.
|
||||
- `IFilterClass SelectedFilter` — Selected software filter; defaults to `FilterClass(FilterClassType.Unfiltered)`.
|
||||
- `DataFlag SelectedDataFlag` — Selected data flag; defaults to `DataFlag.None`.
|
||||
- `T0Mode T0Mode` — T0 application mode (`T0Mode.Test` or `T0Mode.DAS`); defaults to `T0Mode.Test`.
|
||||
|
||||
**Modification State Properties (Read-only):**
|
||||
- `bool IsModifiedDescription` — True if `Description` differs from `SelectedChannel.ChannelDescriptionString`.
|
||||
- `bool IsModifiedEuMultiplier` — True if `EuMultiplier` differs from `SelectedChannel.Multiplier`.
|
||||
- `bool IsModifiedEuOffset` — True if `EuOffset` differs from `SelectedChannel.UserOffsetEu`.
|
||||
- `bool IsModifiedT0` — True if `T0` is not zero.
|
||||
- `bool IsModifiedLineFit` — True if `T1` or `T2` is not zero.
|
||||
- `bool IsModifiedSensitivity` — True if `Sensitivity` differs from `SelectedChannel.Sensitivity`.
|
||||
- `bool IsModifiedFilter` — True if `SelectedFilter` differs from the channel's current software filter.
|
||||
- `bool IsModifiedDataFlag` — True if `SelectedDataFlag` differs from `SelectedChannel.DataFlag`.
|
||||
- `bool IsModified` — Aggregate flag indicating any modification exists and `SelectedChannel` is non-null.
|
||||
|
||||
**Control Enable Properties:**
|
||||
- `bool EnableSensitivityControl` — Controls UI sensitivity control visibility.
|
||||
- `bool EnableLineFitControl` — Controls UI line fit control visibility.
|
||||
- `bool EnableEUOffsetControl` — Controls UI EU offset control visibility.
|
||||
- `bool EnableEUMultiplierControl` — Controls UI EU multiplier control visibility.
|
||||
- `bool EnableFilterControl` — Controls UI filter control visibility.
|
||||
- `bool EnableDescriptionControl` — Controls UI description control visibility.
|
||||
- `bool IsDataFlagEnabled` — Controls UI data flag control visibility.
|
||||
- `bool IsT0Enabled` — Controls UI T0 control visibility.
|
||||
- `bool IsT0ModeTestOnly` — When true, forces `T0Mode` to `T0Mode.Test`.
|
||||
|
||||
**Other Properties:**
|
||||
- `ITestModificationViewModel Parent` — Reference to parent view model.
|
||||
- `bool IsSaved` — Read-only property (no setter visible in source).
|
||||
|
||||
**Methods:**
|
||||
- `void OnPropertyChanged(string propertyName)` — Raises `PropertyChanged` event and recalculates `IsModified`.
|
||||
- `bool ValidateT0()` — Validates T0 falls within the channel's dataset time range; returns true if `SelectedChannel` or `ParentModule` is null.
|
||||
|
||||
**Commands:**
|
||||
- `DelegateCommand UpdateDatabaseCommand` — Executes `Parent.UpdateDatabaseMethod()`.
|
||||
|
||||
---
|
||||
|
||||
### TestModelManipulation.cs
|
||||
|
||||
#### `TestModelManipulation` Class
|
||||
Static utility class for file-based test modification operations.
|
||||
|
||||
**Constants:**
|
||||
- `double UNUSED_START_TIME = 0`
|
||||
- `int UNUSED_DATA_COLLECTION_LENGTH = 0`
|
||||
- `string BackupHeaderExtension = ".header.bak"` (private)
|
||||
- `string BackupFileExtension = ".bak"` (private)
|
||||
|
||||
**Public Methods:**
|
||||
|
||||
- `static void UndoAllModification(ITestModificationModel model)` — Reverts all modifications by restoring `.dts` and all binary channel files from backups. Publishes `ChannelsModificationNotification`, `RefreshTestRequestEvent`, and `TestModificationEvent`.
|
||||
|
||||
- `static bool BackupExists(ITestModificationModel model)` — Returns true if either `.dts.bak` or `.chn.bak` backup files exist for the model's selected channel.
|
||||
|
||||
- `static void BackupChannelIfNeeded(Test.Module.Channel testModuleChannel, bool headerOnly)` — Creates backup of channel binary file. If `headerOnly` is true, backs up only the header portion; otherwise backs up the entire file.
|
||||
|
||||
- `static bool SaveModification(ITestModificationModel model, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)` — Persists all modifications to disk. Returns true on success. Handles T0 (Test and DAS modes), line fit, filter, sensitivity, EU multiplier/offset, description, and data flag modifications.
|
||||
|
||||
- `static bool SaveModificationDataFlag(ITestModificationModel model)` — Saves only data flag modifications to disk.
|
||||
|
||||
- `static void ApplyLineFit(ITestModificationModel model, Test.Module.Channel channel)` — Applies linear interpolation between `T1` and `T2` sample indices on the channel's ADC data.
|
||||
|
||||
- `static void PreviewLineFit(ITestModificationModel model)` — Publishes `ChannelsModificationLineFitNotification` with calculated start/end indices without modifying disk.
|
||||
|
||||
- `static void UndoModification(ITestModificationModel model)` — Re-populates model from channel and publishes `ChannelsModificationNotification`.
|
||||
|
||||
- `static void PopulateFromChannel(ITestModificationModel model)` — Initializes model properties from `SelectedChannel` values.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Backup File Semantics**: Backup files (`.bak` and `.header.bak`) represent the *original* unmodified files. Once a backup exists, it is never overwritten by subsequent modifications—this preserves the ability to revert to the original state.
|
||||
|
||||
2. **IsModified Aggregation**: `IsModified` is true if and only if at least one `IsModified*` property is true AND `SelectedChannel` is non-null.
|
||||
|
||||
3. **T0Mode Restriction**: When `IsT0ModeTestOnly` is true, `T0Mode` setter forces the value to `T0Mode.Test` regardless of the input value.
|
||||
|
||||
4. **Calibration Property Dependencies**: `CalSensitivity`, `ProportionalToExcitation`, `NonLinear`, `ShowSensorCal`, `CalDate`, and `ModifyDate` all depend on `Cal` being non-null; they return default values (`false`, `NaN`, empty string) when `Cal` is null.
|
||||
|
||||
5. **Line Fit Index Ordering**: In `ApplyLineFit`, if `startIndex > endIndex`, the values are swapped before processing.
|
||||
|
||||
6. **T0 Validation Range**: `ValidateT0()` returns `true` (valid) if `SelectedChannel` or `ParentModule` is null, treating missing data as "no constraint."
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On:
|
||||
- `DTS.Common` — Core utilities and interfaces
|
||||
- `DTS.Common.Classes.Sensors` — Sensor-related classes
|
||||
- `DTS.Common.Enums.Sensors` — Sensor enumerations including `DataFlag`, `T0Mode`
|
||||
- `DTS.Common.Interface` — Core interfaces including `ITestChannel`
|
||||
- `DTS.Common.Interface.Sensors` — Sensor interfaces including `ISensorCalDbRecord`, `ISensorDbRecord`
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters` — `IFilterClass`, `FilterClass`, `FilterClassType`
|
||||
- `DTS.Common.Events` — Event types including `TestModificationEvent`, `TestModificationArgs`, `ChannelsModificationNotification`, `RefreshTestRequestEvent`, `ChannelsModificationLineFitNotification`, `LineFitArgs`
|
||||
- `DTS.Common.Settings` — `SettingsDB` for global configuration values
|
||||
- `DTS.Common.Utilities.Logging` — `APILogger`
|
||||
- `DTS.Common.ISO` — `IsoCode` class
|
||||
- `DTS.Serialization` — Serialization utilities including `SliceRaw.File`
|
||||
- `DTS.SensorDB` — Sensor database interfaces
|
||||
- `Prism.Commands` — `DelegateCommand`
|
||||
- `Prism.Ioc` — `ContainerLocator`
|
||||
- `Prism.Events` — `IEventAggregator`
|
||||
|
||||
### What Depends On This Module:
|
||||
- Not determinable from the provided source files alone.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Namespace Mismatch**: `TestModificationModel.cs` is declared in namespace `DTS.Viewer.ChartOptions.Model` despite residing in `DTS.Viewer.TestModification/Model/`. This may cause confusion when locating the class.
|
||||
|
||||
2. **ReSharper Suppressions**: The `TestModificationModel.cs` file contains multiple ReSharper suppressions (`InconsistentNaming`, `RedundantDefaultMemberInitializer`, `CheckNamespace`, `UnassignedGetOnlyAutoProperty`), suggesting known code style deviations.
|
||||
|
||||
3. **IsSaved Property Never Set**: The `IsSaved` property has a getter but no visible setter or initialization in the provided source, making its purpose unclear.
|
||||
|
||||
4. **Backup Strategy Complexity**: Binary channels can be backed up in two ways (header-only vs. full file). The `BackupChannelIfNeeded` method handles conversion between these modes, but developers should be aware that a header backup may be promoted to a full backup if subsequent modifications require it.
|
||||
|
||||
5. **T0 DAS Mode Scope**: When `T0Mode.DAS` is used, T0 changes are applied to all channels on the same DAS (matching `BaseSerialNumber`), not just the selected channel. This is a broader scope than might be expected.
|
||||
|
||||
6. **Line Fit Overwrites Data**: `ApplyLineFit` permanently replaces ADC data between T1 and T2 with linearly interpolated values. There is no undo mechanism specific to line fit beyond the full file restore.
|
||||
|
||||
7. **File Encoding Assumption**: `WriteDTSFileChanges` forces UTF-16 encoding for `.dts` files. The code catches exceptions and falls back to `Encoding.Default`, but this fallback could produce files incompatible with other consumers.
|
||||
|
||||
8. **Thread.Sleep in File Writing**: `WriteDTSFileChanges` includes a 10ms `Thread.Sleep()` after writing, suggesting a timing-related workaround for file system operations.
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:20.043300+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "941237c5da47e463"
|
||||
---
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T15:55:56.221210+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9f4954f34f258eac"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.TestModification.Resources
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides localization infrastructure for the DTS Viewer TestModification feature. It combines a WPF XAML markup extension (`TranslateExtension`) with an auto-generated strongly-typed resource accessor (`StringResources`) to enable declarative string localization in XAML views. The module abstracts .NET resource management behind a simple key-based lookup system that gracefully handles missing resources by returning visible error indicators rather than throwing exceptions.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TranslateExtension (class)
|
||||
|
||||
**Namespace:** `DTS.Viewer.TestModification`
|
||||
|
||||
A WPF markup extension for use in XAML bindings to retrieve localized strings at runtime.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. The `key` parameter is stored in a readonly field. |
|
||||
| ProvideValue | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for the stored key. Returns `#stringnotfound#` if key is null or empty. Returns `#stringnotfound# <key>` if the resource lookup returns null. |
|
||||
|
||||
### StringResources (internal
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/View/TestModificationView.xaml.cs
|
||||
generated_at: "2026-04-17T16:13:20.043811+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "879e0de19782043c"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### 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
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestModification/ViewModel/TestModificationViewModel.cs
|
||||
generated_at: "2026-04-17T15:59:06.360686+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7c56b83b77bf5525"
|
||||
---
|
||||
|
||||
# Documentation: TestModificationViewModel
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`TestModificationViewModel` is a Prism-based ViewModel that manages the test modification UI panel in the DTS Viewer application. It enables users to modify test data properties (T0 timing, sensitivity, line fit, EU multiplier/offset, filters, data flags) for selected channels, persist those modifications to files, and optionally update sensor calibration data back to the Sensor Database. The module coordinates between the UI, event-driven channel selection, and the `TestModelManipulation` helper class for actual data operations.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Constructor
|
||||
```csharp
|
||||
public TestModificationViewModel(ITestModificationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
```
|
||||
Initializes the ViewModel, sets up the View's DataContext, creates interaction requests, and subscribes to `RaiseNotification`, `GraphSelectedChannelsNotification`, `ShiftT0Event`, and `SetUseZeroForUnfilteredEvent` events.
|
||||
|
||||
### Public Methods
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `UpdateDatabaseMethod` | `void UpdateDatabaseMethod()` | Updates calibration in the Sensor Database. Sets `CalibrationId = -1`, updates `ModifyDate` to `DateTime.Now`, creates a `SensorCalibration` from `Model.Cal`, and inserts via `DbOperations.SensorCalibrationsInsert`. Refreshes `Model.Cal` from latest database record. |
|
||||
| `Initialize` | `void Initialize()` | Empty override. |
|
||||
| `Initialize` | `void Initialize(object parameter)` | Sets `Parent` property from parameter cast to `IBaseViewModel`. |
|
||||
| `PublishChanges` | `void PublishChanges()` | If not populating and `Model.IsModifiedDataFlag` is true, immediately saves data flag modification via `TestModelManipulation.SaveModificationDataFlag`. Publishes `TestModificationChangedEvent` with the Model. |
|
||||
|
||||
### Commands
|
||||
|
||||
| Command | Method | Description |
|
||||
|---------|--------|-------------|
|
||||
| `PreviewCommand` | `PreviewMethod()` | Calls `TestModelManipulation.PreviewLineFit(Model)`. |
|
||||
| `WriteCommand` | `WriteMethod()` | Validates T0 if modified, prompts user with Yes/No dialog, retrieves `UseISOCodeFilterMapping` setting, and calls `TestModelManipulation.SaveModification`. Updates `IsBackedUp`. |
|
||||
| `UndoCommand` | `UndoMethod()` |
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/TestSummaryListModule.cs
|
||||
generated_at: "2026-04-17T16:13:30.841077+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b15af4c76c8ec52e"
|
||||
---
|
||||
|
||||
# DTS.Viewer.TestSummaryList
|
||||
|
||||
### 1. Purpose
|
||||
This module serves as the entry point for the "Test Summary List" feature within the DTS Viewer application. It is a Prism Module responsible for registering its associated View (`TestSummaryListView`) and ViewModel (`TestSummaryViewListModel`) with the Unity dependency injection container. It also provides assembly-level metadata (name, image, region) to the main application shell for display and navigation purposes.
|
||||
|
||||
### 2. Public Interface
|
||||
* **`TestSummaryListModule` (Class)**
|
||||
* `TestSummaryListModule(IUnityContainer unityContainer)`: Constructor that accepts the Unity container for dependency injection.
|
||||
* `RegisterTypes(IContainerRegistry containerRegistry)`: Invokes `Initialize
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Model/TestSummaryModel.cs
|
||||
generated_at: "2026-04-17T16:13:21.102247+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d37e74a48fb5e9de"
|
||||
---
|
||||
|
||||
# Model
|
||||
|
||||
### Purpose
|
||||
This module contains `TestSummaryModel`, the data model responsible for loading and managing test summary data from `.dts` files. It coordinates asynchronous file system operations, event publication for UI state management (busy indicators, status updates), and test selection logic. The model acts as a bridge between file-based test metadata and the view model layer.
|
||||
|
||||
### Public
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:21.100385+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3c0296d679a84b04"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains assembly-level metadata for the `DTS.Viewer.Test` assembly. It provides versioning, copyright, and COM visibility configuration using standard .NET Framework assembly attributes. This is a boilerplate configuration module with no runtime logic.
|
||||
|
||||
### Public Interface
|
||||
No public types are exposed by this module. It contains only assembly-level attributes:
|
||||
|
||||
- **`AssemblyTitle`**: "DTS.Viewer.Test"
|
||||
- **`AssemblyDescription`**: Empty
|
||||
- **`AssemblyVersion`**: "1.0.0.0"
|
||||
- **`AssemblyFileVersion`**: "1.0.0.0"
|
||||
- **`ComVisible`**: false
|
||||
- **`Guid`**: "b2b2b862-1b93-476a-8246-91e1310c7ec7"
|
||||
|
||||
### Invariants
|
||||
- Assembly version is fixed at 1.0.0.0; manual updates required for version increments.
|
||||
- COM visibility is disabled for all types in this assembly.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on:** `System.Reflection`, `System.Runtime.CompilerServices`, `System.Runtime.InteropServices` (standard .NET Framework assemblies)
|
||||
- **Depended on by:** Not applicable; this is configuration metadata.
|
||||
|
||||
### Gotchas
|
||||
- The `AssemblyTitle` is "DTS.Viewer.Test" while the module path suggests "DTS.Viewer.TestSummaryList". This discrepancy may indicate a rename occurred without updating assembly metadata, or the title attribute is intentionally generic.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/StringResources.ja.Designer.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T15:54:29.404798+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6473ce1c8faeb7d4"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.TestSummaryList.Resources
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides localization infrastructure for the DTS Viewer TestSummaryList feature. It consists of a strongly-typed resource accessor class (`StringResources`) that wraps .NET resource manager functionality for retrieving localized UI strings, and a XAML markup extension (`TranslateExtension`) that enables declarative resource lookups directly in XAML bindings. The module centralizes all user-facing text for test summary operations including browsing, sorting, filtering, and displaying test metadata.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `TranslateExtension` (public class)
|
||||
|
||||
**Namespace:** `DTS.Viewer.TestSummaryList`
|
||||
|
||||
**Inheritance:** `MarkupExtension`
|
||||
|
||||
A XAML markup extension for retrieving localized strings from the resource manager.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. |
|
||||
| `ProvideValue` |
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/View/TestSummaryView.xaml.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/View/TestSummaryListView.xaml.cs
|
||||
generated_at: "2026-04-17T16:11:50.602393+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3e8b4564b60b26e9"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides localization/internationalization support for the DTS.Viewer.Filter module. It enables XAML-based string resource lookup through a markup extension pattern, allowing UI elements to display localized strings at design-time and runtime without code-behind resource lookups.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`TranslateExtension` class** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or a fallback error string if not found.
|
||||
- Constant: `NotFound = "#stringnotfound#"` - Fallback prefix used when resource lookup fails.
|
||||
|
||||
**`StringResources` class** (internal, auto-generated)
|
||||
- `static ResourceManager ResourceManager { get; }` - Lazily-initialized, cached ResourceManager for the `DTS.Viewer.Filter.Resources.StringResources` resource bundle.
|
||||
- `static CultureInfo Culture { get; set; }` - Overrides the current thread's CurrentUICulture for resource lookups.
|
||||
- `static string Search { get; }` - Localized string resource for "Search".
|
||||
|
||||
### Invariants
|
||||
- `ProvideValue` always returns a non-null string.
|
||||
- If `_key` is null or empty, `ProvideValue` returns exactly `NotFound` ("#stringnotfound#").
|
||||
- If the resource key does not exist in the resource bundle, `ProvideValue` returns `NotFound + " " + _key` (e.g., "#stringnotfound# MissingKey").
|
||||
- `ResourceManager` is lazily instantiated on first access and cached thereafter.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System`, `System.Windows.Markup`, `System.Resources`, `System.Globalization`.
|
||||
- **Depended on by**: XAML views within the DTS.Viewer.Filter module that use `{local:Translate KeyName}` syntax.
|
||||
|
||||
### Gotchas
|
||||
- `StringResources`
|
||||
@@ -0,0 +1,112 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/ViewModel/TestSummaryViewModel.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.TestSummaryList/ViewModel/TestSummaryViewListModel.cs
|
||||
generated_at: "2026-04-17T15:56:32.359697+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "170b78c49a4abb43"
|
||||
---
|
||||
|
||||
# Documentation: TestSummaryList ViewModels
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides two ViewModel implementations (`TestSummaryViewModel` and `TestSummaryViewListModel`) for managing and displaying test summary data within the DTS Viewer application. Both classes implement `ITestSummaryListViewModel` and serve as intermediaries between test summary data models and their associated views, handling user interactions, event aggregation for cross-component communication, data filtering, and sorting. The module exists to support the Prism-based MVVM architecture, coordinating test summary selection, folder/file data loading, and notification publishing to other application components.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TestSummaryViewModel
|
||||
|
||||
**Constructor:**
|
||||
```csharp
|
||||
public TestSummaryViewModel(ITestSummaryListView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
```
|
||||
Initializes the ViewModel, sets the view's DataContext, creates interaction requests, and subscribes to `RaiseNotification` and `DataFolderChangedEvent` events.
|
||||
|
||||
**Methods:**
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Initialize` | `void Initialize()` | Empty override. |
|
||||
| `Initialize` | `void Initialize(object parameter)` | Casts parameter to `IBaseWindowModel` and assigns to `Parent`. |
|
||||
| `Activated` | `void Activated()` | Throws `NotImplementedException`. |
|
||||
| `Cleanup` | `void Cleanup()` | Throws `NotImplementedException`. |
|
||||
| `CleanupAsync` | `Task CleanupAsync()` | Throws `NotImplementedException`. |
|
||||
| `InitializeAsync` | `Task InitializeAsync()` | Throws `NotImplementedException`. |
|
||||
| `InitializeAsync` | `Task InitializeAsync(object parameter)` | Throws `NotImplementedException`. |
|
||||
| `PublishSelectedTestSummaryList` | `void PublishSelectedTestSummaryList()` | Publishes `TestSummaryChangeNotification` and `TestSelectedChangedEvent` events with current selection. |
|
||||
|
||||
**Properties:**
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `TestSummaryListView` | `ITestSummaryListView` | The associated view instance. |
|
||||
| `NotificationRequest` | `InteractionRequest<Notification>` | Prism interaction request for notifications. |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Prism interaction request for confirmations. |
|
||||
| `ContextNavigationRegion` | `object` | Gets/sets content of `TestListRegion` on the view. |
|
||||
| `SelectedTestSummary` | `TestSummary` | Currently selected single test summary. |
|
||||
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of selected test summaries. |
|
||||
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Collection of all test summaries. |
|
||||
| `HeaderInfo` | `string` | Returns `"TestSummaryRegion"`. |
|
||||
| `IsBusy` | `bool` | Busy indicator state. |
|
||||
| `IsDirty` | `bool` | Dirty state flag. |
|
||||
| `IsNavigationIncluded` | `bool` | Navigation inclusion flag. |
|
||||
|
||||
**Events:**
|
||||
- `PropertyChanged` - Custom `PropertyChangedEventHandler` (hides base implementation with `new`).
|
||||
|
||||
---
|
||||
|
||||
### TestSummaryViewListModel
|
||||
|
||||
**Constructor:**
|
||||
```csharp
|
||||
public TestSummaryViewListModel(ITestSummaryListView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
```
|
||||
Initializes the ViewModel, sets the view's DataContext, creates interaction requests, and stores dependencies.
|
||||
|
||||
**Methods:**
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Initialize` | `void Initialize()` | Empty override. |
|
||||
| `Initialize` | `void Initialize(object parameter)` | Sets `Parent`, initializes `FilterView`, attaches collection changed handlers, and calls `Subscribe()`. |
|
||||
| `OnFilterChanged` | `void OnFilterChanged(FilterParameterArgs args)` | Filters `FilteredTestSummaryList` based on `SetupName`, `Id`, or `Description` containing the parameter string. |
|
||||
| `Activated` | `void Activated()` | Publishes empty `FilterParameterChangedEvent` to reset filter. |
|
||||
| `Cleanup` | `void Cleanup()` | Clears all collections, resets `SelectedTestSummary`, and publishes selection changes. |
|
||||
| `PublishSelectedTestSummaryList` | `void PublishSelectedTestSummaryList()` | Publishes `TestSummaryChangeNotification`, `TestSummaryCountNotification`, and `ResetZoomChangedEvent`. |
|
||||
| `RefreshDataFolder` | `void RefreshDataFolder()` | Publishes `DataFolderChangedEvent` via dispatcher. |
|
||||
| `SelectDataFolder` | `void SelectDataFolder()` | Opens `OpenFileDialog` for .dts files and publishes `DataFileSelectedEvent`. |
|
||||
| `SortTestSummaryList` | `void SortTestSummaryList()` | Sorts `FilteredTestSummaryList` based on `SelectedSortIndex`. |
|
||||
|
||||
**Properties:**
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `FilterView` | `IFilterView` | Resolved filter view instance. |
|
||||
| `View` | `ITestSummaryListView` | The associated view instance. |
|
||||
| `NotificationRequest` | `InteractionRequest<Notification>` | Prism interaction request for notifications. |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Prism interaction request for confirmations. |
|
||||
| `ContextNavigationRegion` | `object` | Gets/sets DataContext of `TestListRegion` on the view. |
|
||||
| `IsFilterEnabled` | `bool` | Indicates if filtering is available (true when list has items). |
|
||||
| `SelectedTestSummary` | `TestSummary` | Currently selected single test summary. |
|
||||
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of selected test summaries. |
|
||||
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Full collection; setter updates `IsFilterEnabled` and `FilteredTestSummaryList`. |
|
||||
| `FilteredTestSummaryList` | `ObservableCollection<ITestSummary>` | Filtered/sorted view of test summaries. |
|
||||
| `HeaderInfo` | `string` | Returns `"TestSummaryRegion"`. |
|
||||
| `IsBusy` | `bool` | Busy indicator state. |
|
||||
| `IsDirty` | `bool` | Dirty state flag. |
|
||||
| `IsNavigationIncluded` | `bool` | Navigation inclusion flag. |
|
||||
| `SelectedDataFolder` | `string` | Selected folder path; setter publishes `DataFolderChangedEvent`. |
|
||||
| `SelectedDataFile` | `string` | Selected file path; setter publishes `DataFolderChangedEvent`. |
|
||||
| `SortableAttributes` | `List<string>` | Localized list of sortable attribute names. |
|
||||
| `SelectedSortIndex` | `int` | Index of selected sort; setter triggers `SortTestSummaryList()`. |
|
||||
|
||||
**Commands:**
|
||||
|
||||
| Command | Type | Description |
|
||||
|---------|------|-------------|
|
||||
| `Refresh
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/ViewerSettingsModule.cs
|
||||
generated_at: "2026-04-17T16:28:49.887066+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3f7db025bc16257d"
|
||||
---
|
||||
|
||||
# DTS.Viewer.ViewerSettings
|
||||
|
||||
### Purpose
|
||||
This module is a Prism-based modular component that provides viewer settings functionality within the DTS application. It registers its views and view models with the Unity dependency injection container and exposes assembly metadata (name, image, group, region) for integration with the main application shell.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`ViewerSettingsModule`** (class)
|
||||
- Implements: `Prism.Mod
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:13:15.473185+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "10fed443f1f9bdae"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
|
||||
|
||||
### Public Interface
|
||||
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
|
||||
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
|
||||
- `AssemblyVersion`: "1.0.0.0"
|
||||
- `AssemblyFileVersion`: "1.0.0.0"
|
||||
- `ComVisible`: false
|
||||
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
|
||||
|
||||
### Invariants
|
||||
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
|
||||
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
|
||||
|
||||
### Gotchas
|
||||
- `AssemblyDescription` is empty, providing no documentation
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:11:57.317124+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c1490f04f3bdab0f"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### Purpose
|
||||
This module provides localization support for the ViewerSettings feature through a XAML markup extension and strongly-typed resource access. The `TranslateExtension` allows XAML bindings to localized strings, while `StringResources` provides compile-time-safe access to localized strings related to calibration behavior settings.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**TranslateExtension** (inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string from `StringResources.ResourceManager.GetString(_key)`. Returns `"#stringnotfound#"` if key is null/empty, or `"#stringnotfound# " + _key` if the key is not found in resources.
|
||||
|
||||
**StringResources** (auto-generated)
|
||||
- `ResourceManager` - Static property returning the cached `ResourceManager` instance for the `"DTS.Viewer.ViewerSettings.Resources.StringResources"` resource name.
|
||||
- `Culture` - Static property for getting/setting the `CultureInfo` for resource lookups.
|
||||
- `CalibrationBehavior_LinearIfAvailable` - Localized string: "Use the linear sensitivity, if available".
|
||||
- `CalibrationBehavior_NonLinearIfAvailable` - Localized string: "Use the non-linear sensitivity, if available".
|
||||
- `CalibrationBehavior_UseBothIfAvailable` - Localized string: "Use both sensitivities, if available, as separate channels".
|
||||
- `CalibrationBehaviorText` - Localized string: "Calibration Behavior".
|
||||
|
||||
### Invariants
|
||||
- `TranslateExtension._key` is set at construction time and cannot be changed.
|
||||
- `StringResources` class is `internal` and all members are `internal`.
|
||||
- The resource manager is lazily initialized on first access.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Windows.Markup` (`MarkupExtension`, `MarkupExtensionReturnTypeAttribute`)
|
||||
- `System.Resources` (`ResourceManager`)
|
||||
- `System.Globalization` (`CultureInfo`)
|
||||
|
||||
**Depended on by:** Not determinable from source alone, but likely used by XAML files in the ViewerSettings module.
|
||||
|
||||
### Gotchas
|
||||
- **Fallback string format:** When a key is not found, the returned string includes the key name appended after `"#stringnotfound# "`. This is useful for debugging but may appear in production if resources are missing.
|
||||
- **Auto-generated file:** `StringResources.Designer.cs` is auto-generated and should not be manually edited. Changes should be made to the corresponding `.resx` file.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/View/ViewerSettingsView.xaml.cs
|
||||
generated_at: "2026-04-17T16:13:15.474625+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3dbea35de842a6d9"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
Provides assembly-level metadata for the `DTS.Viewer.ViewerSettings` assembly. This module contains standard .NET assembly attributes that control versioning, COM visibility, and product identification. It exists solely to define assembly characteristics and contains no executable logic.
|
||||
|
||||
### Public Interface
|
||||
No public functions, classes, or methods. This module consists entirely of assembly-level attribute declarations:
|
||||
- `AssemblyTitle`: "DTS.Viewer.ViewerSettings"
|
||||
- `AssemblyVersion`: "1.0.0.0"
|
||||
- `AssemblyFileVersion`: "1.0.0.0"
|
||||
- `ComVisible`: false
|
||||
- `Guid`: "4733690a-cb08-4c2e-853a-9339be13ac28"
|
||||
|
||||
### Invariants
|
||||
- `ComVisible` is set to `false`, making types in this assembly invisible to COM components by default.
|
||||
- Version numbers follow the four-part versioning scheme (Major.Minor.Build.Revision).
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Not determinable from source alone (assembly-level metadata has no direct consumers in source).
|
||||
|
||||
### Gotchas
|
||||
- `AssemblyDescription` is empty, providing no documentation
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ViewerSettings/ViewModel/ViewerSettingsViewModel.cs
|
||||
generated_at: "2026-04-17T16:30:27.297982+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5cfb0f37e98d2924"
|
||||
---
|
||||
|
||||
# ViewModel
|
||||
|
||||
### Purpose
|
||||
This module provides the ViewModel for viewer settings, specifically managing calibration behavior configuration. It allows users to select from available calibration behaviors (LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable) and handles visibility states for settings UI based on application events. It participates in the Prism MVVM architecture as a configurable settings component.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**Class: `ViewerSettingsViewModel`** (extends `BaseViewModel<IViewerSettingsViewModel>`, implements `IViewerSettingsViewModel`)
|
||||
|
||||
**Constructor:**
|
||||
- `ViewerSettingsViewModel(IViewerSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` - Initializes the view model, sets up interaction requests, and stores dependencies.
|
||||
|
||||
**Properties:**
|
||||
- `View` (`IViewerSettingsView`) - Gets or sets the associated view interface.
|
||||
- `Parent` (`IBaseViewModel`) - Gets or sets the parent view model.
|
||||
- `NotificationRequest` (`InteractionRequest<Notification>`) - Interaction request for notifications.
|
||||
- `ConfirmationRequest` (`InteractionRequest<Confirmation>`) - Interaction request for confirmations.
|
||||
- `HeaderInfo` (`string`) - Returns "SettingsRegion".
|
||||
- `IsBusy` (`bool`) - Busy state indicator.
|
||||
- `IsDirty` (`bool`) - Dirty state indicator.
|
||||
- `IsNavigationIncluded` (`bool`) - Navigation inclusion flag.
|
||||
- `CalibrationBehaviorSettingVisibility` (`Visibility`) - Controls visibility of calibration behavior setting UI; publishes `ViewerSettingsVisibilityChangedEvent` when changed.
|
||||
- `OverallSettingsVisibility` (`Visibility`) - Computed property; returns `Visible` if `CalibrationBehaviorSettingVisibility` is `Visible`, otherwise `Collapsed`.
|
||||
- `AvailableCalibrationBehaviors` (`DisplayedCalibrationBehavior[]`) - Thread-safe, lazily-initialized array of available calibration options.
|
||||
- `CalibrationBehaviorSetting` (`DisplayedCalibrationBehavior`) - Gets or sets the current calibration behavior; publishes `CalibrationBehaviorSettingChangedEvent` on change.
|
||||
|
||||
**Methods:**
|
||||
- `void Initialize()` - Empty override.
|
||||
- `void Initialize(object parameter)` - Sets `Parent` from parameter and subscribes to events.
|
||||
- `void PublishChanges()` - Empty method (implementation appears incomplete).
|
||||
|
||||
**Events:**
|
||||
- `PropertyChanged` (`PropertyChangedEventHandler`) - Property change notification event.
|
||||
|
||||
### Invariants
|
||||
- `OverallSettingsVisibility` is `Visible` if and only if `CalibrationBehaviorSettingVisibility
|
||||
Reference in New Issue
Block a user