init
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/TranslateExtension.cs
|
||||
- DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T15:55:49.469835+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fa11c9b8329163f4"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer.PSDReportSettings.Resources
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides localization infrastructure for the PSD (Power Spectral Density) Report Settings UI within the DTS Viewer application. It combines a WPF XAML markup extension (`TranslateExtension`) for declarative resource binding with a strongly-typed resource accessor class (`StringResources`) that wraps a `.resx` resource file. The module enables UI elements to reference localized strings directly in XAML markup while centralizing string management for the PSD report configuration interface.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `TranslateExtension` (public class)
|
||||
|
||||
**Namespace:** `DTS.Viewer.PSDReportSettings`
|
||||
**Base Class:** `System.Windows.Markup.MarkupExtension`
|
||||
**Attribute:** `[MarkupExtensionReturnType(typeof(string))]`
|
||||
|
||||
A WPF markup extension that enables XAML bindings to localized string resources.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in a private readonly field `_key`. |
|
||||
| `ProvideValue` | `public override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for the provided key. Returns `NotFound` constant if key is null or empty. Returns `NotFound + " " + _key` if the resource lookup returns null. |
|
||||
|
||||
**Constants:**
|
||||
- `private const string NotFound = "#stringnotfound#"` — Fallback string returned when a resource key cannot be resolved.
|
||||
|
||||
---
|
||||
|
||||
### `StringResources` (internal class)
|
||||
|
||||
**Namespace:** `DTS.Viewer.PSDReportSettings.Resources`
|
||||
**Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]`
|
||||
|
||||
A strongly-typed resource class auto-generated from a `.resx` file. Provides access to localized UI strings for PSD report settings.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `ResourceManager` | `internal static global::System.Resources.ResourceManager ResourceManager { get; }` | Returns the cached `ResourceManager` instance for this assembly. Lazy-initialized on first access. |
|
||||
| `Culture` | `internal static global::System.Globalization.CultureInfo Culture { get; set; }` | Gets or sets the current UI culture for resource lookups. Overrides `CurrentUICulture` for this resource class. |
|
||||
|
||||
**Resource String Properties (all `internal static string`):**
|
||||
|
||||
| Property | Default Value (from comments) |
|
||||
|----------|-------------------------------|
|
||||
| `EnvelopeHeader` | "Envelope" |
|
||||
| `ExportPSDHeader` | "Export" |
|
||||
| `ExportPSDtoCSV` | "Export PSD to CSV" |
|
||||
| `ExportPSDtoPDF` | "Export PSD to PDF" |
|
||||
| `FilterCenterFrequency` | "Center frequency" |
|
||||
| `FilterOrder` | "Filter order" |
|
||||
| `FilterSettingsHeader` | "Filters" |
|
||||
| `FilterType` | "Filter type" |
|
||||
| `FilterType_Bessel` | "Bessel" |
|
||||
| `FilterType_Butterworth` | "Butterworth" |
|
||||
| `Filter
|
||||
Reference in New Issue
Block a user