3.8 KiB
3.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T15:56:47.220918+00:00 | zai-org/GLM-5-FP8 | 1 | 2bd73de841af2654 |
Documentation: GraphMainViewModel
1. Purpose
The GraphMainViewModel class serves as the presentation logic controller for the Graph List module within the DTS Viewer application. Its primary responsibility is to manage the display, filtering, selection, and locking of test channels (including graph channels, calculated channels, and raw test channels) derived from ITestSummary objects. It acts as a bridge between the data layer (test summaries) and the UI layer (tree views, lists), coordinating user interactions via Prism's IEventAggregator to publish channel selections and notify other modules of state changes.
2. Public Interface
Properties
IFilterView FilterView: Gets the filter view instance associated with this model.IGraphMainView View: Gets or sets the associated view interface.IBaseViewModel Parent: Gets or sets the parent ViewModel (checked specifically forIPSDReportMainViewModelduring initialization).InteractionRequest<Notification> NotificationRequest: Gets the interaction request for displaying notifications.InteractionRequest<Confirmation> ConfirmationRequest: Gets the interaction request for displaying confirmations.bool IsFilterEnabled: Gets or sets a value indicating whether the filter UI is enabled (true whenChannelListhas items).string SelectedGroupName: Gets or sets the name of the currently selected group.string LockedGroupName: Gets or sets the name of the currently locked group.List<ITestChannel> LockedChannelList: Gets or sets the list of channels currently locked by the user.List<ITestChannel> SelectedChannelList: Gets or sets the list of channels currently selected by the user.ObservableCollection<ITestChannel> ChannelList: Gets or sets the full list of available channels.ObservableCollection<ITestChannel> FilteredChannelList: Gets or sets the list of channels displayed after filtering.ObservableCollection<TreeViewChannels> TestChannelsTree: Gets or sets the hierarchical tree structure of channels displayed in the UI.object ContextGraphMainRegion: Gets or sets the data context for theGraphMainRegionwithin the view.string HeaderInfo: Returns the constant string "GraphRegion".bool TestModified: Gets or sets a flag indicating if the test has been modified.
Methods
void Initialize(): Overrides base method. Empty implementation.void Initialize(object parameter): Initializes the ViewModel, sets the parent, determines if locked-only mode is required, initializes the filter view, and subscribes to events.void PublishSelectedChannels(): Publishes the current lists of locked and selected channels viaGraphSelectedChannelsNotificationandGraphSelectedChannelCountNotification.void OnFilterChanged(FilterParameterArgs args): Filters theChannelListbased on the string parameter provided inargs, updatingFilteredChannelList.void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked): Adds or removes a group of channels to/from theLockedChannelList.void AddLockedChannel(ITestChannel channel, bool isLocked): Adds or removes a single channel to/from theLockedChannelList.void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels): Selects a specific group of channels, resetting previous selections.void AddSelectedGroup(TestGroup group): Marks a specificTestGroupas selected.void AddSelectedChannel(ITestChannel channel, bool reset):