init
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
---
|
||||
source_files:
|
||||
- DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/View/ChartOptionsView.xaml.cs
|
||||
generated_at: "2026-04-16T13:56:57.437477+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2fdf05f68ae69d8d"
|
||||
---
|
||||
|
||||
# Documentation: ChartOptionsView
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`ChartOptionsView` is a WPF view component that provides user interface logic for configuring chart display options. It implements the `IChartOptionsView` interface, serving as the visual layer for chart-related settings within the DTS Viewer application. The view exposes available filter class options that can be applied to sensor data visualization.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ChartOptionsView()` (Constructor)
|
||||
**Signature:** `public ChartOptionsView()`
|
||||
|
||||
Initializes a new instance of the `ChartOptionsView` class. Calls `InitializeComponent()` to load the associated XAML layout.
|
||||
|
||||
---
|
||||
|
||||
### `AvailableCFC` (Property)
|
||||
**Signature:** `public List<IFilterClass> AvailableCFC { get; }`
|
||||
|
||||
A read-only property that returns the list of available filter classes (CFC = Constant Fraction Classes, per FB 13120).
|
||||
|
||||
**Behavior:** Each access instantiates a new `AnalogSettingDefaults` object and returns its `FilterOptions` property.
|
||||
|
||||
**Returns:** `List<IFilterClass>` containing the available filter options.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- The `AvailableCFC` property getter always creates a **new instance** of `AnalogSettingDefaults` on every access; it does not cache or reuse the object.
|
||||
- The view always implements `IChartOptionsView` as its contract with the rest of the system.
|
||||
- The XAML component (referenced via `InitializeComponent()`) is expected to be present and properly compiled as part of the partial class definition.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
| Namespace | Type Used |
|
||||
|-----------|-----------|
|
||||
| `DTS.Common.Interface` | `IChartOptionsView` |
|
||||
| `DTS.Common.Interface.Sensors.SoftwareFilters` | `IFilterClass` |
|
||||
| `DTS.SensorDB` | `AnalogSettingDefaults` |
|
||||
|
||||
### What depends on this module:
|
||||
**Unclear from source alone.** The `IChartOptionsView` interface suggests a presenter, view model, or controller consumes this view, but no direct consumers are visible in this file.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Instance creation on every property access:** The `AvailableCFC` property instantiates a new `AnalogSettingDefaults` object on every call. If this property is data-bound in XAML and accessed frequently (e.g., by a UI update loop), it could create unnecessary object allocations and GC pressure. Consider whether caching would be appropriate.
|
||||
|
||||
2. **FB 13120 reference:** The XML comment references "FB 13120" (likely a feature/bug tracking identifier). The business context for why this property exists or what specific requirement it addresses is not clear from source alone.
|
||||
|
||||
3. **Partial class definition:** This is a partial class. The XAML file (`ChartOptionsView.xaml`) defines additional structure (base class, visual elements) that is not visible here. The actual base class (likely `UserControl` or similar) is defined in the XAML.
|
||||
Reference in New Issue
Block a user