This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/ExtraPropertiesModule.cs
generated_at: "2026-04-17T16:30:25.825122+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2be65806338da7b0"
---
# ExtraProperties
### Purpose
This module provides a user interface for managing ISO extra properties, which appear to be key-value pairs associated with ISO channel configurations. It is a Prism module that registers a list view and view model for displaying and editing extra properties. The module belongs to the "Prepare" assembly group and targets the "ExtraPropertiesRegion" for UI composition.
### Public Interface
**`ExtraPropertiesModule`** (class)
- `ExtraPropertiesModule(IUnityContainer unityContainer)` - Constructor accepting a Unity container via dependency injection.
- `void Initialize()` - Registers `IExtraPropertiesListViewModel` to `ExtraPropertiesListViewModel` and `IExtraPropertiesListView` to `ExtraPropertiesListView` with the Unity container.
- `void OnInitialized(IContainerProvider containerProvider)` - Empty implementation; no initialization logic executed.
- `void RegisterTypes(IContainerRegistry containerRegistry)` - Calls `Initialize()` to perform type registration.
**`ExtraPropertiesModuleNameAttribute`** (class, inherits `TextAttribute`)
- `ExtraPropertiesModuleNameAttribute()` / `ExtraPropertiesModuleNameAttribute(string s)` - Constructors that set `AssemblyName` to `AssemblyNames.ExtraProperties.ToString()`.
- `string AssemblyName` (property, override) - Returns the assembly name.
- `Type GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `string GetAssemblyName()` - Returns the `AssemblyName` property value.
**`ExtraPropertiesModuleImageAttribute`** (class, inherits `ImageAttribute`)
- `ExtraPropertiesModuleImageAttribute()` / `ExtraPropertiesModuleImageAttribute(string s)` - Constructors that load the assembly image via `AssemblyInfo.GetImage()`.
- `BitmapImage AssemblyImage` (property, override) - Lazy-loads and returns the module's image.
- `string AssemblyName` (property, override) - Returns `AssemblyNames.ExtraProperties.ToString()`.
- `string AssemblyGroup` (property, override) - Returns `eAssemblyGroups.Prepare.ToString()`.
- `eAssemblyRegion AssemblyRegion` (property, override) - Returns `eAssemblyRegion.ExtraPropertiesRegion`.
- `BitmapImage GetAssemblyImage()`, `string GetAssemblyName()`, `string GetAssemblyGroup()`, `eAssemblyRegion GetAssemblyRegion()` - Accessor methods for respective properties.
- `Type GetAttributeType()` - Returns `typeof(ImageAttribute)`.
### Invariants
- The module must be instantiated with a non-null `IUnityContainer` reference.
- `Initialize()` must be called (via `RegisterTypes`) before views/view models can be resolved.
- View and ViewModel registrations are transient (not singleton), despite the comment claiming singleton registration.
### Dependencies
**Imports:**
- `DTS.Common` - Provides `TextAttribute`, `ImageAttribute`, `AssemblyNames`, `AssemblyInfo`, `eAssemblyGroups`, `eAssemblyRegion`.
- `DTS.Common

View File

@@ -0,0 +1,45 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/Model/ExtraPropertyModel.cs
generated_at: "2026-04-17T16:46:25.727645+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d34798e70a17e682"
---
# ExtraPropertyModel Documentation
## 1. Purpose
This module provides a model class `ExtraPropertyModel` for representing key-value pairs (ISO codes/user codes and their associated channel names) within the UI layer. It implements `IExtraProperty` and provides data binding support through `BasePropertyChanged`, along with a custom paste command infrastructure (`PasteCommandClass`) that handles clipboard text parsing and event publication for multi-field paste operations. This model serves as a bridge between raw property data and WPF UI components.
---
## 2. Public Interface
### `ExtraPropertyModel` Class
**Inherits from:** `DTS.Common.Base.BasePropertyChanged`
**Implements:** `DTS.Common.Interface.ISO.ExtraProperties.IExtraProperty`
#### Constructors
| Signature | Description |
|-----------|-------------|
| `ExtraPropertyModel(IExtraProperty extraProperty)` | Initializes from an existing `IExtraProperty` instance, copying `Key` and `Value`. |
| `ExtraPropertyModel()` | Parameterless constructor. |
| `ExtraPropertyModel(KeyValuePair<string, string> extraProperty)` | Initializes from a key-value pair. |
#### Properties
| Name | Type | Description |
|------|------|-------------|
| `ItemStatus` | `UIItemStatus` | Tracks UI status of the item. Defaults to `UIItemStatus.None`. |
| `Key` | `string` | The code value (ISO code or user code). |
| `Value` | `string` | The name associated with the code (ISO channel name or user channel name). |
| `PasteCommand` | `ICommand` | Command registered for paste operations. |
#### Constants
| Name | Value | Description |
|------|

View File

@@ -0,0 +1,46 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:30:25.826163+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4b53392d715e3121"
---
# Properties
### Purpose
This module provides a user interface for managing ISO extra properties, which appear to be key-value pairs associated with ISO channel configurations. It is a Prism module that registers a list view and view model for displaying and editing extra properties. The module belongs to the "Prepare" assembly group and targets the "ExtraPropertiesRegion" for UI composition.
### Public Interface
**`ExtraPropertiesModule`** (class)
- `ExtraPropertiesModule(IUnityContainer unityContainer)` - Constructor accepting a Unity container via dependency injection.
- `void Initialize()` - Registers `IExtraPropertiesListViewModel` to `ExtraPropertiesListViewModel` and `IExtraPropertiesListView` to `ExtraPropertiesListView` with the Unity container.
- `void OnInitialized(IContainerProvider containerProvider)` - Empty implementation; no initialization logic executed.
- `void RegisterTypes(IContainerRegistry containerRegistry)` - Calls `Initialize()` to perform type registration.
**`ExtraPropertiesModuleNameAttribute`** (class, inherits `TextAttribute`)
- `ExtraPropertiesModuleNameAttribute()` / `ExtraPropertiesModuleNameAttribute(string s)` - Constructors that set `AssemblyName` to `AssemblyNames.ExtraProperties.ToString()`.
- `string AssemblyName` (property, override) - Returns the assembly name.
- `Type GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `string GetAssemblyName()` - Returns the `AssemblyName` property value.
**`ExtraPropertiesModuleImageAttribute`** (class, inherits `ImageAttribute`)
- `ExtraPropertiesModuleImageAttribute()` / `ExtraPropertiesModuleImageAttribute(string s)` - Constructors that load the assembly image via `AssemblyInfo.GetImage()`.
- `BitmapImage AssemblyImage` (property, override) - Lazy-loads and returns the module's image.
- `string AssemblyName` (property, override) - Returns `AssemblyNames.ExtraProperties.ToString()`.
- `string AssemblyGroup` (property, override) - Returns `eAssemblyGroups.Prepare.ToString()`.
- `eAssemblyRegion AssemblyRegion` (property, override) - Returns `eAssemblyRegion.ExtraPropertiesRegion`.
- `BitmapImage GetAssemblyImage()`, `string GetAssemblyName()`, `string GetAssemblyGroup()`, `eAssemblyRegion GetAssemblyRegion()` - Accessor methods for respective properties.
- `Type GetAttributeType()` - Returns `typeof(ImageAttribute)`.
### Invariants
- The module must be instantiated with a non-null `IUnityContainer` reference.
- `Initialize()` must be called (via `RegisterTypes`) before views/view models can be resolved.
- View and ViewModel registrations are transient (not singleton), despite the comment claiming singleton registration.
### Dependencies
**Imports:**
- `DTS.Common` - Provides `TextAttribute`, `ImageAttribute`, `AssemblyNames`, `AssemblyInfo`, `eAssemblyGroups`, `eAssemblyRegion`.
- `DTS.Common

View File

@@ -0,0 +1,46 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/Resources/TranslateExtension.cs
- DataPRO/Modules/ISO/ExtraProperties/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:12:22.117936+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "98cd5a2347e82926"
---
# Resources
### Purpose
This module provides localization infrastructure for the ISO ExtraProperties feature. It contains a WPF markup extension for XAML-based string resource lookup and an auto-generated strongly-typed resource class that wraps a `.resx` file containing localized strings for validation messages and UI labels related to key-value property handling.
### Public Interface
**`TranslateExtension` class** (`MarkupExtension`):
- `TranslateExtension(string key)` - Constructor accepting the resource key to look up.
- `object ProvideValue(IServiceProvider serviceProvider)` - Returns the localized string for `_key`, or an error marker if not found.
**`StringResources` class** (internal, auto-generated):
- `static ResourceManager ResourceManager { get; }` - Returns the cached `ResourceManager` instance for the `ExtraProperties.Resources.StringResources` resource bundle.
- `static CultureInfo Culture { get; set; }` - Gets or sets the current UI culture for resource lookups.
- `static string InvalidLine { get; }` - Localized string: "Invalid pasted channel code, line: {0}".
- `static string Key { get; }` - Localized string: "Key".
- `static string NoValueWarning { get; }` - Localized string: "The following keys have no value:".
- `static string RepeatKeyError { get; }` - Localized string: "Keys must be unique. The following repeat:".
- `static string Value { get; }` - Localized string: "Value".
### Invariants
- `TranslateExtension._key` is immutable after construction (readonly field).
- `ProvideValue` always returns a non-null string; it never returns null.
- When `_key` is null or empty, `ProvideValue` returns the constant `"#stringnotfound#"`.
- When the resource key is not found in the resource manager, `ProvideValue` returns `"#stringnotfound# "` concatenated with the key name.
- `StringResources` is marked `internal` and cannot be accessed outside its assembly.
### Dependencies
- **Depends on**: `System`, `System.Windows.Markup` (for `MarkupExtension` and `MarkupExtensionReturnTypeAttribute`), `System.Resources` (for `ResourceManager`), `System.Globalization` (for `CultureInfo`).
- **Depended on by**: Unclear from source alone; presumably XAML files in the ISO ExtraProperties module that use `{x:Static}` or the `TranslateExtension` markup extension.
### Gotchas
- The `NotFound` constant value `"#stringnotfound#"` is hardcoded and duplicated across multiple modules (see DBImportExport/Resources). Changes to this error format would require updates in multiple places.
- The `StringResources` class is auto-generated; manual edits will be lost when the `.resx` file is regenerated.
---

View File

@@ -0,0 +1,58 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/View/ExtraPropertiesListView.xaml.cs
generated_at: "2026-04-17T16:14:53.590489+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bd27f211c49da9eb"
---
# View
### Purpose
This module provides a WPF view component (`ExtraPropertiesListView`) for displaying, editing, sorting, and filtering a list of "extra properties" (key-value pairs) in an ISO-related context. It serves as the code-behind for an XAML user control, mediating user interactions (clicks, text changes, selection) to a view model and handling visual tree hit-testing for column header interactions.
### Public Interface
- **`ExtraPropertiesListView()`** (Constructor)
- Initializes the component by calling `InitializeComponent()`.
- **`GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)`** (private event handler)
- Extracts a search term from `e.OriginalSource` (as string) and a column tag from the sender. Calls `viewModel.Filter(columnTag, searchTerm)` on the `IExtraPropertiesListViewModel` DataContext.
- **`GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)`** (private event handler)
- Extracts the column tag from the sender or via `Utils.FindChild<GridViewColumnHeaderSearchable>`. Calls `vm?.Sort(columnTag, true)` on the view model.
- **`ExtraPropertyKeyTextBox_KeyDown(object sender, KeyEventArgs e)`** / **`ExtraPropertyValueTextBox_KeyDown(...)`** (private event handlers)
- Casts `DataContext` to `ExtraPropertiesListViewModel` and `e.Source`'s DataContext to `IExtraProperty`. Calls `vm.MarkModified(iep)`.
- **`ExtraPropertyKeyTextBox_TextChanged(object sender, TextChangedEventArgs e)`** / **`ExtraPropertyValueTextBox_TextChanged(...)`** (private event handlers)
- Calls `vm.MarkModified(iep)` and then `vm.Validate(ref notUsed1, ref notUsed2)` with two empty `List<string>` instances.
- **`ExtraProperties_SelectionChanged(object sender, SelectionChangedEventArgs e)`** (private event handler)
- Collects all `IExtraProperty` items from `lv.SelectedItems` into a list and calls `vm.SetSelection(list.ToArray())`.
- **`ExtraPropertiesListView_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)`** (private event handler)
- Performs multiple hit-tests using `VisualTreeHelper.HitTest` and `InputHitTest`. Handles sorting when clicking on `KeyColumnHeader` or `ValueColumnHeader` (or their descendant TextBlocks). Ignores clicks on `ScrollViewer`.
### Invariants
- The `DataContext` must be castable to `IExtraPropertiesListViewModel` for most operations; handlers early-return if not.
- Items in the `ListView` must implement `IExtraProperty` for selection handling.
- The view expects `GridViewColumnHeaderSearchable` controls with `Tag` properties for column identification.
- `KeyColumnHeader` and `ValueColumnHeader` are named XAML elements that must exist.
### Dependencies
- **Depends on:**
- `DTS.Common.Controls` (for `GridViewColumnHeaderSearchable`)
- `DTS.Common.Interface.ISO.ExtraProperties` (`IExtraPropertiesListView`, `IExtraPropertiesListViewModel`, `IExtraProperty`)
- `DTS.Common.Utils` (for `Utils.FindChild<T>`)
- `System.Windows.*` (WPF infrastructure)
- `ExtraProperties.Resources.StringResources` (localized strings for "Key" and "Value")
- **Depended on by:** Unclear from source alone; likely consumed by ISO module views.
### Gotchas
- The `Validate` method is called with two throwaway `List<string>` instances (`notUsed1`, `notUsed2`) that are never examined. The validation results are discarded, which may indicate incomplete error handling or a side-effect-based validation pattern.
- Multiple hit-tests are required in `ExtraPropertiesListView_PreviewMouseLeftButtonUp` due to visual tree complexity (borders, rectangles). This is fragile and may break with template changes.
- The handler casts `DataContext` to the concrete `ExtraPropertiesListViewModel` in text/keydown handlers, but to the interface `IExtraPropertiesListViewModel` elsewhere—inconsistent pattern.
---

View File

@@ -0,0 +1,120 @@
---
source_files:
- DataPRO/Modules/ISO/ExtraProperties/ViewModel/ExtraPropertiesListViewModel.cs
generated_at: "2026-04-17T16:00:24.517111+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b887776733154f74"
---
# ExtraPropertiesListViewModel Documentation
## 1. Purpose
`ExtraPropertiesListViewModel` is a Prism-based ViewModel that manages a collection of key-value pair properties ("Extra Properties") within the DataPRO ISO module. It provides CRUD operations, sorting, filtering, validation, and clipboard support (copy/paste) for extra properties. The class serves as the presentation logic layer between the `IExtraPropertiesListView` and the underlying `IExtraProperty` data model, coordinating changes through Prism's `IEventAggregator` for loose coupling with other system components.
---
## 2. Public Interface
### Constructor
```csharp
public ExtraPropertiesListViewModel(
IExtraPropertiesListView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets up the View's DataContext, creates interaction requests, and subscribes to `RaiseNotification`, `BusyIndicatorChangeNotification`, and conditionally `TextPastedEvent` events.
### Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IExtraPropertiesListView` | Gets/sets the associated view. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Interaction request for displaying notifications. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Interaction request for displaying confirmations. |
| `Page` | `IDataPROPage` | Gets/sets the associated page context. |
| `Parent` | `object` | Gets/sets the parent object reference. |
| `IsDirty` | `bool` | Indicates whether the data has been modified. |
| `IsBusy` | `bool` | Controls busy indicator state; notifies on change. |
| `IsMenuIncluded` | `bool` | Controls menu inclusion; notifies on change. |
| `IsNavigationIncluded` | `bool` | Controls navigation inclusion; notifies on change. |
| `IsReadOnly` | `bool` | Controls read-only state (FB14098: permission-based editing disable). |
| `AllExtraProperties` | `List<IExtraProperty>` | Complete list of all extra properties. |
| `ExtraProperties` | `ObservableCollection<IExtraProperty>` | Filtered/sorted collection bound to the view. |
| `SelectedProperties` | `IExtraProperty[]` | **Throws `NotImplementedException`**. |
### Methods
```csharp
public void SetPage(IDataPROPage page)
```
Sets the `Page` property.
```csharp
public void SetParent(object parent)
```
Sets the `Parent` property.
```csharp
public void Cleanup()
public Task CleanupAsync()
```
No-op cleanup methods. `CleanupAsync` returns `Task.CompletedTask`.
```csharp
public void Initialize()
public void Initialize(object parameter)
public void Initialize(object parameter, object model)
public Task InitializeAsync()
public Task InitializeAsync(object parameter)
```
No-op initialization methods. Async versions return `Task.CompletedTask`.
```csharp
public void Activated()
```
No-op activation method.
```csharp
public void OnPropertyChanged(string propertyName)
```
Raises `PropertyChanged` event. When `propertyName` is `"ExtraProperties"`, publishes `ExtraPropertiesChangedEvent`.
```csharp
public void Filter(object tag, string term)
```
Filters properties by search term for the specified field tag (`"Key"` or `"Value"`).
```csharp
public void Sort(object columnTag, bool columnClick)
```
Sorts properties by the specified column tag (`"Key"` or `"Value"`). Toggles sort direction on repeated clicks.
```csharp
public bool Validate(ref List<string> errors)
```
Validates properties, adding error messages to the list. Returns `true` if no new errors were added.
```csharp
public void SetExtraProperties(IList<IExtraProperty> properties)
```
Replaces all properties with the provided list, adds an empty row at the end, resets sort to Key/ascending, and applies sort/filter.
```csharp
public void CopySelected()
```
Copies `_selectedItems` to the end of `AllExtraProperties` (before the empty row), re-sorts, filters, and publishes `PageModifiedEvent`.
```csharp
public void DeleteSelected()
```
Removes `_selectedItems` from collections. Ensures an empty row remains at the end. Publishes `PageModifiedEvent`.
### Internal Methods
```csharp
internal void MarkModified(IExtraProperty iep)
```
Adds a