Files
DP44/docs/ai/DataPRO/Modules/Groups/GroupImport/View.md
2026-04-17 14:55:32 -04:00

2.9 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/Modules/Groups/GroupImport/View/GroupImportImportView.xaml.cs
DataPRO/Modules/Groups/GroupImport/View/GroupImportOptionsView.xaml.cs
DataPRO/Modules/Groups/GroupImport/View/GroupImportPreviewView.xaml.cs
2026-04-17T15:55:09.583371+00:00 zai-org/GLM-5-FP8 1 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