refactor: SimpleLite 迁移到 Simple3,插件窗体改用 FairyView ForceFloat
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using CycleGUI;
|
||||
using FairyView;
|
||||
using StandardScene.Utils;
|
||||
|
||||
namespace StandardScene.ExtendDevice.ButtonBox
|
||||
@@ -63,7 +63,7 @@ namespace StandardScene.ExtendDevice.ButtonBox
|
||||
|
||||
var panel = GUI.DeclarePanel()
|
||||
.ShowTitle("按钮盒管理")
|
||||
.SetDefaultDocking(Panel.Docking.None)
|
||||
.ForceFloat()
|
||||
.InitSize(1200, 760)
|
||||
.InitPos(false, 0, 0, 0.5f, 0.5f, 0.5f, 0.5f);
|
||||
_panel = panel;
|
||||
@@ -95,7 +95,7 @@ namespace StandardScene.ExtendDevice.ButtonBox
|
||||
LoadBoxFields(b);
|
||||
ClearButtonFields();
|
||||
}
|
||||
}, height: 8, enableSearch: true);
|
||||
}, height: CycleUiHelper.TableHeightPx(8), enableSearch: true);
|
||||
|
||||
pb.SeparatorText("按钮盒编辑");
|
||||
var (ip, _) = pb.TextInput("1. IP", _boxIp, alwaysReturnString: true);
|
||||
@@ -130,7 +130,7 @@ namespace StandardScene.ExtendDevice.ButtonBox
|
||||
_selectedBtnIdx = i;
|
||||
LoadButtonFields(btn);
|
||||
}
|
||||
}, height: 6, enableSearch: true);
|
||||
}, height: CycleUiHelper.TableHeightPx(6), enableSearch: true);
|
||||
|
||||
pb.SeparatorText("按钮编辑");
|
||||
var (bIdx, _) = pb.TextInput("5. 按钮编码", _btnIndex, alwaysReturnString: true);
|
||||
@@ -173,7 +173,7 @@ namespace StandardScene.ExtendDevice.ButtonBox
|
||||
{
|
||||
try
|
||||
{
|
||||
var names = SimpleLite.Utils.UiTypeDiscovery.AllTypes()
|
||||
var names = Simple3.Utils.UiTypeDiscovery.AllTypes()
|
||||
.Where(t => t.IsClass && !t.IsAbstract
|
||||
&& t.Namespace == typeof(BasicButtonBox).Namespace
|
||||
&& t.IsSubclassOf(typeof(BasicButtonBox)))
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using LessokajiWeaverUtilities.MagicAttributes;
|
||||
using LessokajiWeaverUtilities.Utilities;
|
||||
using SimpleLite;
|
||||
using SimpleLite.RCS;
|
||||
using SimpleLite.RCS.CarTypes;
|
||||
using Simple3;
|
||||
using Simple3.RCS;
|
||||
using Simple3.RCS.CarTypes;
|
||||
using SimpleCore;
|
||||
using SimpleCore.Library;
|
||||
using StandardScene;
|
||||
@@ -501,7 +501,7 @@ namespace StandardScene.ExtendDevice.ButtonBox
|
||||
// 获取当前命名空间下所有继承自BasicButtonBox的类
|
||||
// 跨程序集发现:按钮盒具体类型可能位于卫星插件 dll(StandardScene.Devices.ButtonBox),
|
||||
// 用内核同款全域类型发现替代仅扫当前程序集的 GetExecutingAssembly。
|
||||
var buttonBoxType = SimpleLite.Utils.UiTypeDiscovery.AllTypes()
|
||||
var buttonBoxType = Simple3.Utils.UiTypeDiscovery.AllTypes()
|
||||
.FirstOrDefault(t => t.IsClass
|
||||
&& !t.IsAbstract
|
||||
&& t.Namespace == typeof(BasicButtonBox).Namespace
|
||||
|
||||
Reference in New Issue
Block a user