init
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:45:31.357886+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "378a810c6e5d2421"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.PSDReportResults Assembly Configuration
|
||||
|
||||
## 1. Purpose
|
||||
This file provides assembly-level metadata and configuration for the `DTS.Viewer.PSDReportResults` component. It exists to define the assembly's identity, version, and visibility settings within the larger "DTS Viewer" application ecosystem. As a standard .NET `AssemblyInfo.cs` file, its role is to inject attributes into the compiled manifest, ensuring the component is correctly identified by the common language runtime and tooling.
|
||||
|
||||
## 2. Public Interface
|
||||
This file does not expose classes or methods for invocation. Instead, it configures the following assembly
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:12:01.658855+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fda3169cc98a4753"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### Purpose
|
||||
This module provides localization support for the PSD (Power Spectral Density) Report Results component within the DTS Viewer application. It exists to enable XAML-based string lookup for UI elements, allowing the report results interface to be localized. The module contains a WPF markup extension for direct XAML binding and a strongly-typed resource class with strings specific to PSD report results.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`TranslateExtension` class** (public, inherits `MarkupExtension`)
|
||||
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
|
||||
- `override object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for the given `_key`. Returns `#stringnotfound#` if the key is null or empty, or `#stringnotfound# <key>` if the resource lookup fails.
|
||||
|
||||
**`StringResources` class** (internal sealed)
|
||||
- `static ResourceManager ResourceManager { get; }` - Returns the cached `ResourceManager` instance for the `DTS.Viewer.PSDReportResults.Resources.StringResources` resource bundle.
|
||||
- `static CultureInfo Culture { get; set; }` - Gets or sets the current thread's `CurrentUICulture` for resource lookups.
|
||||
- `static string ChannelName { get; }` - Localized string "Name".
|
||||
- `static string ExportPSDHeader { get; }` - Localized string "Export".
|
||||
- `static string ExportPSDtoCSV { get; }` - Localized string "Export PSD to CSV".
|
||||
- `static string ExportPSDtoPDF { get; }` - Localized string "Export PSD to PDF".
|
||||
- `static string GRMS { get; }` - Localized string "GRMS".
|
||||
- `static string PSDResultsHeader { get; }` - Localized string "Results".
|
||||
- `static string SampleRate { get; }` - Localized string "Sample Rate".
|
||||
|
||||
### Invariants
|
||||
- The `TranslateExtension` class is decorated with `[MarkupExtensionReturnType(typeof(string))]`, guaranteeing it returns a string when used in XAML.
|
||||
- The `ProvideValue` method never returns `null`; it returns a fallback string beginning with `#stringnotfound#` on lookup failure.
|
||||
- The `StringResources.ResourceManager` property lazily initializes exactly once.
|
||||
- All resource string properties in `StringResources` are `internal` and return non-null values if the `.resx` file is properly configured.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System` (for `IServiceProvider`, `String`), `System.Windows.Markup` (for `MarkupExtension`, `MarkupExtensionReturnTypeAttribute`), `System.Resources` (for `ResourceManager`), `System.Globalization` (for `CultureInfo`).
|
||||
- **Depended on by**: XAML files within `DTS.Viewer.PSDReportResults` that use `{local:Translate KeyName}` syntax, and any code in that assembly requiring localized strings.
|
||||
|
||||
### Gotchas
|
||||
- The `TranslateExtension` class is defined in namespace `DTS.Viewer.PSDReportResults` but references `DTS.Viewer.PSDReportResults.Resources.StringResources`. This namespace structure must be accounted for in XAML namespace declarations.
|
||||
- The `NotFound` constant value `#stringnotfound#` is hardcoded and will appear in the UI if a resource key is missing, which may be visible to end users during development.
|
||||
- The `StringResources.Designer.cs` file is auto-generated; manual changes will be overwritten. Edit the corresponding `.resx` file instead.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/View/PSDReportResultsView.xaml.cs
|
||||
generated_at: "2026-04-17T16:28:49.882661+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6ffd6c8f349a4d16"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module provides a WPF view component for displaying PSD (Particle Size Distribution) report results. It serves as the code-behind file for a XAML-based user interface, implementing the `IPSDReportResultsView` interface to integrate with the broader DTS reporting infrastructure.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**`PSDReportResultsView`** (class, partial)
|
||||
- Constructor: `PSDReportResultsView()` - Initializes the component via `InitializeComponent()`.
|
||||
- Implements: `IPSDReportResultsView`
|
||||
|
||||
**Event Handlers:**
|
||||
- `GridViewColumnHeader_OnClick(object sender, System.Windows.RoutedEventArgs e)` - Handler for column header click events. Currently empty implementation.
|
||||
- `GridViewColumnHeaderSearchable_OnSearch(object sender, System.Windows.RoutedEventArgs e)` - Handler for searchable column header search events. Currently empty implementation.
|
||||
|
||||
### Invariants
|
||||
- The class must be used as a code-behind partial class paired with a corresponding XAML file (`PSDReportResultsView.xaml`).
|
||||
- The class implements `IPSDReportResultsView`, implying it is intended to be resolved through dependency injection.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on:** `DTS.Common.Interface` (for `IPSDReportResultsView` interface)
|
||||
- **Depends on:** `System.Windows` (WPF infrastructure for `RoutedEventArgs`)
|
||||
|
||||
### Gotchas
|
||||
- Both event handlers (`GridViewColumnHeader_OnClick` and `GridViewColumnHeaderSearchable_OnSearch`) have empty implementations. The intended behavior is unclear from source alone—these may be stubs for future functionality or remnants of removed features.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportResults/ViewModel/PSDReportResultsViewModel.cs
|
||||
generated_at: "2026-04-17T16:45:23.897639+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c04e7218899f6152"
|
||||
---
|
||||
|
||||
# PSDReportResultsViewModel Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`PSDReportResultsViewModel` is a Prism-based ViewModel responsible for displaying PSD (Power Spectral Density) report results, specifically GRMS (G-RMS) summary data for test channels. It serves as a subscriber to data update events from parent view models and provides user interaction capabilities for exporting reports to PDF and CSV formats. This component bridges the gap between data calculation logic and the results presentation layer within the DTS Viewer reporting subsystem.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `View` | `IBaseView` | Gets or sets the associated view instance. Assigned in constructor and has its `DataContext` set to `this`. |
|
||||
| `Parent` | `IBaseViewModel` | Gets or sets the parent ViewModel. Passed via `Initialize(object parameter)` and used to filter event responses. |
|
||||
| `Results` | `ObservableCollection<IChannelGRMSSummary>` | Observable collection of GRMS summary results displayed in the view. Cleared and repopulated on `PSDReportGRMSValuesUpdatedEvent`. |
|
||||
| `NotificationRequest` | `InteractionRequest<Notification>` | Interaction request for displaying notifications to the user. |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Interaction request for displaying confirmation dialogs to the user. Declared with `new` keyword. |
|
||||
| `ExportToPDFCommand` | `DelegateCommand` | Lazily-initialized command that publishes `SaveReportToPDFRequestedEvent` when executed. |
|
||||
| `ExportToCSVCommand` | `DelegateCommand` | Lazily-initialized command that publishes `SaveReportToCSVRequestedEvent` when executed. |
|
||||
|
||||
### Methods
|
||||
|
||||
| Name | Signature | Description |
|
||||
|------|-----------|-------------|
|
||||
| `Initialize` | `void Initialize(object parameter
|
||||
Reference in New Issue
Block a user