1
This commit is contained in:
@@ -2,6 +2,7 @@ using Godot;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BITKit;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@@ -51,7 +52,23 @@ public partial class IDIS_SearchService : Node
|
||||
}
|
||||
private void Search(string word)
|
||||
{
|
||||
var rawHandle = word.Split('?').First();
|
||||
var split = word.Split('?');
|
||||
var condition = string.Empty;
|
||||
switch (split)
|
||||
{
|
||||
case var x when x.Length is 1:
|
||||
break;
|
||||
case var x when x.Length is 2:
|
||||
condition = split[1];
|
||||
break;
|
||||
case var x when x.Length > 2:
|
||||
split = word.Split('?', 2);
|
||||
condition = split[1];
|
||||
break;
|
||||
}
|
||||
var rawHandle = split[0];
|
||||
|
||||
|
||||
MathNode.ClearChild(searchCandidateContainer);
|
||||
if (service.Query(word, out IDIS_Query[] queries) is false) return;
|
||||
if (queries.Length is 1 && queries.First().Handle == rawHandle)
|
||||
@@ -75,7 +92,7 @@ public partial class IDIS_SearchService : Node
|
||||
|
||||
void OnButtonOnPressed()
|
||||
{
|
||||
searchEdit.Text = query.Handle;
|
||||
searchEdit.Text =string.IsNullOrEmpty(condition) ? query.Handle :query.Handle + condition ;
|
||||
Search(query.Handle);
|
||||
QueryIDIS(query);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=68 format=3 uid="uid://cngf2h2a5ne4a"]
|
||||
[gd_scene load_steps=70 format=3 uid="uid://cngf2h2a5ne4a"]
|
||||
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXPanel.cs" id="1_c78kh"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1po2qljd0jh2" path="res://Mods/教育平台/教程header.tscn" id="2_mn1rn"]
|
||||
@@ -25,9 +25,11 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b57xrg2ye60dy" path="res://Artists/Templates/Option_Button.tscn" id="14_pcoc2"]
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/Builder/NodeBuilder.cs" id="14_q0cb2"]
|
||||
[ext_resource type="Texture2D" uid="uid://57gvsjws6ulq" path="res://BITKit/Art/Containers/container_border_64.png" id="14_sy0v3"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1uver224k3px" path="res://addons/ui_design_tool/assets/icons/folder_open-white-18dp.svg" id="15_8krq8"]
|
||||
[ext_resource type="Texture2D" uid="uid://8ekdl6dgus50" path="res://Artists/Art/Icons/carbon_no-image.png" id="15_i4f2k"]
|
||||
[ext_resource type="Script" path="res://Mods/工业数据采集与分析应用分享/Scripts/IDIS_SearchService.cs" id="16_14syv"]
|
||||
[ext_resource type="PackedScene" uid="uid://btc6smeueu517" path="res://Artists/Templates/LineEditTemplate.tscn" id="16_il4as"]
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/Components/OpenPath.cs" id="16_p2d60"]
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/Resource/StringResource.cs" id="17_vci8w"]
|
||||
[ext_resource type="PackedScene" uid="uid://dghty7km181mc" path="res://Mods/工业数据采集与分析应用分享/Templates/关联标识.tscn" id="19_abuse"]
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXLineEdit.cs" id="19_egw0i"]
|
||||
@@ -88,7 +90,7 @@ templateResource = SubResource("Resource_0cbl3")
|
||||
addFieldsButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/add-button")
|
||||
templateBuilderPath = NodePath("..")
|
||||
templateNameEditPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer/templateName-edit")
|
||||
saveTemplateNameButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/save_template-button")
|
||||
saveTemplateNameButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer/save_name-button")
|
||||
deleteTemplateButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer/deleteTemplate-button")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qa6b3"]
|
||||
@@ -304,6 +306,15 @@ expand_icon = true
|
||||
script = ExtResource("13_6a13i")
|
||||
url = "http://server.bitfall.icu:3000/root/iFactory.Godot/src/branch/main/ReadMe/工业互联网标识解析与注册/标识解析步骤.md"
|
||||
|
||||
[node name="Button2" type="Button" parent="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"SideTab"
|
||||
text = "打开环境文件夹"
|
||||
icon = ExtResource("15_8krq8")
|
||||
expand_icon = true
|
||||
script = ExtResource("16_p2d60")
|
||||
path = "EXE"
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout"]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -1303,6 +1314,7 @@ text = "等待更新中"
|
||||
fit_content = true
|
||||
|
||||
[node name="标识模板生成器" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器" instance=ExtResource("13_7vm0l")]
|
||||
@@ -1337,7 +1349,7 @@ text = "创建模板"
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/VBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "已创建额度模板列表"
|
||||
text = "已创建的标识模板列表"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/VBoxContainer3"]
|
||||
layout_mode = 2
|
||||
@@ -1440,7 +1452,7 @@ layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "新的标识注册模板"
|
||||
|
||||
[node name="Button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer"]
|
||||
[node name="save_name-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "保存新的名称"
|
||||
|
||||
@@ -1464,7 +1476,6 @@ text = "添加属性"
|
||||
[node name="LogLabel" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "等待操作中"
|
||||
fit_content = true
|
||||
|
||||
[node name="save_template-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body"]
|
||||
@@ -1650,7 +1661,6 @@ layout_mode = 2
|
||||
text = "注册"
|
||||
|
||||
[node name="自动注册标识" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识" instance=ExtResource("13_7vm0l")]
|
||||
@@ -1710,23 +1720,9 @@ layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label3" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "温度数据"
|
||||
|
||||
[node name="ProgressBar3" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Button3" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label4" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "湿度数据"
|
||||
text = "湿度记录"
|
||||
|
||||
[node name="ProgressBar4" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
@@ -1752,37 +1748,9 @@ layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label6" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "装配机械臂SR7C1L"
|
||||
|
||||
[node name="ProgressBar6" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Button6" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label7" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "装配机械臂SR7C1L"
|
||||
|
||||
[node name="ProgressBar7" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Button7" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label8" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "AGV机械臂I5外发"
|
||||
text = "机械臂x3"
|
||||
|
||||
[node name="ProgressBar8" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
@@ -1796,7 +1764,7 @@ text = "等待执行中"
|
||||
|
||||
[node name="Label9" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "装配夹爪"
|
||||
text = "装配夹爪x2"
|
||||
|
||||
[node name="ProgressBar9" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
@@ -1808,20 +1776,6 @@ layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label10" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "AGV夹爪"
|
||||
|
||||
[node name="ProgressBar10" type="ProgressBar" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Button10" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "等待执行中"
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
@@ -1896,6 +1850,7 @@ autoUpdateLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容
|
||||
|
||||
[node name="温湿度传感器Reader" type="Node" parent="." node_paths=PackedStringArray("temperatureContaier", "humidityContainer", "ipEdit", "portEdit", "hintsLabel")]
|
||||
script = ExtResource("27_q8j7q")
|
||||
interval = 1000
|
||||
temperatureContaier = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer/传感器数据模板")
|
||||
humidityContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer/传感器数据模板2")
|
||||
ipEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2/LineEdit")
|
||||
@@ -1935,7 +1890,7 @@ logLabel = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/Mar
|
||||
[node name="自动注册标识" type="Node" parent="." node_paths=PackedStringArray("progressBars", "logLabel")]
|
||||
script = ExtResource("41_17ps2")
|
||||
regResources = Array[Object]([ExtResource("42_xvnkp"), ExtResource("43_qidfp"), ExtResource("44_0hai5")])
|
||||
progressBars = [NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar2"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar3"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar4"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar5"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar6"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar7"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar8"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar9"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar10")]
|
||||
progressBars = [NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar2"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar4"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar5"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar8"), NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/HFlowContainer/VBoxContainer/GridContainer/ProgressBar9")]
|
||||
logLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/自动注册标识/PanelContainer/MarginContainer/logLabel")
|
||||
|
||||
[node name="温湿度数据生成" type="Node" parent="." node_paths=PackedStringArray("_lineEdit")]
|
||||
@@ -1959,6 +1914,7 @@ templateResource = SubResource("Resource_1df3p")
|
||||
templateName = "订单信息"
|
||||
|
||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button" to="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button" method="Execute"]
|
||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button2" to="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button2" method="Execute"]
|
||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button5" to="Layout/UX Window Service/Horizontal Layout/导航栏/MarginContainer/Layout/Button5" method="Return"]
|
||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer/生成数据-button" to="温湿度数据生成" method="Excute"]
|
||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板注册器/HBoxContainer/VBoxContainer3/Button" to="标识模板注册器" method="Rebuild"]
|
||||
|
Reference in New Issue
Block a user