init
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/SystemSettings/ISOSettings/Classes/ISOSettingsData.cs
|
||||
generated_at: "2026-04-17T16:30:37.200396+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7ab3b9f1af5090f3"
|
||||
---
|
||||
|
||||
# Classes
|
||||
|
||||
### Purpose
|
||||
This module defines the `ISOSettingsData` class, which serves as a data model for ISO (International Organization for Standardization) settings within the application. It manages configuration related to ISO code validation, display modes (ISO codes, user codes, channel names), and string builder visibility. It implements property change notification, making it suitable for data binding in a UI context.
|
||||
|
||||
### Public Interface
|
||||
|
||||
* `public class ISOSettingsData : DTS.Common.Base.BasePropertyChanged, IISOSettingsData`
|
||||
* The primary class of this module. Inherits from `BasePropertyChanged` (likely providing `INotifyPropertyChanged` implementation) and implements `IISOSettingsData`.
|
||||
|
||||
* `public bool ValidateTestObjectAndPosition`
|
||||
* **Property (get/set):** Controls whether TestObject and position ISO fields are validated during test setup validation. Defaults to `false`.
|
||||
|
||||
* `public bool UniqueISOCodesRequired`
|
||||
* **Property (get/set):** Determines if unique ISO codes are required.
|
||||
|
||||
* `public bool UniqueISOCodesRequiredAndShowISOCodes`
|
||||
* **Property (get):** Computed property returning `true` if `UniqueISOCodesRequired` is `true` AND `ShowISOCodes` is `true`.
|
||||
|
||||
* `public bool ShowISOCodes`
|
||||
* **Property (get/set):** Controls the visibility of ISO codes. The setter manipulates the `ISOViewMode` enum to reflect the desired state. Setting to `true` may change `ISOViewMode` to `ISOAndUserCode` or `ISOOnly`. Setting to `false` may change it to `UserCodeOnly`. Raises property changed events for dependent properties.
|
||||
|
||||
* `public bool ShowUserCodes`
|
||||
* **Property (get/set):** Controls the visibility of user codes. Similar logic to `ShowISOCodes`, it manipulates `ISOViewMode` based on the value being set.
|
||||
|
||||
* `public bool ShowISOStringBuilder`
|
||||
* **Property (get/set):** Controls the visibility of an ISO string builder UI element.
|
||||
|
||||
* `public bool ShowChannelCodeLookupHelper`
|
||||
* **Property (get/set):** Controls the visibility of a channel code lookup helper.
|
||||
|
||||
* `public bool UseISOCodeFilterMapping`
|
||||
* **Property (get/set):** Controls whether ISO code filter mapping is used.
|
||||
|
||||
* `public bool ChannelNamesOnly`
|
||||
* **Property (get/set):** If set to `true`, sets `ISOViewMode` to `ChannelNameOnly`. The setter does not handle the `false` case explicitly (commented as implicit).
|
||||
|
||||
* `public IsoViewMode ISOViewMode`
|
||||
* **Property (get/set):** The underlying enum determining the current view mode. Raises property changed events for `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly` when changed.
|
||||
|
||||
### Invariants
|
||||
* `ISOViewMode` is the single source of truth for the display mode. `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly` are projections of this state.
|
||||
* Setting `ShowISOCodes` or `ShowUserCodes` to `true` or `false` triggers specific state transitions in `ISOViewMode` rather than acting as independent boolean flags.
|
||||
* `UniqueISOCodesRequiredAndShowISOCodes` is strictly a logical AND of its two constituent properties.
|
||||
|
||||
### Dependencies
|
||||
* **Depends on:**
|
||||
* `DTS.Common.Enums` (for `IsoViewMode` enum).
|
||||
* `DTS.Common.Interface` (for `IISOSettingsData` interface).
|
||||
* `DTS.Common.Base` (inferred from `BasePropertyChanged`).
|
||||
|
||||
### Gotchas
|
||||
* **State Transition Complexity:** The `ShowISOCodes` and `ShowUserCodes` setters contain non-trivial switch logic that modifies `ISOViewMode`. Developers might assume these are simple boolean flags, but setting them triggers side effects on the view mode.
|
||||
* **Implicit False Logic:** The `ChannelNamesOnly` setter explicitly ignores the `false` case, relying on other setters to change the mode away from `ChannelNameOnly`.
|
||||
* **Property Change Notification:** The `ShowISOCodes` setter manually raises `OnPropertyChanged` for several other properties (`ShowISOStringBuilder`, `UniqueISOCodesRequired`, etc.), creating hidden coupling.
|
||||
Reference in New Issue
Block a user