mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
refactor: 移动 TextDialogWithTimerUserControl 到 Dialogs 文件夹并统一命名
- 将 TextDialogWithTimerUserControl 从 Views/UserControl/ 移至 Views/Dialogs/,重命名为 TextWithTimerDialogView - 将 TextDialogUserControl 重命名为 TextDialogView,统一 Dialogs 文件夹内的 *DialogView 命名约定 - 同步更新命名空间、x:Class、copyright 注释及 TaskQueueViewModel 中的引用
This commit is contained in:
@@ -982,7 +982,7 @@ public class TaskQueueViewModel : Screen
|
||||
{
|
||||
var canceled = false;
|
||||
var delay = TimeSpan.FromSeconds(seconds);
|
||||
var dialogUserControl = new Views.UserControl.TextDialogWithTimerUserControl(
|
||||
var dialogUserControl = new Views.Dialogs.TextWithTimerDialogView(
|
||||
content,
|
||||
tipContent,
|
||||
buttonContent,
|
||||
@@ -1400,7 +1400,7 @@ public class TaskQueueViewModel : Screen
|
||||
|
||||
var taskType = ConfigFactory.CurrentConfig.TaskQueue[taskItem.Index].TaskType;
|
||||
var currentName = taskItem.Name.Replace("\r", string.Empty).Replace("\n", string.Empty);
|
||||
var dialog = new Views.Dialogs.TextDialogUserControl(
|
||||
var dialog = new Views.Dialogs.TextDialogView(
|
||||
LocalizationHelper.GetString("RenameTask") + $" {taskItem.Index + 1}-{LocalizationHelper.GetString(taskType.ToString())}",
|
||||
LocalizationHelper.GetString("RenameTaskPrompt"),
|
||||
currentName) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<hc:Window
|
||||
x:Class="MaaWpfGui.Views.Dialogs.TextDialogUserControl"
|
||||
x:Class="MaaWpfGui.Views.Dialogs.TextDialogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="TextDialogUserControl.xaml.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="TextDialogView.xaml.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
@@ -18,9 +18,9 @@ using System.Windows;
|
||||
namespace MaaWpfGui.Views.Dialogs;
|
||||
|
||||
/// <summary>
|
||||
/// TextDialogUserControl.xaml 的交互逻辑
|
||||
/// TextDialogView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextDialogUserControl
|
||||
public partial class TextDialogView
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取输入的文本
|
||||
@@ -28,21 +28,21 @@ public partial class TextDialogUserControl
|
||||
public string InputText { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextDialogUserControl"/> class.
|
||||
/// Initializes a new instance of the <see cref="TextDialogView"/> class.
|
||||
/// </summary>
|
||||
public TextDialogUserControl()
|
||||
public TextDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += OnLoaded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextDialogUserControl"/> class.
|
||||
/// Initializes a new instance of the <see cref="TextDialogView"/> class.
|
||||
/// </summary>
|
||||
/// <param name="title">标题</param>
|
||||
/// <param name="prompt">提示文本</param>
|
||||
/// <param name="defaultText">默认文本</param>
|
||||
public TextDialogUserControl(string title, string prompt, string defaultText = "")
|
||||
public TextDialogView(string title, string prompt, string defaultText = "")
|
||||
{
|
||||
InitializeComponent();
|
||||
Title = title;
|
||||
@@ -1,10 +1,10 @@
|
||||
<Border
|
||||
x:Class="MaaWpfGui.Views.UserControl.TextDialogWithTimerUserControl"
|
||||
x:Class="MaaWpfGui.Views.Dialogs.TextWithTimerDialogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:MaaWpfGui.Views.UserControl"
|
||||
xmlns:local="clr-namespace:MaaWpfGui.Views.Dialogs"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Width="400"
|
||||
Height="300"
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="TextDialogWithTimerUserControl.xaml.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="TextWithTimerDialogView.xaml.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
@@ -16,21 +16,21 @@ using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace MaaWpfGui.Views.UserControl;
|
||||
namespace MaaWpfGui.Views.Dialogs;
|
||||
|
||||
/// <summary>
|
||||
/// TextDialogWithTimerUserControl.xaml 的交互逻辑
|
||||
/// TextWithTimerDialogView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextDialogWithTimerUserControl : System.Windows.Controls.Border
|
||||
public partial class TextWithTimerDialogView : System.Windows.Controls.Border
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextDialogWithTimerUserControl"/> class.
|
||||
/// Initializes a new instance of the <see cref="TextWithTimerDialogView"/> class.
|
||||
/// </summary>
|
||||
/// <param name="content">主要内容</param>
|
||||
/// <param name="tipContent">提示内容</param>
|
||||
/// <param name="buttonContent">按钮内容</param>
|
||||
/// <param name="milliseconds">倒计时</param>
|
||||
public TextDialogWithTimerUserControl(string content, string tipContent, string buttonContent, double milliseconds)
|
||||
public TextWithTimerDialogView(string content, string tipContent, string buttonContent, double milliseconds)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Reference in New Issue
Block a user