54 lines
2.9 KiB
Markdown
54 lines
2.9 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DataPRO/Modules/Groups/GroupImport/View/GroupImportImportView.xaml.cs
|
||
|
|
- DataPRO/Modules/Groups/GroupImport/View/GroupImportOptionsView.xaml.cs
|
||
|
|
- DataPRO/Modules/Groups/GroupImport/View/GroupImportPreviewView.xaml.cs
|
||
|
|
generated_at: "2026-04-17T15:55:09.583371+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "6791e57197b8d508"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: GroupImport Views
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides the WPF view components for a Group Import wizard workflow. It contains three views—`GroupImportImportView`, `GroupImportOptionsView`, and `GroupImportPreviewView`—that implement interfaces from `DTS.Common.Interface.Groups` and handle user interaction for importing groups from files. The views serve as the UI layer, delegating business logic to `GroupImportViewModel` and validating user input before allowing progression through the wizard steps.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### GroupImportImportView
|
||
|
|
|
||
|
|
**Signature:** `public partial class GroupImportImportView : IGroupImportImportView`
|
||
|
|
|
||
|
|
| Member | Description |
|
||
|
|
|--------|-------------|
|
||
|
|
| `GroupImportImportView()` | Constructor. Calls `InitializeComponent()` to load the XAML-defined UI. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### GroupImportOptionsView
|
||
|
|
|
||
|
|
**Signature:** `public partial class GroupImportOptionsView : IGroupImportOptionsView`
|
||
|
|
|
||
|
|
| Member | Description |
|
||
|
|
|--------|-------------|
|
||
|
|
| `GroupImportOptionsView()` | Constructor. Calls `InitializeComponent()` to load the XAML-defined UI. |
|
||
|
|
| `bool Validate(out List<string> errors, out List<string> warnings)` | Validates whether the user can proceed to the preview step. Returns `true` if at least one file is selected (`vm.SourceFiles.Length >= 1`); otherwise, adds `StringResources.Preview_NoFilesSelected` to errors and returns `false`. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### GroupImportPreviewView
|
||
|
|
|
||
|
|
**Signature:** `public partial class GroupImportPreviewView : IGroupImportPreviewView`
|
||
|
|
|
||
|
|
| Member | Description |
|
||
|
|
|--------|-------------|
|
||
|
|
| `GroupImportPreviewView()` | Constructor. Calls `InitializeComponent()` to load the XAML-defined UI. |
|
||
|
|
| `void GroupName_Changed(object sender, TextChangedEventArgs e)` | Private event handler. Updates `group.GroupName` from the TextBox, calls `ch.GroupNameInvalidate()` on all channels, and invokes `vm.CheckGroupName()`. |
|
||
|
|
| `void GroupTags_Changed(object sender, TextChangedEventArgs e)` | Private event handler. Updates `group.GroupTags` from the TextBox. |
|
||
|
|
| `void IncludedChecked(object sender, RoutedEventArgs e)` | Private event handler. Calls `vm.InvalidateChannels()` when a group's included checkbox is checked. |
|
||
|
|
| `void IncludedUnchecked(object sender, RoutedEventArgs e)` | Private event handler. Calls `vm.InvalidateChannels()` when a group's included checkbox is unchecked. |
|
||
|
|
| `bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings)` | Public validation method. Checks group and channel validity for import. Returns `true` if valid to proceed. See detailed behavior below
|