mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
添加 InputBox 接口
This commit is contained in:
parent
deb7174d27
commit
0bf1ffc7e4
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
using VPet_Simulator.Core;
|
||||
|
||||
namespace VPet_Simulator.Windows.Interface
|
||||
@ -188,7 +189,21 @@ namespace VPet_Simulator.Windows.Interface
|
||||
/// <param name="item">物品</param>
|
||||
void TakeItem(Food item);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 显示输入框
|
||||
/// </summary>
|
||||
/// <param name="title">标题</param>
|
||||
/// <param name="text">文本</param>
|
||||
/// <param name="defaulttext">默认文本</param>
|
||||
/// <param name="ENDAction">结束事件</param>
|
||||
/// <param name="AllowMutiLine">是否允许多行输入</param>
|
||||
/// <param name="TextCenter">文本居中</param>
|
||||
/// <param name="CanHide">能否隐藏</param>
|
||||
void Show(string title, string text, string defaulttext, Action<string> ENDAction, bool AllowMutiLine = false, bool TextCenter = true, bool CanHide = false);
|
||||
/// <summary>
|
||||
/// UI线程调用位置
|
||||
/// </summary>
|
||||
Dispatcher Dispatcher { get; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -659,16 +659,19 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
petHelper?.SetLocation();
|
||||
}
|
||||
//public void DEBUGValue()
|
||||
//{
|
||||
// Dispatcher.Invoke(() =>
|
||||
// {
|
||||
// Console.WriteLine("Left:" + mwc.GetWindowsDistanceLeft());
|
||||
// Console.WriteLine("Right:" + mwc.GetWindowsDistanceRight());
|
||||
// });
|
||||
// Thread.Sleep(1000);
|
||||
// DEBUGValue();
|
||||
//}
|
||||
//
|
||||
/// <summary>
|
||||
/// 显示输入框
|
||||
/// </summary>
|
||||
/// <param name="title">标题</param>
|
||||
/// <param name="text">文本</param>
|
||||
/// <param name="defaulttext">默认文本</param>
|
||||
/// <param name="ENDAction">结束事件</param>
|
||||
/// <param name="AllowMutiLine">是否允许多行输入</param>
|
||||
/// <param name="TextCenter">文本居中</param>
|
||||
/// <param name="CanHide">能否隐藏</param>
|
||||
public void Show(string title, string text, string defaulttext, Action<string> ENDAction, bool AllowMutiLine = false, bool TextCenter = true, bool CanHide = false)
|
||||
{
|
||||
winInputBox.Show(this, title, text, defaulttext, ENDAction, AllowMutiLine, TextCenter, CanHide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,5 +14,5 @@ mklink /d "%~dp0\mod\1100_DemoClock" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.D
|
||||
mklink /d "%~dp0\mod\1111_ChatGPTPlus" "%~dp0\..\..\VPet.Plugin.ChatGPTPlus\VPet.Plugin.ChatGPTPlus\1111_ChatGPTPlus"
|
||||
mklink /d "%~dp0\mod\1101_EdgeTTS" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.EdgeTTS\1101_EdgeTTS"
|
||||
mklink /d "%~dp0\mod\1110_ChatGPT" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.ChatGPT\1110_ChatGPT"
|
||||
|
||||
mklink /d "%~dp0\mod\1111_MutiPlayerStream" "%~dp0\..\..\VPet.Plugin.Demo\VPet.MutiPlayer.Stream\1111_MutiPlayerStream"
|
||||
pause
|
1
VPet-Simulator.Windows/mod/1111_MutiPlayerStream
Symbolic link
1
VPet-Simulator.Windows/mod/1111_MutiPlayerStream
Symbolic link
@ -0,0 +1 @@
|
||||
D:/Documents/Visual Studio 2022/Projects/VPet.Plugin.Demo/VPet.MutiPlayer.Stream/1111_MutiPlayerStream
|
Loading…
Reference in New Issue
Block a user