mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-21 09:45:48 +08:00
新增任务定义未选择时的提示信息,改善用户体验
This commit is contained in:
@@ -17,6 +17,7 @@ using GongSolutions.Wpf.DragDrop;
|
||||
using BetterGenshinImpact.View.Windows;
|
||||
using BetterGenshinImpact.ViewModel.Windows;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.ViewModel.Pages;
|
||||
|
||||
@@ -345,7 +346,11 @@ public partial class GearTaskListPageViewModel : ViewModel
|
||||
[RelayCommand]
|
||||
private async Task AddTaskNode(string? taskType = null)
|
||||
{
|
||||
if (SelectedTaskDefinition?.RootTask == null) return;
|
||||
if (SelectedTaskDefinition?.RootTask == null)
|
||||
{
|
||||
Toast.Warning("请先选择一个任务定义");
|
||||
return;
|
||||
}
|
||||
|
||||
var newTask = new GearTaskViewModel($"新任务 {DateTime.Now:HHmmss}")
|
||||
{
|
||||
@@ -373,7 +378,11 @@ public partial class GearTaskListPageViewModel : ViewModel
|
||||
[RelayCommand]
|
||||
private async Task AddTaskGroup()
|
||||
{
|
||||
if (SelectedTaskDefinition?.RootTask == null) return;
|
||||
if (SelectedTaskDefinition?.RootTask == null)
|
||||
{
|
||||
Toast.Warning("请先选择一个任务定义");
|
||||
return;
|
||||
}
|
||||
|
||||
var newGroup = new GearTaskViewModel($"新任务组 {DateTime.Now:HHmmss}", true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user