From 41d8d06a8e40b22cd6bc5cf09caf124a1dd2bb35 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Mon, 7 Aug 2023 11:21:47 +0800 Subject: [PATCH] chore: Accessor 'TaskItemViewModels.set' can be made private --- src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs index 486f2a68a4..3b9023d29b 100644 --- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs @@ -55,7 +55,7 @@ namespace MaaWpfGui.ViewModels.UI /// /// Gets or sets the view models of task items. /// - public ObservableCollection TaskItemViewModels { get; set; } + public ObservableCollection TaskItemViewModels { get; private set; } /// /// Gets the visibility of task setting views. @@ -67,7 +67,7 @@ namespace MaaWpfGui.ViewModels.UI /// /// 实时更新任务顺序 /// - // 这个不能设置为private,xaml 中绑定了Action,需要添加 qodana ignore rule + // 这个不能设置为 private,xaml 中绑定了Action,需要添加 qodana ignore rule public void TaskItemSelectionChanged() { Application.Current.Dispatcher.InvokeAsync(() => @@ -675,6 +675,7 @@ namespace MaaWpfGui.ViewModels.UI /// /// Selects inversely. /// + // xaml 中的按钮绑定的 Action 是这个函数,需要添加 qodana ignore rule public void InverseSelected() { if (InverseMode)