parent
10c90cee9a
commit
6301e2d3ad
Binary file not shown.
After Width: | Height: | Size: 700 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://8ekdl6dgus50"
|
||||
path="res://.godot/imported/carbon_no-image.png-0f802ecc702d157f9902e484b3fe5a40.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Artists/Art/Icons/carbon_no-image.png"
|
||||
dest_files=["res://.godot/imported/carbon_no-image.png-0f802ecc702d157f9902e484b3fe5a40.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="StyleBoxFlat" format=3 uid="uid://be603nq0xbeaa"]
|
||||
|
||||
[resource]
|
||||
bg_color = Color(1, 1, 1, 0.0313726)
|
||||
corner_radius_top_left = 16
|
||||
corner_radius_top_right = 16
|
||||
corner_radius_bottom_right = 16
|
||||
corner_radius_bottom_left = 16
|
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ public partial class IDIS_RegisterService : Node
|
|||
[ExportCategory("Hints")]
|
||||
[Export] private Label hints;
|
||||
|
||||
private readonly Dictionary<int, KeyValuePair<string, string>> _currentValues = new();
|
||||
private readonly Dictionary<int,IDIS_Data> _currentValues = new();
|
||||
private readonly List<string> _currentReferences = new();
|
||||
|
||||
public override void _Ready()
|
||||
|
@ -79,7 +79,7 @@ public partial class IDIS_RegisterService : Node
|
|||
{
|
||||
var label = new Label();
|
||||
var lineEdit = new LineEdit();
|
||||
|
||||
|
||||
var myIndex = _dirIndex++;
|
||||
|
||||
label.Text = x.format;
|
||||
|
@ -87,9 +87,14 @@ public partial class IDIS_RegisterService : Node
|
|||
lineEdit.PlaceholderText = x.hint;
|
||||
lineEdit.SizeFlagsHorizontal = Control.SizeFlags.ExpandFill;
|
||||
|
||||
_currentValues.Add(myIndex, new KeyValuePair<string, string>(x.format, x.hint));
|
||||
_currentValues.Add(myIndex, new ()
|
||||
{
|
||||
Format = x.format,
|
||||
Value = x.hint,
|
||||
Category = x.category
|
||||
});
|
||||
|
||||
lineEdit.TextChanged += (s) => { _currentValues[myIndex] = new KeyValuePair<string, string>(x.format, s); };
|
||||
lineEdit.TextChanged += (s) => { _currentValues[myIndex].Value = s; };
|
||||
|
||||
grid.AddChild(label);
|
||||
grid.AddChild(lineEdit);
|
||||
|
@ -131,7 +136,7 @@ public partial class IDIS_RegisterService : Node
|
|||
service.Register(handle);
|
||||
foreach (var x in _currentValues)
|
||||
{
|
||||
service.Register(handle, x.Value.Key, x.Value.Value);
|
||||
service.Register(handle, x.Value.Format, x.Value.Value,x.Value.Category);
|
||||
}
|
||||
foreach (var x in _currentReferences)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using BITKit;
|
||||
|
@ -14,10 +15,25 @@ public partial class IDIS_SearchService : Node
|
|||
[Export] private LineEdit searchEdit;
|
||||
[Export] private Control searchCandidateContainer;
|
||||
[Export] private StringResource searchButtonVariation;
|
||||
[Export] private Control searchEditPadding;
|
||||
|
||||
[ExportCategory("Query 绑定")]
|
||||
[Export] private Label handleLabel;
|
||||
[Export] private Label nameLabel;
|
||||
[Export] private Label createTimeLabel;
|
||||
[Export] private Label updateTimeLabel;
|
||||
[Export] private Control valueContainer;
|
||||
[Export] private Control referenceContainer;
|
||||
|
||||
[ExportCategory("Template")]
|
||||
[Export] private PackedScene valueTemplate;
|
||||
[Export] private PackedScene referenceTemplate;
|
||||
[Export] private PackedScene categoryTemplate;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
MathNode.RemoveAllChild(searchCandidateContainer);
|
||||
MathNode.RemoveAllChild(valueContainer);
|
||||
|
||||
searchEdit.TextChanged += Search;
|
||||
//searchEdit.FocusExited += Clear;
|
||||
|
@ -25,7 +41,7 @@ public partial class IDIS_SearchService : Node
|
|||
private void Search(string word)
|
||||
{
|
||||
MathNode.RemoveAllChild(searchCandidateContainer);
|
||||
if (service.TrySearch(word, out var queries) is false) return;
|
||||
if (service.Query(word, out IDIS_Query[] queries) is false) return;
|
||||
if(queries.Length is 1 && queries.First().Handle == word)return;
|
||||
foreach (var query in queries)
|
||||
{
|
||||
|
@ -45,6 +61,7 @@ public partial class IDIS_SearchService : Node
|
|||
{
|
||||
searchEdit.Text = query.Handle;
|
||||
Search(query.Handle);
|
||||
QueryIDIS(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +70,51 @@ public partial class IDIS_SearchService : Node
|
|||
await Task.Delay(100);
|
||||
MathNode.RemoveAllChild(searchCandidateContainer);
|
||||
}
|
||||
private void QueryIDIS(IDIS_Query query)
|
||||
{
|
||||
searchEditPadding.Hide();
|
||||
|
||||
handleLabel.Text = query.Handle;
|
||||
|
||||
createTimeLabel.Text = query.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
createTimeLabel.Text = query.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
MathNode.RemoveAllChild(valueContainer);
|
||||
MathNode.RemoveAllChild(referenceContainer);
|
||||
|
||||
foreach (var categoryGroup in query.Datas.GroupBy(x=>x.Category))
|
||||
{
|
||||
var categoryContainer = categoryTemplate.Instantiate<UXContainer>();
|
||||
categoryContainer.Text = categoryGroup.First().Category;
|
||||
foreach (var x in categoryGroup)
|
||||
{
|
||||
var container = valueTemplate.Instantiate<UXContainer>();
|
||||
|
||||
container.labels[0].Text = x.Format;
|
||||
container.labels[1].Text = x.Value;
|
||||
container.labels[2].Text = x.UpdateTime.ToString(CultureInfo.InvariantCulture);
|
||||
container.labels[3].Text = x.CreateTime.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
categoryContainer.contextContainer.AddChild(container);
|
||||
}
|
||||
valueContainer.AddChild(categoryContainer);
|
||||
}
|
||||
|
||||
foreach (var x in query.References)
|
||||
{
|
||||
var container = referenceTemplate.Instantiate<UXContainer>();
|
||||
|
||||
container.Text = x.RelatedHandle;
|
||||
|
||||
container.button.Pressed += () =>
|
||||
{
|
||||
service.Query(x.RelatedHandle,out IDIS_Query _query);
|
||||
QueryIDIS(_query);
|
||||
};
|
||||
|
||||
referenceContainer.AddChild(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,11 +3,14 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Reflection.Metadata;
|
||||
using BITKit;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Godot;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using RosSharp.RosBridgeClient.MessageTypes.Sensor;
|
||||
using Constant = BITKit.Constant;
|
||||
using String = RosSharp.RosBridgeClient.MessageTypes.Std.String;
|
||||
|
||||
namespace BITFactory;
|
||||
// ReSharper disable once IdentifierTypo
|
||||
|
@ -17,11 +20,11 @@ public abstract class IDIS_Base
|
|||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateDate { get; set; }=DateTime.Now;
|
||||
public DateTime CreateTime { get; set; }=DateTime.Now;
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime UpdateDate { get; set; }=DateTime.Now;
|
||||
public DateTime UpdateTime { get; set; }=DateTime.Now;
|
||||
}
|
||||
// ReSharper disable once IdentifierTypo
|
||||
/// <summary>
|
||||
|
@ -76,6 +79,10 @@ public class IDIS_Data:IDIS_Base
|
|||
/// 值
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
/// <summary>
|
||||
/// 类型,用于解析时对数据条目进行分类
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 标识的引用或关联
|
||||
|
@ -140,10 +147,10 @@ public class IDIS_DBContext:DbContext
|
|||
.Select(x => new IDIS_Query()
|
||||
{
|
||||
Handle = x.Handle,
|
||||
CreateDate = x.CreateDate,
|
||||
UpdateDate = x.UpdateDate,
|
||||
Datas = Datas.Where(data => data.Handle == key).ToArray(),
|
||||
References = References.Where(reference => reference.Handle == key).ToArray()
|
||||
CreateTime = x.CreateTime,
|
||||
UpdateTime = x.UpdateTime,
|
||||
Datas = Datas.Where(data => data.Handle == x.Handle).ToArray(),
|
||||
References = References.Where(reference => reference.Handle == x.Handle).ToArray()
|
||||
}).ToArray();
|
||||
return queries.Any();
|
||||
}
|
||||
|
@ -158,15 +165,6 @@ public class IDIS_DBContext:DbContext
|
|||
{
|
||||
Query(key, out IDIS_Query[] queries);
|
||||
query = queries.FirstOrDefault();
|
||||
|
||||
var 温度 = Datas
|
||||
//查询相关的标识
|
||||
.Where(x => x.Handle == "MyHandle")
|
||||
.OrderBy(x=>x.CreateDate)
|
||||
//从标识中查找"MyFormat"
|
||||
.First(x => x.Format == "Temperature").Value;
|
||||
|
||||
|
||||
return queries.Any();
|
||||
}
|
||||
public bool Register(string handle)
|
||||
|
@ -184,7 +182,7 @@ public class IDIS_DBContext:DbContext
|
|||
SaveChanges();
|
||||
return true;
|
||||
}
|
||||
public void Register(string handle,string format, string value)
|
||||
public void Register(string handle,string format, string value,string category)
|
||||
{
|
||||
var handleExists = Values.Any(x => x.Handle == handle);
|
||||
if (!handleExists)
|
||||
|
@ -195,7 +193,8 @@ public class IDIS_DBContext:DbContext
|
|||
{
|
||||
Handle = handle,
|
||||
Format = format,
|
||||
Value = value
|
||||
Value = value,
|
||||
Category = category,
|
||||
};
|
||||
Datas.Add(data);
|
||||
SaveChanges();
|
||||
|
@ -210,6 +209,27 @@ public class IDIS_DBContext:DbContext
|
|||
});
|
||||
SaveChanges();
|
||||
}
|
||||
|
||||
public void Update(string handle, string format, string value)
|
||||
{
|
||||
// var datas =Datas.ToList();
|
||||
// var result = datas.Where(x => x.Handle == handle && x.Format == format).ToArray();
|
||||
// foreach (var x in result)
|
||||
// {
|
||||
// Datas.Remove(x);
|
||||
// }
|
||||
// foreach (var element in result)
|
||||
// {
|
||||
// element.Value = value;
|
||||
// element.UpdateTime=DateTime.Now;
|
||||
// Datas.Add(element);
|
||||
// }
|
||||
// SaveChanges();
|
||||
var result = Datas.Single(x => x.Handle == handle && x.Format == format);
|
||||
result.UpdateTime=DateTime.Now;
|
||||
result.Value = value;
|
||||
SaveChanges();
|
||||
}
|
||||
}
|
||||
// ReSharper disable once IdentifierTypo
|
||||
/// <summary>
|
||||
|
@ -224,9 +244,11 @@ public partial class IDIS_Service:Node
|
|||
BIT4Log.Log<IDIS_Service>("已创建标识数据库");
|
||||
UniTask.Run(()=>Context.Database.EnsureCreatedAsync());
|
||||
}
|
||||
public bool TrySearch(string word,out IDIS_Query[] queries) => Context.Query(word, out queries);
|
||||
public bool Query(string word,out IDIS_Query[] queries) => Context.Query(word, out queries);
|
||||
public bool Register(string handle) => Context.Register(handle);
|
||||
public void Register(string handle, string format, string value) => Context.Register(handle, format, value);
|
||||
public void Register(string handle, string format, string value,string category) => Context.Register(handle, format, value,category);
|
||||
public void RegisterReference(string handle,string refenceHandle) => Context.RegisterReference(handle,refenceHandle);
|
||||
public static string GenerateHandle() => $"88.123.99/{Mathf.Abs(Guid.NewGuid().GetHashCode())}";
|
||||
public bool Query(string key, out IDIS_Query query) => Context.Query(key, out query);
|
||||
public void Update(string handle, string format, string value) => Context.Update(handle, format, value);
|
||||
}
|
|
@ -17,7 +17,7 @@ public class IDIS_Template
|
|||
public string IconPath="Register";
|
||||
public DateTime CreateTime=DateTime.Now;
|
||||
public DateTime UpdateTime=DateTime.Now;
|
||||
public List<(string format,string hint)> Formats=new();
|
||||
public List<(string format,string hint,string category)> Formats=new();
|
||||
}
|
||||
public partial class IDIS_TemplateService : Node
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ public partial class IDIS_TemplateService : Node
|
|||
{
|
||||
if (_selectedTemplate is null) return;
|
||||
_selectedTemplate.Formats ??= new();
|
||||
_selectedTemplate.Formats.Add(("新的数据格式","格式类型"));
|
||||
_selectedTemplate.Formats.Add(("新的数据格式","格式类型","数据类型"));
|
||||
_selectedTemplate.UpdateTime= DateTime.Now;
|
||||
EnsureConfigure();
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ public partial class IDIS_TemplateService : Node
|
|||
|
||||
_container.lineEdits[0].Text = x.format;
|
||||
_container.lineEdits[1].Text = x.hint;
|
||||
_container.lineEdits[2].Text = x.category;
|
||||
|
||||
var index = i;
|
||||
|
||||
|
@ -144,6 +145,12 @@ public partial class IDIS_TemplateService : Node
|
|||
current.hint = s;
|
||||
_selectedTemplate.Formats[index] = current;
|
||||
};
|
||||
_container.lineEdits[2].TextChanged += s =>
|
||||
{
|
||||
var current = _selectedTemplate.Formats[index];
|
||||
current.category = s;
|
||||
_selectedTemplate.Formats[index] = current;
|
||||
};
|
||||
_container.button.Pressed += () =>
|
||||
{
|
||||
_selectedTemplate.Formats.RemoveAt(index);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using BITFactory;
|
||||
|
||||
public partial class IDIS_UpdateService : Node
|
||||
{
|
||||
[ExportCategory("Services")]
|
||||
[Export] private IDIS_Service service;
|
||||
|
||||
[ExportCategory("UI 绑定")]
|
||||
[Export] private Button submitButton;
|
||||
[Export] private LineEdit handleEdit;
|
||||
[Export] private LineEdit temperatureEdit;
|
||||
[Export] private LineEdit humidityEdit;
|
||||
[Export] private Label hintsLabel;
|
||||
public override void _Ready()
|
||||
{
|
||||
submitButton.Pressed += Submit;
|
||||
}
|
||||
private void Submit()
|
||||
{
|
||||
try
|
||||
{
|
||||
service.Update(handleEdit.Text, "温度", humidityEdit.Text);
|
||||
service.Update(handleEdit.Text, "湿度", temperatureEdit.Text);
|
||||
hintsLabel.Text = "更新成功: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
hintsLabel.Text = e.Message;
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using SharpModbus;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace BITFactory;
|
||||
public partial class 温湿度Reader : Node
|
||||
{
|
||||
[ExportCategory("参数")]
|
||||
[Export(PropertyHint.Range,"100,1000")] private int interval=500;
|
||||
|
||||
[ExportCategory("网络设置")]
|
||||
[Export] private string ip="192.168.3.7";
|
||||
[Export] private int port=502;
|
||||
|
||||
[ExportCategory("运行时")]
|
||||
[Export]public double humidity = 50.0;
|
||||
[Export]public double temperature = 26.0;
|
||||
|
||||
[ExportCategory("UI 绑定")]
|
||||
[Export] private Label temperatureLabel;
|
||||
[Export] private Label humidityLabel;
|
||||
|
||||
private ModbusMaster _modbus;
|
||||
private System.Timers.Timer timer;
|
||||
private CancellationTokenSource _CancellationTokenSource;
|
||||
public override void _Ready()
|
||||
{
|
||||
_CancellationTokenSource = new CancellationTokenSource();
|
||||
_modbus = ModbusMaster.TCP(ip, port);
|
||||
|
||||
timer = new Timer();
|
||||
timer.Interval = interval;
|
||||
timer.Elapsed += OnTimerElapsed;
|
||||
timer.AutoReset = true;
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
timer.Stop();
|
||||
}
|
||||
|
||||
private async void OnTimerElapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
_CancellationTokenSource.Cancel();
|
||||
await UniTask.SwitchToTaskPool();
|
||||
try
|
||||
{
|
||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
||||
|
||||
var vs = _modbus.ReadInputRegisters(1, 0, 2);
|
||||
|
||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
||||
|
||||
if (vs is not { Length: 2 }) return;
|
||||
temperature = vs[0] / 10.0;
|
||||
humidity = vs[1] / 10.0;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GD.Print("ex:" + ex);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,9 +4,11 @@
|
|||
[ext_resource type="Texture2D" uid="uid://dyxw5ocfiamgi" path="res://Mods/工业数据采集与分析应用分享/Arts/Images/标准ModbusRTU图片.jpg" id="1_yd6oj"]
|
||||
[ext_resource type="PackedScene" uid="uid://dghty7km181mc" path="res://Mods/工业数据采集与分析应用分享/Templates/关联标识.tscn" id="2_so2ho"]
|
||||
|
||||
[node name="TrackContainer" type="PanelContainer"]
|
||||
[node name="TrackContainer" type="PanelContainer" node_paths=PackedStringArray("labels", "lineEdits")]
|
||||
custom_minimum_size = Vector2(1280, 512)
|
||||
script = ExtResource("1_4faap")
|
||||
labels = []
|
||||
lineEdits = []
|
||||
|
||||
[node name="VFlex" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
@ -89,36 +91,44 @@ layout_mode = 2
|
|||
theme_type_variation = &"WhitePanel"
|
||||
text = "订单信息"
|
||||
|
||||
[node name="关联标识" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="Label2" type="Label" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"WhitePanel"
|
||||
text = "生产设备"
|
||||
|
||||
[node name="关联标识2" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识2" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="关联标识3" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识3" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="Label3" type="Label" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"WhitePanel"
|
||||
text = "生产环境"
|
||||
|
||||
[node name="关联标识4" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识4" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="关联标识5" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识5" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="关联标识6" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识6" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="关联标识7" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识7" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
||||
[node name="关联标识8" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" instance=ExtResource("2_so2ho")]
|
||||
[node name="关联标识8" parent="VFlex/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer" node_paths=PackedStringArray("labels") instance=ExtResource("2_so2ho")]
|
||||
layout_mode = 2
|
||||
labels = []
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d1rpv4oovnljv"]
|
||||
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXContainer.cs" id="1_6fjlu"]
|
||||
|
||||
[node name="传感器数据模板" type="PanelContainer" node_paths=PackedStringArray("label", "titleLabel", "labels", "lineEdits")]
|
||||
script = ExtResource("1_6fjlu")
|
||||
label = NodePath("")
|
||||
titleLabel = NodePath("")
|
||||
labels = []
|
||||
lineEdits = []
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Header"
|
||||
text = "温度"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Margin_16px"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "50"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "摄氏度"
|
|
@ -2,89 +2,66 @@
|
|||
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXContainer.cs" id="1_312jo"]
|
||||
|
||||
[node name="关联标识" type="HBoxContainer" node_paths=PackedStringArray("label", "titleLabel", "button", "updateTimeLabel", "createTimeLabel")]
|
||||
[node name="关联标识" type="HBoxContainer" node_paths=PackedStringArray("label", "titleLabel", "updateTimeLabel", "createTimeLabel", "labels", "lineEdits")]
|
||||
offset_right = 651.0
|
||||
offset_bottom = 64.0
|
||||
theme_override_constants/separation = 8
|
||||
script = ExtResource("1_312jo")
|
||||
label = NodePath("VBoxContainer/Label2")
|
||||
titleLabel = NodePath("VBoxContainer/Label")
|
||||
button = NodePath("Button")
|
||||
updateTimeLabel = NodePath("VBoxContainer2/HBoxContainer/Label2")
|
||||
createTimeLabel = NodePath("VBoxContainer2/HBoxContainer2/Label2")
|
||||
label = NodePath("GridContainer/Labels[1]")
|
||||
titleLabel = NodePath("GridContainer/Labels[0]")
|
||||
updateTimeLabel = NodePath("GridContainer/HBoxContainer/label[2]")
|
||||
createTimeLabel = NodePath("GridContainer/HBoxContainer2/labels[3]")
|
||||
labels = [NodePath("GridContainer/Labels[0]"), NodePath("GridContainer/Labels[1]"), NodePath("GridContainer/HBoxContainer/label[2]"), NodePath("GridContainer/HBoxContainer2/labels[3]")]
|
||||
lineEdits = []
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
custom_minimum_size = Vector2(64, 0)
|
||||
[node name="Control3" type="Control" parent="."]
|
||||
custom_minimum_size = Vector2(16, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Control"]
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -12.0
|
||||
offset_top = -12.0
|
||||
offset_right = 12.0
|
||||
offset_bottom = 12.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
custom_minimum_size = Vector2(4, 48)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.0588235, 1, 1, 1)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
[node name="GridContainer" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
columns = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
[node name="Labels[0]" type="Label" parent="GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "订单信息"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "20230701232464"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="."]
|
||||
visible = false
|
||||
[node name="Label" type="Label" parent="GridContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "最后更新时间:"
|
||||
|
||||
[node name="label[2]" type="Label" parent="GridContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "2023年7月4日23:35:48"
|
||||
|
||||
[node name="Labels[1]" type="Label" parent="GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "20230701232464"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="GridContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="GridContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "创建标识时间:"
|
||||
|
||||
[node name="labels[3]" type="Label" parent="GridContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "2023年7月4日23:35:48"
|
||||
|
||||
[node name="Control2" type="Control" parent="."]
|
||||
custom_minimum_size = Vector2(16, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer2/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "最后更新时间:"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer2/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "2023年7月4日23:35:48"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer2/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "创建标识时间:"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer2/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "2023年7月4日23:35:48"
|
||||
|
||||
[node name="VSeparator2" type="VSeparator" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
text = "查询关联"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://42locm7i2wvy"]
|
||||
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXContainer.cs" id="1_v6r4n"]
|
||||
|
||||
[node name="标识引用模板" type="HBoxContainer" node_paths=PackedStringArray("label", "button", "labels", "lineEdits")]
|
||||
script = ExtResource("1_v6r4n")
|
||||
label = NodePath("Label")
|
||||
button = NodePath("Button")
|
||||
labels = []
|
||||
lineEdits = []
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
text = "88.123.99/xxxxxxxxxxxxxxxx"
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
text = "查询"
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cccx8fmmfttth"]
|
||||
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXContainer.cs" id="1_fp0bm"]
|
||||
|
||||
[node name="标识数据模板" type="PanelContainer" node_paths=PackedStringArray("label", "contextContainer", "labels", "lineEdits")]
|
||||
custom_minimum_size = Vector2(512, 100)
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource("1_fp0bm")
|
||||
label = NodePath("Layout/Label")
|
||||
contextContainer = NodePath("Layout/MarginContainer/UXContainer-Container")
|
||||
labels = []
|
||||
lineEdits = []
|
||||
|
||||
[node name="Layout" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Layout"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Header"
|
||||
text = "标识数据"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Layout"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Margin_16px"
|
||||
theme_override_constants/margin_left = 0
|
||||
|
||||
[node name="UXContainer-Container" type="VBoxContainer" parent="Layout/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
|
@ -11,7 +11,7 @@ grow_vertical = 2
|
|||
script = ExtResource("1_dre1u")
|
||||
button = NodePath("HBoxContainer/delete-button")
|
||||
labels = []
|
||||
lineEdits = [NodePath("HBoxContainer/name-edit"), NodePath("HBoxContainer/hint-edit")]
|
||||
lineEdits = [NodePath("HBoxContainer/name-edit"), NodePath("HBoxContainer/hint-edit"), NodePath("HBoxContainer/category-edit")]
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
@ -25,6 +25,7 @@ text = "数据名称:"
|
|||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "数据格式"
|
||||
|
||||
[node name="hint-label" type="Label" parent="HBoxContainer"]
|
||||
visible = false
|
||||
|
@ -35,6 +36,13 @@ text = "提示:"
|
|||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "提示或默认值"
|
||||
|
||||
[node name="category-edit" type="LineEdit" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "分类,默认为空"
|
||||
|
||||
[node name="delete-button" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=3 uid="uid://cngf2h2a5ne4a"]
|
||||
[gd_scene load_steps=31 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"]
|
||||
|
@ -15,8 +15,17 @@
|
|||
[ext_resource type="Texture2D" uid="uid://sq1oh4tippad" path="res://Artists/Art/Icons/icon_temperature-celsius.png" id="8_488ak"]
|
||||
[ext_resource type="Texture2D" uid="uid://c38luts5hc5fj" path="res://Artists/Art/Icons/Arrows/icon_chevron-left-rounded.png" id="9_78wam"]
|
||||
[ext_resource type="Script" path="res://BITKit/Scripts/UX/UXServiceProxy.cs" id="11_qsxmx"]
|
||||
[ext_resource type="StyleBox" uid="uid://be603nq0xbeaa" path="res://Artists/Themes/Factory-Panel.tres" id="13_6i2vs"]
|
||||
[ext_resource type="Texture2D" uid="uid://dyxw5ocfiamgi" path="res://Mods/工业数据采集与分析应用分享/Arts/Images/标准ModbusRTU图片.jpg" id="13_jkuq8"]
|
||||
[ext_resource type="PackedScene" uid="uid://42locm7i2wvy" path="res://Mods/工业数据采集与分析应用分享/Templates/标识引用模板.tscn" id="14_0l0dn"]
|
||||
[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://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="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="PackedScene" uid="uid://d1rpv4oovnljv" path="res://Mods/工业数据采集与分析应用分享/Templates/传感器数据模板.tscn" id="19_qxvds"]
|
||||
[ext_resource type="PackedScene" uid="uid://cccx8fmmfttth" path="res://Mods/工业数据采集与分析应用分享/Templates/标识数据模板.tscn" id="20_kicyn"]
|
||||
[ext_resource type="Script" path="res://Mods/工业数据采集与分析应用分享/Scripts/IDIS_UpdateService.cs" id="26_a6qku"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nfm72"]
|
||||
bg_color = Color(0.172549, 0.168627, 0.188235, 1)
|
||||
|
@ -25,11 +34,6 @@ bg_color = Color(0.172549, 0.168627, 0.188235, 1)
|
|||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1rin1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mg0sc"]
|
||||
bg_color = Color(1, 1, 1, 0.12549)
|
||||
corner_radius_bottom_right = 16
|
||||
corner_radius_bottom_left = 16
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ktam2"]
|
||||
script = ExtResource("17_vci8w")
|
||||
value = "Panel"
|
||||
|
@ -72,11 +76,11 @@ layout_mode = 2
|
|||
size_flags_vertical = 3
|
||||
script = ExtResource("3_sfip0")
|
||||
tabs = [NodePath("Horizontal Layout/导航栏/MarginContainer/Layout/VBoxContainer/标识模板-button"), NodePath("Horizontal Layout/导航栏/MarginContainer/Layout/VBoxContainer/Button3"), NodePath("Horizontal Layout/导航栏/MarginContainer/Layout/VBoxContainer/Button2"), NodePath("Horizontal Layout/导航栏/MarginContainer/Layout/VBoxContainer/Button4")]
|
||||
windows = [NodePath("Horizontal Layout/内容/标识模板"), NodePath("Horizontal Layout/内容/标注注册"), NodePath("Horizontal Layout/内容/标识解析"), NodePath("Horizontal Layout/内容/Container3")]
|
||||
windows = [NodePath("Horizontal Layout/内容/标识模板"), NodePath("Horizontal Layout/内容/标注注册"), NodePath("Horizontal Layout/内容/标识解析"), NodePath("Horizontal Layout/内容/温湿度传感器")]
|
||||
|
||||
[node name="Horizontal Layout" type="HBoxContainer" parent="Layout/UX Window Service"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
theme_override_constants/separation = 32
|
||||
|
||||
[node name="导航栏" type="PanelContainer" parent="Layout/UX Window Service/Horizontal Layout"]
|
||||
layout_mode = 2
|
||||
|
@ -280,9 +284,24 @@ layout_mode = 2
|
|||
theme_type_variation = &"HeaderLarge"
|
||||
text = "模板格式"
|
||||
|
||||
[node name="Label4" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
[node name="Names" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "数据名称/提示"
|
||||
columns = 3
|
||||
|
||||
[node name="Label4" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/Names"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "数据名称"
|
||||
|
||||
[node name="Label5" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/Names"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "提示/默认值"
|
||||
|
||||
[node name="Label6" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/Names"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "分类"
|
||||
|
||||
[node name="Format-Container" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -429,14 +448,17 @@ theme_override_styles/background = SubResource("StyleBoxEmpty_1rin1")
|
|||
show_percentage = false
|
||||
|
||||
[node name="标识解析" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 32
|
||||
|
||||
[node name="Control" type="Control" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析"]
|
||||
custom_minimum_size = Vector2(0, 64)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="占位符" type="Control" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析"]
|
||||
custom_minimum_size = Vector2(0, 256)
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(0, 128)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Search" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析"]
|
||||
|
@ -450,9 +472,21 @@ layout_mode = 2
|
|||
theme_type_variation = &"SearchBar"
|
||||
placeholder_text = "搜索标识"
|
||||
|
||||
[node name="queryLast-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search/SearchEdit"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 11
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -16.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
text = "查询上一个"
|
||||
flat = true
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_mg0sc")
|
||||
theme_override_styles/panel = ExtResource("13_6i2vs")
|
||||
|
||||
[node name="Control" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -482,8 +516,241 @@ theme_type_variation = &"Flat"
|
|||
text = "候选词1"
|
||||
flat = true
|
||||
|
||||
[node name="Container3" type="Container" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
||||
[node name="Control" type="Control" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析"]
|
||||
custom_minimum_size = Vector2(1024, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Layout" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="标识解析结果" type="PanelContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Header"
|
||||
text = "标识解析结果"
|
||||
|
||||
[node name="UXContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer"]
|
||||
clip_children = 2
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Header"
|
||||
text = "标识信息"
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer"]
|
||||
custom_minimum_size = Vector2(256, 256)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/TextureRect2"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("14_sy0v3")
|
||||
|
||||
[node name="Default_Icon" type="TextureRect" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/TextureRect2"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("15_i4f2k")
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/TextureRect2"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(256, 256)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("13_jkuq8")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_type_variation = &"Margin_16px"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin"]
|
||||
layout_mode = 2
|
||||
columns = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "标识码:"
|
||||
|
||||
[node name="label[0]" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "88.123.99/xxxxxxxxxxxxxxxx"
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "创建时间:"
|
||||
|
||||
[node name="label[1]" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "2023年7月9日14:29:10"
|
||||
|
||||
[node name="Label3" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "更新时间:"
|
||||
|
||||
[node name="label[2]" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "2023年7月9日14:29:13"
|
||||
|
||||
[node name="Margin2" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"Margin_16px"
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderSmall"
|
||||
text = "引用的标识"
|
||||
|
||||
[node name="引用标识" type="HFlowContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2"]
|
||||
custom_minimum_size = Vector2(900, 0)
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 16
|
||||
|
||||
[node name="标识引用模板" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识" instance=ExtResource("14_0l0dn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识引用模板2" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识" instance=ExtResource("14_0l0dn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识引用模板3" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识" instance=ExtResource("14_0l0dn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识引用模板4" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识" instance=ExtResource("14_0l0dn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识引用模板5" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识" instance=ExtResource("14_0l0dn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识解析数据" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 32
|
||||
theme_override_constants/v_separation = 16
|
||||
columns = 2
|
||||
|
||||
[node name="温湿度传感器" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 64
|
||||
theme_override_constants/margin_top = 64
|
||||
theme_override_constants/margin_right = 64
|
||||
theme_override_constants/margin_bottom = 64
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "已获取的传感器数据"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 32
|
||||
theme_override_constants/v_separation = 32
|
||||
columns = 3
|
||||
|
||||
[node name="传感器数据模板" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer" instance=ExtResource("19_qxvds")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="传感器数据模板2" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer" instance=ExtResource("19_qxvds")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="更新温湿度-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "更新温湿度"
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "手动提交数据"
|
||||
|
||||
[node name="GridContainer2" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(512, 0)
|
||||
layout_mode = 2
|
||||
columns = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
text = "标识码:"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "88.123.99/xxxxxxxxxxxxxxxx"
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
text = "温度:"
|
||||
|
||||
[node name="LineEdit2" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "42"
|
||||
|
||||
[node name="Label3" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
text = "湿度:"
|
||||
|
||||
[node name="LineEdit3" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "50"
|
||||
|
||||
[node name="更新温湿度-button2" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "更新温湿度标识"
|
||||
|
||||
[node name="Label3" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "等待更新中"
|
||||
|
||||
[node name="Control" type="Control" parent="Layout/UX Window Service/Horizontal Layout"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识解析服务" type="Node" parent="."]
|
||||
|
@ -515,12 +782,30 @@ referenceContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内
|
|||
addReferenceButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/addReference-button")
|
||||
hints = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/HBoxContainer/VBoxContainer2/Label2")
|
||||
|
||||
[node name="标识搜索服务" type="Node" parent="." node_paths=PackedStringArray("service", "searchEdit", "searchCandidateContainer")]
|
||||
[node name="标识搜索服务" type="Node" parent="." node_paths=PackedStringArray("service", "searchEdit", "searchCandidateContainer", "searchEditPadding", "handleLabel", "createTimeLabel", "updateTimeLabel", "valueContainer", "referenceContainer")]
|
||||
script = ExtResource("16_14syv")
|
||||
service = NodePath("../标识解析服务")
|
||||
searchEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search/SearchEdit")
|
||||
searchCandidateContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search/PanelContainer/Control")
|
||||
searchButtonVariation = SubResource("Resource_ktam2")
|
||||
searchEditPadding = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/占位符")
|
||||
handleLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer/label[0]")
|
||||
createTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer/label[1]")
|
||||
updateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin/GridContainer/label[2]")
|
||||
valueContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析数据")
|
||||
referenceContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识解析/ScrollContainer/Layout/标识解析结果/VBoxContainer/UXContainer/Margin2/引用标识")
|
||||
valueTemplate = ExtResource("19_abuse")
|
||||
referenceTemplate = ExtResource("14_0l0dn")
|
||||
categoryTemplate = ExtResource("20_kicyn")
|
||||
|
||||
[node name="温湿度标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "submitButton", "handleEdit", "temperatureEdit", "humidityEdit", "hintsLabel")]
|
||||
script = ExtResource("26_a6qku")
|
||||
service = NodePath("../标识解析服务")
|
||||
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/更新温湿度-button2")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2/LineEdit")
|
||||
temperatureEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2/LineEdit2")
|
||||
humidityEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/GridContainer2/LineEdit3")
|
||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/Label3")
|
||||
|
||||
[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="draw" from="Layout/UX Window Service/Horizontal Layout/内容/标注注册" to="标识注册服务" method="Rebuild"]
|
||||
|
|
|
@ -52,22 +52,22 @@
|
|||
- [ ] 智能提示
|
||||
- [x] 根据现有的`标识数据结构`进行简化
|
||||
- [x] 创建`标识模板管理`页面
|
||||
- [ ] 创建
|
||||
- [x] 创建
|
||||
- [ ] 删除
|
||||
- [ ] 编辑
|
||||
- [x] 编辑
|
||||
- [x] 创建根据模板注册标识的`标识注册`页面
|
||||
- [ ] 根据生产步骤,基于`标识模板` `注册`需要的标识
|
||||
- [ ] 接入已有的温湿度传感器检测模板
|
||||
- [ ] 添加`自动更新温湿度标识`的按钮
|
||||
- [ ] 创建`标识解析`页面,页面中需要包括:
|
||||
- [ ] 模拟搜索框
|
||||
- [ ] 标识码
|
||||
- [x] 添加`自动更新温湿度标识`的按钮
|
||||
- [x] 创建`标识解析`页面,页面中需要包括:
|
||||
- [x] 模拟搜索框
|
||||
- [x] 标识码
|
||||
- [ ] 产品名称
|
||||
- [ ] 创建时间
|
||||
- [ ] 最后更新时间
|
||||
- [ ] 解析结果显示:
|
||||
- [ ] 已完成标识解析
|
||||
- [ ] 未找到标识
|
||||
- [x] 创建时间
|
||||
- [x] 最后更新时间
|
||||
- [x] 解析结果显示:
|
||||
- [x] 已完成标识解析
|
||||
- [x] 未找到标识
|
||||
- [ ] 解析错误
|
||||
- [ ] 给出错误提示和原因
|
||||
## 更改记录
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-preview.4.23259.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0-preview.4.23259.5" />
|
||||
<PackageReference Include="SharpModbus" Version="2.0.0" />
|
||||
<PackageReference Include="UniTask" Version="2.3.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue