init
This commit is contained in:
16
docs/ai/DataPRO/Modules/Groups/GroupList/Model.md
Normal file
16
docs/ai/DataPRO/Modules/Groups/GroupList/Model.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Groups/GroupList/Model/ChannelSetting.cs
|
||||
generated_at: "2026-04-17T16:47:02.302066+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e3fe02109fc0ecbe"
|
||||
---
|
||||
|
||||
# Documentation for ChannelSetting.cs
|
||||
|
||||
## 1. Purpose
|
||||
This file is intended to define a model within the `GroupList.Model` namespace, likely representing configuration or settings for a channel. However, the provided source code contains only an empty namespace definition and an unused import. The actual implementation of the `ChannelSetting` type is missing from the file.
|
||||
|
||||
## 2. Public Interface
|
||||
**None.** The namespace `GroupList.Model` is empty in the provided source. No classes, structs, interfaces
|
||||
34
docs/ai/DataPRO/Modules/Groups/GroupList/Properties.md
Normal file
34
docs/ai/DataPRO/Modules/Groups/GroupList/Properties.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Groups/GroupList/Properties/Settings.Designer.cs
|
||||
- DataPRO/Modules/Groups/GroupList/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:28:16.255702+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5576497584da23f4"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains auto-generated build artifacts for the `GroupTemplateList` assembly, including application settings infrastructure and assembly metadata. It provides the standard .NET Settings singleton pattern for persisting user or application configuration scoped to the GroupList module, and defines assembly identity attributes used by the CLR for binding and versioning.
|
||||
|
||||
### Public Interface
|
||||
- **`Settings` class** (internal sealed partial) - Inherits from `global::System.Configuration.ApplicationSettingsBase`. Provides strongly-typed access to application settings.
|
||||
- `public static Settings Default { get; }` - Returns a synchronized singleton instance of the Settings class, lazily initialized via `ApplicationSettingsBase.Synchronized(new Settings())`.
|
||||
|
||||
### Invariants
|
||||
- The `Settings` class is auto-generated by `SettingsSingleFileGenerator` (version 17.10.0.0) and should not be manually edited; changes will be lost on regeneration.
|
||||
- The `defaultInstance` field is always assigned via `Synchronized()`, ensuring thread-safe access to settings.
|
||||
- Assembly version is fixed at `1.0.0.0` for both `AssemblyVersion` and `AssemblyFileVersion`.
|
||||
- COM visibility is disabled at the assembly level (`ComVisible(false)`).
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System.Configuration.ApplicationSettingsBase` (from System.Configuration assembly), `System.Runtime.CompilerServices`, `System.CodeDom.Compiler`.
|
||||
- **Depended on by**: Unclear from source alone; presumably consumed by the parent `GroupList` module for settings access.
|
||||
|
||||
### Gotchas
|
||||
- The assembly title is `"GroupTemplateList"` but the namespace is `GroupList.Properties` — this naming inconsistency may cause confusion when searching for the assembly or namespace.
|
||||
- The `Settings` class is `internal`, so it cannot be accessed from outside this assembly without friend assembly declarations (`InternalsVisibleTo`).
|
||||
|
||||
---
|
||||
35
docs/ai/DataPRO/Modules/Groups/GroupList/Resources.md
Normal file
35
docs/ai/DataPRO/Modules/Groups/GroupList/Resources.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Groups/GroupList/Resources/TranslateExtension.cs
|
||||
- DataPRO/Modules/Groups/GroupList/Resources/StringResources.Designer.cs
|
||||
generated_at: "2026-04-17T16:12:38.870054+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "075ddccdc71b15d4"
|
||||
---
|
||||
|
||||
# Resources
|
||||
|
||||
### 1. Purpose
|
||||
This module provides localization infrastructure for the `GroupList` assembly. It contains a XAML markup extension for declarative string lookup and a strongly-typed resource accessor class generated from a `.resx` file. It centralizes UI string management for group-related views (e.g., "AssociatedTestSetups", "Channels", "Description").
|
||||
|
||||
### 2. Public Interface
|
||||
**Class: `TranslateExtension`** (inherits `MarkupExtension`)
|
||||
* `TranslateExtension(string key)`: Constructor that accepts the resource key to look up.
|
||||
* `object ProvideValue(IServiceProvider serviceProvider)`: Returns the localized string for the stored `_key`. Returns `#stringnotfound#` if the key is null/empty, or `#stringnotfound# {key}` if the lookup fails.
|
||||
|
||||
**Class: `StringResources`** (internal, auto-generated)
|
||||
* `static ResourceManager ResourceManager`: Gets the cached `ResourceManager` instance for the `GroupList.Resources.StringResources` resource set.
|
||||
* `static CultureInfo Culture`: Gets or sets the current UI culture for resource lookups.
|
||||
* `static string AssociatedTestSetups`: Looks up the "AssociatedTestSetups" string.
|
||||
* `static string Channels`: Looks up the "Channels" string.
|
||||
* `static string Description`: Looks up the "Description" string.
|
||||
* `static string LastModified`: Looks up the "LastModified" string.
|
||||
* `static string LastModifiedBy`: Looks up the "LastModifiedBy" string.
|
||||
* `static string Name`: Looks up the "Name" string.
|
||||
* `static string TemplateName`: Looks up the "TemplateName" string.
|
||||
|
||||
### 3. Invariants
|
||||
* `TranslateExtension._key` is immutable after construction (readonly).
|
||||
* `TranslateExtension` always returns a non-null string; it never throws on missing keys, instead returning a specific error constant.
|
||||
* `
|
||||
35
docs/ai/DataPRO/Modules/Groups/GroupList/View.md
Normal file
35
docs/ai/DataPRO/Modules/Groups/GroupList/View.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Groups/GroupList/View/GroupListView.xaml.cs
|
||||
generated_at: "2026-04-17T16:47:04.094415+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1c720369523e38e0"
|
||||
---
|
||||
|
||||
# GroupListView Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`GroupListView` is a WPF view component that provides a sortable, filterable list interface for displaying groups. It serves as the code-behind for `GroupListView.xaml` and implements `IGroupListView`. The view handles user interactions—column header clicks for sorting, search input for filtering, and mouse double-clicks for item selection—delegating all business logic to an `IGroupListViewModel` via the `DataContext`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `GroupListView()` (Constructor)
|
||||
**Signature:** `public GroupListView()`
|
||||
|
||||
Initializes the view component by calling `InitializeComponent()`, which loads the associated XAML layout.
|
||||
|
||||
### `IGroupListView` (Implemented Interface)
|
||||
The class implements `IGroupListView` from `DTS.Common.Interface.Groups.GroupTemplateList`. The specific interface members are not visible in this source file.
|
||||
|
||||
### Private Event Handlers (wired to XAML events)
|
||||
|
||||
| Method | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `ListViewHeader_Click` | `void ListViewHeader_Click(object sender, RoutedEventArgs e)` | Extracts the clicked `GridViewColumnHeader` from `e.OriginalSource`, retrieves `IGroupListViewModel` from the header's `DataContext`, and calls `viewModel.Sort(colHeader.Tag, true)`. |
|
||||
| `GridViewColumnHeaderSearchable_OnSearch` | `void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)` | Extracts search term from `e.OriginalSource` (cast to `string`), retrieves column tag from `sender`, and calls `vm.Filter(columnTag, searchTerm)` on the view model. |
|
||||
| `GridViewColumnHeader_OnClick` | `void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)` | Handles sorting for searchable column headers. Retrieves column tag either directly from `sender` or by traversing the visual tree via `Utils.FindChild<GridViewColumnHeaderSearchable>`, then calls `vm.Sort(columnTag, true)`. |
|
||||
| `MouseDoubleClick` | `void MouseDoubleClick(object sender, MouseButtonEventArgs e)` | Determines which ListView item is under the mouse cursor using hit-testing, validates the index is within bounds, and
|
||||
54
docs/ai/DataPRO/Modules/Groups/GroupList/ViewModel.md
Normal file
54
docs/ai/DataPRO/Modules/Groups/GroupList/ViewModel.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/Groups/GroupList/ViewModel/GroupListViewModel.cs
|
||||
generated_at: "2026-04-17T16:00:47.692641+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b926e051d9942d3a"
|
||||
---
|
||||
|
||||
# GroupListViewModel Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`GroupListViewModel` is the presentation logic layer for the Group List module in a WPF/Prism-based application. It manages the display, filtering, sorting, and manipulation of group entities. The class serves as a mediator between the `IGroupListView` view and the underlying `Group` model, handling user interactions (selection, double-click editing, filtering), coordinating with the event system for cross-module communication, and enforcing tag-based access control for non-administrator users.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `void ClearAllFilters()` | Clears all field-based filters by emptying the internal `_filterByField` dictionary. |
|
||||
| `void MouseDoubleClick(int index)` | Publishes a `GroupListEditGroupEvent` with the group ID when a single group is selected and the index is valid. |
|
||||
| `void Filter(string term)` | Sets `CurrentSearchTerm` and triggers a sort/refresh operation. |
|
||||
| `IGroup GetGroup(int? id, bool updateTags = true)` | Retrieves a group by ID. Optionally updates tags from the database. Returns an empty `Group` if not found or if `id < 0`. |
|
||||
| `IGroup GetGroup(string displayName)` | Retrieves a non-embedded group by display name. Returns `null` if no non-embedded match is found. |
|
||||
| `IGroup[] GetGroups(int[] ids)` | Returns all groups whose IDs are contained in the provided array. |
|
||||
| `IGroup[] GetAllGroups()` | Returns all groups from the model layer. |
|
||||
| `void DeleteGroups(int[] ids)` | Deletes groups by ID, nullifies `StaticGroupId` on related embedded groups, updates `AllGroups`, and re-applies filters. |
|
||||
| `IGroup CreateGroup()` | Creates a new `Group` instance (marked as new). |
|
||||
| `IGroup CreateGroup(SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a `Group` from a SQL data reader. |
|
||||
| `IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a `Group` from a database record object. |
|
||||
| `IGroup CreateGroup(List<string> includedHardwareStringList)` | Creates a `Group` with specified hardware strings. |
|
||||
| `void Filter(object tag, string term)` | Parses `tag` as a `GroupFields` enum, updates filter dictionary, and triggers filtering. |
|
||||
| `void OnSetActive(object page, bool groupTile, object o)` | Initializes the view model when activated. Filters groups by user role and tag compatibility. If `groupTile` is true, loads test setup lists asynchronously. |
|
||||
| `void Unset()` | Clears all group arrays, filters, and publishes a `ListViewStatusEvent` with `Unloaded` status. |
|
||||
| `void Sort(object o, bool bColumnClick)` | Sorts `Groups` by the specified field. Toggles sort direction on repeated column clicks. Applies both search term and field-based filters. |
|
||||
| `void Cleanup()` | Empty implementation. |
|
||||
| `Task CleanupAsync()` | Returns `Task.CompletedTask`. |
|
||||
| `void Initialize()` | Empty implementation. |
|
||||
| `void Initialize(object parameter)` | Empty implementation. |
|
||||
| `void Initialize(object parameter, object model)` | Empty implementation. |
|
||||
| `Task InitializeAsync()` | Returns `Task.CompletedTask`. |
|
||||
| `Task InitializeAsync(object parameter)` | Returns `Task.CompletedTask`. |
|
||||
| `void Activated()` | Empty implementation. |
|
||||
| `void OnPropertyChanged(string propertyName)` | Raises the `PropertyChanged` event. |
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `View` | `IGroupListView` | The associated view instance. Set via constructor; `DataContext` is
|
||||
Reference in New Issue
Block a user