提交更新
This commit is contained in:
parent
4af7cec47b
commit
498b0617f8
|
@ -4,10 +4,10 @@
|
|||
|
||||
[node name="LineEditTemplate" type="PanelContainer" node_paths=PackedStringArray("label", "labels", "lineEdit", "lineEdits")]
|
||||
script = ExtResource("1_yrfyl")
|
||||
label = NodePath("MarginContainer/Layout/Label")
|
||||
labels = []
|
||||
lineEdit = NodePath("MarginContainer/Layout/LineEdit")
|
||||
lineEdits = []
|
||||
label = NodePath("MarginContainer/Layout/0/Label")
|
||||
labels = [NodePath("MarginContainer/Layout/0/Label"), NodePath("MarginContainer/Layout/1/Label"), NodePath("MarginContainer/Layout/2/Label")]
|
||||
lineEdit = NodePath("MarginContainer/Layout/0/LineEdit")
|
||||
lineEdits = [NodePath("MarginContainer/Layout/0/LineEdit"), NodePath("MarginContainer/Layout/1/LineEdit"), NodePath("MarginContainer/Layout/2/LineEdit")]
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
@ -16,12 +16,46 @@ theme_type_variation = &"Margin_16px"
|
|||
[node name="Layout" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/Layout"]
|
||||
[node name="0" type="HBoxContainer" parent="MarginContainer/Layout"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/Layout/0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "格式 e.g.温湿度"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="MarginContainer/Layout"]
|
||||
[node name="LineEdit" type="LineEdit" parent="MarginContainer/Layout/0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "温湿度 e.g 42"
|
||||
|
||||
[node name="1" type="HBoxContainer" parent="MarginContainer/Layout"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/Layout/1"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "格式 e.g.温湿度"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="MarginContainer/Layout/1"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "温湿度 e.g 42"
|
||||
|
||||
[node name="2" type="HBoxContainer" parent="MarginContainer/Layout"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/Layout/2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "格式 e.g.温湿度"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="MarginContainer/Layout/2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "温湿度 e.g 42"
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bt1gj2uco85y0"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://btc6smeueu517" path="res://Artists/Templates/LineEditTemplate.tscn" id="1_qiqof"]
|
||||
|
||||
[node name="LineEditTemplate" instance=ExtResource("1_qiqof")]
|
||||
|
||||
[node name="Label" parent="MarginContainer/Layout/0" index="0"]
|
||||
visible = false
|
||||
|
||||
[node name="LineEdit" parent="MarginContainer/Layout/0" index="1"]
|
||||
placeholder_text = "1"
|
||||
|
||||
[node name="1" parent="MarginContainer/Layout" index="1"]
|
||||
visible = true
|
||||
|
||||
[node name="Label" parent="MarginContainer/Layout/1" index="0"]
|
||||
visible = false
|
||||
|
||||
[node name="LineEdit" parent="MarginContainer/Layout/1" index="1"]
|
||||
placeholder_text = "2"
|
||||
|
||||
[node name="2" parent="MarginContainer/Layout" index="2"]
|
||||
visible = true
|
||||
|
||||
[node name="Label" parent="MarginContainer/Layout/2" index="0"]
|
||||
visible = false
|
||||
|
||||
[node name="LineEdit" parent="MarginContainer/Layout/2" index="1"]
|
||||
placeholder_text = "3"
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BITKit;
|
||||
|
@ -8,7 +9,6 @@ namespace BITKit;
|
|||
|
||||
public class SqlLiteContext<T> : DbContext,IDatabaseContext<T> where T : class
|
||||
{
|
||||
|
||||
public DbSet<T> context { get; private set; }
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
|
@ -20,6 +20,12 @@ public class SqlLiteContext<T> : DbContext,IDatabaseContext<T> where T : class
|
|||
context.Add(entity);
|
||||
SaveChanges();
|
||||
}
|
||||
|
||||
public UniTask AddAsync(T entity)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual void Remove(T entity)
|
||||
{
|
||||
context.Remove(entity);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Godot;
|
||||
|
||||
|
@ -8,11 +9,23 @@ public static class LabelExtensions
|
|||
public static async void SetTextAsync(this Label self, string text)
|
||||
{
|
||||
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||
if (self is not null)
|
||||
self.Text = text;
|
||||
}
|
||||
|
||||
public static async void SetTextAsync(this RichTextLabel self, string text)
|
||||
{
|
||||
var path = self.SceneFilePath;
|
||||
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||
try
|
||||
{
|
||||
self.Text = text;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
BIT4Log.Warnning(path);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using BITKit;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
|
||||
|
||||
namespace BITFactory;
|
||||
|
||||
|
@ -16,7 +18,7 @@ public partial class IDIS_RegisterService : Node
|
|||
[Export] private NodeBuilder templateIndexBuilder;
|
||||
[Export] private LineEdit handleEdit;
|
||||
[Export] private Button generateHandleButton;
|
||||
[Export] private Control registerContainer;
|
||||
[Export] private NodeBuilder templateFormatBuilder;
|
||||
[Export] private Button registerButton;
|
||||
[Export] private ProgressBar registerProgress;
|
||||
|
||||
|
@ -27,7 +29,7 @@ public partial class IDIS_RegisterService : Node
|
|||
[ExportCategory("Hints")]
|
||||
[Export] private Label hints;
|
||||
|
||||
private readonly Dictionary<int,IDIS_Data> _currentValues = new();
|
||||
private readonly List<(string format,string value,string category)> _currentValues = new();
|
||||
private readonly List<string> _currentReferences = new();
|
||||
|
||||
public override void _Ready()
|
||||
|
@ -48,51 +50,40 @@ public partial class IDIS_RegisterService : Node
|
|||
{
|
||||
if (Engine.IsEditorHint()) return;
|
||||
templateIndexBuilder.Clear();
|
||||
templateFormatBuilder.Clear();
|
||||
foreach (var x in templateService.templates)
|
||||
{
|
||||
var container = templateIndexBuilder.Build<UXContainer>();
|
||||
container.button.Text = x.TemplateName;
|
||||
container.button.Pressed += () =>
|
||||
{
|
||||
OnItemClicked(x);
|
||||
Entry(x);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void OnItemClicked(IDIS_Template template)
|
||||
private void Entry(IDIS_Template template)
|
||||
{
|
||||
var grid = new GridContainer();
|
||||
grid.Columns = 2;
|
||||
grid.AddThemeConstantOverride("h_separation", 64);
|
||||
|
||||
registerContainer.AddChild(grid);
|
||||
|
||||
_currentValues.Clear();
|
||||
|
||||
var _dirIndex = 0;
|
||||
templateFormatBuilder.Clear();
|
||||
var currentIndex = 0;
|
||||
foreach (var x in template.Formats)
|
||||
{
|
||||
var label = new Label();
|
||||
var lineEdit = new LineEdit();
|
||||
var myIndex = currentIndex++;
|
||||
|
||||
var myIndex = _dirIndex++;
|
||||
_currentValues.Add((x.format, string.Empty, x.category));
|
||||
|
||||
label.Text = x.format;
|
||||
var formatContainer = templateFormatBuilder.Build<UXContainer>();
|
||||
|
||||
lineEdit.PlaceholderText = x.hint;
|
||||
lineEdit.SizeFlagsHorizontal = Control.SizeFlags.ExpandFill;
|
||||
formatContainer.labels[0].Text = x.format;
|
||||
formatContainer.lineEdits[0].PlaceholderText = x.hint;
|
||||
|
||||
_currentValues.Add(myIndex, new ()
|
||||
formatContainer.lineEdits[0].TextChanged += s =>
|
||||
{
|
||||
Format = x.format,
|
||||
Value = x.hint,
|
||||
Category = x.category
|
||||
});
|
||||
|
||||
lineEdit.TextChanged += (s) => { _currentValues[myIndex].Value = s; };
|
||||
|
||||
grid.AddChild(label);
|
||||
grid.AddChild(lineEdit);
|
||||
var value = _currentValues[myIndex];
|
||||
value.value = s;
|
||||
_currentValues[myIndex] = value;
|
||||
};
|
||||
}
|
||||
|
||||
handleEdit.Editable = true;
|
||||
|
@ -117,6 +108,13 @@ public partial class IDIS_RegisterService : Node
|
|||
}
|
||||
private void Register()
|
||||
{
|
||||
if (_currentValues.Any(x =>
|
||||
string.IsNullOrEmpty(x.format) || string.IsNullOrEmpty(x.value) || string.IsNullOrEmpty(x.category)))
|
||||
{
|
||||
hints.SetTextAsync("请填写完整的数据格式");
|
||||
return;
|
||||
}
|
||||
|
||||
var handle = string.IsNullOrEmpty(handleEdit.Text) ? IDIS_Service.GenerateHandle() : handleEdit.Text;
|
||||
var dataJson = JsonHelper.Get(_currentValues);
|
||||
var referenceJson = JsonHelper.Get(_currentReferences);
|
||||
|
@ -131,7 +129,7 @@ public partial class IDIS_RegisterService : Node
|
|||
service.Register(handle);
|
||||
foreach (var x in _currentValues)
|
||||
{
|
||||
service.Register(handle, x.Value.Format, x.Value.Value,x.Value.Category);
|
||||
service.Register(handle, x.format, x.value,x.category);
|
||||
}
|
||||
foreach (var x in _currentReferences)
|
||||
{
|
||||
|
|
|
@ -130,6 +130,7 @@ public class IDIS_DBContext:DbContext
|
|||
//var sql = SQLiteContextHelper.GetConnectionString("IDIS");
|
||||
SQLiteContextHelper.GetConnectionSqlAndPath("IDIS",out var sql,out var path);
|
||||
optionsBuilder.UseSqlite(sql);
|
||||
optionsBuilder.UseQueryTrackingBehavior(QueryTrackingBehavior.TrackAll);
|
||||
BIT4Log.Log<IDIS_DBContext>($"已创建标识数据库:{path}");
|
||||
}
|
||||
|
||||
|
@ -141,8 +142,9 @@ public class IDIS_DBContext:DbContext
|
|||
/// <returns>是否查询到了内容</returns>
|
||||
public bool Query(string key, out IDIS_Query[] queries)
|
||||
{
|
||||
ChangeTracker.DetectChanges();
|
||||
ChangeTracker.Clear();
|
||||
queries = Values
|
||||
.ToList()
|
||||
.Where(x => x.Handle.Contains(key))
|
||||
.Select(x => new IDIS_Query()
|
||||
{
|
||||
|
@ -233,6 +235,13 @@ public partial class IDIS_Service:Node
|
|||
BIT4Log.Log<IDIS_Service>("已创建标识数据库");
|
||||
UniTask.Run(()=>Context.Database.EnsureCreatedAsync());
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
Context.Dispose();
|
||||
Context = null;
|
||||
}
|
||||
|
||||
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,string category) => Context.Register(handle, format, value,category);
|
||||
|
|
|
@ -6,11 +6,22 @@ using System.Timers;
|
|||
using BITFactory;
|
||||
using BITKit;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using SQLitePCL;
|
||||
using Timer = System.Timers.Timer;
|
||||
// ReSharper disable All
|
||||
|
||||
namespace BITFactory;
|
||||
public partial class IDIS_THService : Node
|
||||
{
|
||||
public enum UpdateMode
|
||||
{
|
||||
None,
|
||||
Update,
|
||||
Insert,
|
||||
}
|
||||
|
||||
[Export] private UpdateMode currentUpdateMode = UpdateMode.Insert;
|
||||
|
||||
[ExportCategory("Services")]
|
||||
[Export] private IDIS_Service service;
|
||||
|
||||
|
@ -19,6 +30,7 @@ public partial class IDIS_THService : Node
|
|||
[ExportCategory("UI 绑定")]
|
||||
[Export] private Button submitButton;
|
||||
[Export] private CheckButton autoUpdateButton;
|
||||
[Export] private OptionButton updateModeButton;
|
||||
[Export] private LineEdit handleEdit;
|
||||
[Export] private LineEdit temperatureEdit;
|
||||
[Export] private LineEdit humidityEdit;
|
||||
|
@ -38,6 +50,15 @@ public partial class IDIS_THService : Node
|
|||
autoUpdateTimer.Enabled = toggle;
|
||||
};
|
||||
|
||||
updateModeButton.GetPopup().Clear();
|
||||
updateModeButton.GetPopup().AddItem("不更新");
|
||||
updateModeButton.GetPopup().AddItem("更新记录");
|
||||
updateModeButton.GetPopup().AddItem("添加记录");
|
||||
updateModeButton.GetPopup().IndexPressed += index =>
|
||||
{
|
||||
currentUpdateMode = (UpdateMode)index;
|
||||
};
|
||||
|
||||
autoUpdateTimer = new Timer();
|
||||
autoUpdateTimer.AutoReset = true;
|
||||
autoUpdateTimer.Interval = 1000;
|
||||
|
@ -47,7 +68,7 @@ public partial class IDIS_THService : Node
|
|||
private async void AutoUpdate(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||
UpdateByReader();
|
||||
UpdateTH(handleEdit.Text,thReader.temperature.ToString(),thReader.humidity.ToString());
|
||||
}
|
||||
|
||||
private void Submit()
|
||||
|
@ -64,44 +85,39 @@ public partial class IDIS_THService : Node
|
|||
hintsLabel.Text = "请输入湿度";
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (service.Update(handleEdit.Text, "温度", humidityEdit.Text) is false)
|
||||
{
|
||||
hintsLabel.Text = "温度更新失败: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
return;
|
||||
}
|
||||
if (service.Update(handleEdit.Text, "湿度", temperatureEdit.Text) is false)
|
||||
{
|
||||
hintsLabel.Text = "湿度更新失败: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
return;
|
||||
}
|
||||
hintsLabel.Text = "更新成功: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
hintsLabel.Text = e.Message;
|
||||
throw;
|
||||
}
|
||||
UpdateTH(handleEdit.Text,temperatureEdit.Text,humidityEdit.Text);
|
||||
}
|
||||
|
||||
private void UpdateByReader()
|
||||
private void UpdateTH(string handle,string temperature,string humidity)
|
||||
{
|
||||
if (string.IsNullOrEmpty(handleEdit.Text))
|
||||
if (string.IsNullOrEmpty(handle))
|
||||
{
|
||||
autoUpdateLabel.SetTextAsync("空的标识码");
|
||||
return;
|
||||
}
|
||||
if (service.Update(handleEdit.Text, "温度", thReader.temperature.ToString(CultureInfo.InvariantCulture)) is false)
|
||||
|
||||
switch (currentUpdateMode)
|
||||
{
|
||||
case UpdateMode.Insert:
|
||||
service.Register(handle ,"温度", temperature, "环境");
|
||||
service.Register(handle, "湿度", humidity, "环境");
|
||||
break;
|
||||
case UpdateMode.Update:
|
||||
if (service.Update(handle, "温度",temperature) is false)
|
||||
{
|
||||
autoUpdateLabel.SetTextAsync("温度更新失败,未知异常");
|
||||
return;
|
||||
}
|
||||
if (service.Update(handleEdit.Text, "湿度", thReader.humidity.ToString(CultureInfo.InvariantCulture)) is false)
|
||||
|
||||
if (service.Update(handle, "湿度",humidity) is false)
|
||||
{
|
||||
autoUpdateLabel.SetTextAsync("湿度更新失败,未知异常");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
autoUpdateLabel.SetTextAsync($"温湿度已自动更新:{DateTime.Now}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ public partial class IDIS_TemplateService : Node
|
|||
[Export] private Button createButton;
|
||||
[Export] private Button newFormatButton;
|
||||
[Export] private NodeBuilder templateIndexBuilder;
|
||||
[Export] private NodeBuilder templateFormatBuilder;
|
||||
[Export] private LineEdit templateNameEdit;
|
||||
[Export] private LineEdit templateDescriptionEdit;
|
||||
[Export] private Control container;
|
||||
[Export] private Label templateCreateTimeLabel;
|
||||
[Export] private Label templateUpdateTimeLabel;
|
||||
[ExportCategory("Template")]
|
||||
|
@ -56,9 +56,6 @@ public partial class IDIS_TemplateService : Node
|
|||
templateNameEdit.TextChanged += OnTemplateNameChanged;
|
||||
templateDescriptionEdit.TextChanged += OnTemplateDescriptionChanged;
|
||||
|
||||
|
||||
MathNode.ClearChild(container);
|
||||
|
||||
EnsureConfigure();
|
||||
}
|
||||
|
||||
|
@ -108,9 +105,8 @@ public partial class IDIS_TemplateService : Node
|
|||
|
||||
private void EnsureConfigure()
|
||||
{
|
||||
MathNode.ClearChild(container);
|
||||
|
||||
templateIndexBuilder.Clear();
|
||||
templateFormatBuilder.Clear();
|
||||
|
||||
foreach (var x in templates)
|
||||
{
|
||||
|
@ -133,7 +129,7 @@ public partial class IDIS_TemplateService : Node
|
|||
for (var i = 0; i < _selectedTemplate.Formats.Count; i++)
|
||||
{
|
||||
var x = _selectedTemplate.Formats[i];
|
||||
var _container = templateContainer.Instantiate<UXContainer>();
|
||||
var _container = templateFormatBuilder.Build<UXContainer>();
|
||||
|
||||
_container.lineEdits[0].Text = x.format;
|
||||
_container.lineEdits[1].Text = x.hint;
|
||||
|
@ -165,8 +161,6 @@ public partial class IDIS_TemplateService : Node
|
|||
_selectedTemplate.Formats.RemoveAt(index);
|
||||
EnsureConfigure();
|
||||
};
|
||||
|
||||
container.AddChild(_container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ public partial class 温湿度Reader : Node
|
|||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
_CancellationTokenSource.Cancel();
|
||||
timer.Stop();
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -107,14 +108,16 @@ public partial class 温湿度Reader : Node
|
|||
/// <param name="e"></param>
|
||||
private async void OnTimerElapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
_CancellationTokenSource.Cancel();
|
||||
await UniTask.SwitchToTaskPool();
|
||||
try
|
||||
{
|
||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
||||
hintsLabel.SetTextAsync( "正在读取温湿度数据..."+DateTime.Now);
|
||||
|
||||
var vs = _modbus.ReadInputRegisters(1, 0, 2);
|
||||
|
||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
||||
|
||||
hintsLabel.SetTextAsync( "已采集到数据,正在解析..."+DateTime.Now);
|
||||
|
||||
if (vs is not { Length: 2 })
|
||||
|
@ -131,17 +134,19 @@ public partial class 温湿度Reader : Node
|
|||
|
||||
temperatureContaier.label.SetTextAsync(temperature.ToString(CultureInfo.InvariantCulture)); ;
|
||||
humidityContainer.label.SetTextAsync(humidity.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
timer.Start();
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
hintsLabel.SetTextAsync("连接超时:"+DateTime.Now);
|
||||
BIT4Log.Log<温湿度Reader>($"Modbus读取任务已取消");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
hintsLabel.SetTextAsync(ex.Message);
|
||||
//GD.Print("ex:" + ex);
|
||||
}
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cssrvfsoqqmue"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bt1gj2uco85y0" path="res://Artists/Templates/LineEditTemplate_LineEdit_x3.tscn" id="1_6tw0s"]
|
||||
|
||||
[node name="LineEditTemplate" node_paths=PackedStringArray("button") instance=ExtResource("1_6tw0s")]
|
||||
button = NodePath("MarginContainer/Layout/Button")
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/Layout" index="3"]
|
||||
layout_mode = 2
|
||||
text = "删除"
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=43 format=3 uid="uid://cngf2h2a5ne4a"]
|
||||
[gd_scene load_steps=44 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"]
|
||||
|
@ -27,6 +27,7 @@
|
|||
[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="PackedScene" uid="uid://cssrvfsoqqmue" path="res://Mods/工业数据采集与分析应用分享/Templates/标识格式注册模板.tscn" id="17_ljnoi"]
|
||||
[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"]
|
||||
|
@ -304,22 +305,17 @@ layout_mode = 2
|
|||
theme_type_variation = &"HeaderLarge"
|
||||
text = "模板信息"
|
||||
|
||||
[node name="name-edit" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
[node name="模板名称" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer" instance=ExtResource("16_il4as")]
|
||||
layout_mode = 2
|
||||
placeholder_text = "标识模板名称"
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.5
|
||||
|
||||
[node name="Label3" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
text = "模板属性"
|
||||
[node name="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板名称/MarginContainer/Layout/0" index="0"]
|
||||
text = "名称"
|
||||
|
||||
[node name="description-edit" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
[node name="模板介绍" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer" instance=ExtResource("16_il4as")]
|
||||
layout_mode = 2
|
||||
placeholder_text = "该模板用于xxx"
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.5
|
||||
|
||||
[node name="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板介绍/MarginContainer/Layout/0" index="0"]
|
||||
text = "介绍"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -359,52 +355,49 @@ columns = 3
|
|||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "数据名称"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[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 = "提示/默认值"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[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 = "分类"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Format-Container" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer"]
|
||||
[node name="Layout" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("14_q0cb2")
|
||||
template = ExtResource("17_ljnoi")
|
||||
|
||||
[node name="标识模板格式" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" instance=ExtResource("3_gmthc")]
|
||||
[node name="LineEditTemplate" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Layout" instance=ExtResource("17_ljnoi")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="标识模板格式2" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
[node name="LineEditTemplate2" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Layout" node_paths=PackedStringArray("label", "button", "labels", "lineEdit", "lineEdits") instance=ExtResource("17_ljnoi")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
label = NodePath("../LineEditTemplate/MarginContainer/Layout/0/Label")
|
||||
button = NodePath("../LineEditTemplate/MarginContainer/Layout/Button")
|
||||
labels = [NodePath("../LineEditTemplate/MarginContainer/Layout/0/Label"), NodePath("../LineEditTemplate/MarginContainer/Layout/1/Label"), NodePath("../LineEditTemplate/MarginContainer/Layout/2/Label")]
|
||||
lineEdit = NodePath("../LineEditTemplate/MarginContainer/Layout/0/LineEdit")
|
||||
lineEdits = [NodePath("../LineEditTemplate/MarginContainer/Layout/0/LineEdit"), NodePath("../LineEditTemplate/MarginContainer/Layout/1/LineEdit"), NodePath("../LineEditTemplate/MarginContainer/Layout/2/LineEdit")]
|
||||
|
||||
[node name="标识模板格式3" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
[node name="LineEditTemplate3" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Layout" node_paths=PackedStringArray("label", "button", "labels", "lineEdit", "lineEdits") instance=ExtResource("17_ljnoi")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
|
||||
[node name="标识模板格式4" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
|
||||
[node name="标识模板格式5" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
|
||||
[node name="标识模板格式6" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
|
||||
[node name="标识模板格式7" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container" node_paths=PackedStringArray("lineEdits") instance=ExtResource("3_gmthc")]
|
||||
layout_mode = 2
|
||||
lineEdits = [NodePath("../标识模板格式/HBoxContainer/name-edit"), NodePath("../标识模板格式/HBoxContainer/hint-edit")]
|
||||
label = NodePath("../LineEditTemplate/MarginContainer/Layout/0/Label")
|
||||
button = NodePath("../LineEditTemplate/MarginContainer/Layout/Button")
|
||||
labels = [NodePath("../LineEditTemplate/MarginContainer/Layout/0/Label"), NodePath("../LineEditTemplate/MarginContainer/Layout/1/Label"), NodePath("../LineEditTemplate/MarginContainer/Layout/2/Label")]
|
||||
lineEdit = NodePath("../LineEditTemplate/MarginContainer/Layout/0/LineEdit")
|
||||
lineEdits = [NodePath("../LineEditTemplate/MarginContainer/Layout/0/LineEdit"), NodePath("../LineEditTemplate/MarginContainer/Layout/1/LineEdit"), NodePath("../LineEditTemplate/MarginContainer/Layout/2/LineEdit")]
|
||||
|
||||
[node name="Button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -438,6 +431,7 @@ text = "当我们创建标识模板后,我们就可以通过标识模板快速
|
|||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 64
|
||||
|
||||
[node name="NodeBuilder" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("emptyHints")]
|
||||
|
@ -493,12 +487,15 @@ text = "在这里填写注册表单"
|
|||
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="handle-edit" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer"]
|
||||
[node name="注册标识-标识码" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer" instance=ExtResource("16_il4as")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "留空则自动创建标识"
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.5
|
||||
|
||||
[node name="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/注册标识-标识码/MarginContainer/Layout/0" index="0"]
|
||||
text = "标识码"
|
||||
|
||||
[node name="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/注册标识-标识码/MarginContainer/Layout/0" index="1"]
|
||||
placeholder_text = "8.123.99/XXXXXXXX"
|
||||
|
||||
[node name="generate-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -517,9 +514,18 @@ layout_mode = 2
|
|||
theme_type_variation = &"HeaderSmall"
|
||||
text = "标识值"
|
||||
|
||||
[node name="register-container" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer"]
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="register-container" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource("14_q0cb2")
|
||||
template = ExtResource("16_il4as")
|
||||
|
||||
[node name="LineEditTemplate" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/ScrollContainer/register-container" instance=ExtResource("16_il4as")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
@ -624,11 +630,11 @@ text = "通过模板更新标识数据"
|
|||
[node name="LineEditTemplate" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer" instance=ExtResource("16_il4as")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout" index="0"]
|
||||
text = "标识码"
|
||||
[node name="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout/0" index="0"]
|
||||
text = "标识码:"
|
||||
|
||||
[node name="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout" index="1"]
|
||||
placeholder_text = "88.123.99/XXXXXXXXXXXXXXXX"
|
||||
[node name="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout/0" index="1"]
|
||||
placeholder_text = "8.123.99/XXXXXXXX"
|
||||
|
||||
[node name="generate-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout" index="2"]
|
||||
visible = false
|
||||
|
@ -1041,7 +1047,16 @@ layout_mode = 2
|
|||
layout_mode = 2
|
||||
text = "自动更新"
|
||||
|
||||
[node name="更新温湿度-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
[node name="更新模式-button" type="OptionButton" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
item_count = 2
|
||||
selected = 0
|
||||
popup/item_0/text = "更新记录"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "添加记录"
|
||||
popup/item_1/id = 1
|
||||
|
||||
[node name="更新温湿度-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "更新温湿度"
|
||||
|
@ -1112,32 +1127,42 @@ layout_mode = 2
|
|||
[node name="标识解析服务" type="Node" parent="."]
|
||||
script = ExtResource("3_xbtmk")
|
||||
|
||||
[node name="标识模板服务" type="Node" parent="." node_paths=PackedStringArray("createButton", "newFormatButton", "templateIndexBuilder", "templateNameEdit", "templateDescriptionEdit", "container", "templateCreateTimeLabel", "templateUpdateTimeLabel")]
|
||||
[node name="标识模板服务" type="Node" parent="." node_paths=PackedStringArray("createButton", "newFormatButton", "templateIndexBuilder", "templateFormatBuilder", "templateNameEdit", "templateDescriptionEdit", "templateCreateTimeLabel", "templateUpdateTimeLabel")]
|
||||
script = ExtResource("4_oj8cs")
|
||||
createButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/Button")
|
||||
newFormatButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/Button")
|
||||
templateIndexBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder")
|
||||
templateNameEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/name-edit")
|
||||
templateDescriptionEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/description-edit")
|
||||
container = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container")
|
||||
templateFormatBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Layout")
|
||||
templateNameEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板名称/MarginContainer/Layout/0/LineEdit")
|
||||
templateDescriptionEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板介绍/MarginContainer/Layout/0/LineEdit")
|
||||
templateCreateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/GridContainer/createTime-label")
|
||||
templateUpdateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/GridContainer/updateTime-label")
|
||||
templateContainer = ExtResource("3_gmthc")
|
||||
|
||||
[node name="标识注册服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "templateIndexBuilder", "handleEdit", "generateHandleButton", "registerContainer", "registerButton", "registerProgress", "referenceContainer", "addReferenceButton", "hints")]
|
||||
[node name="标识注册服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "templateIndexBuilder", "handleEdit", "generateHandleButton", "templateFormatBuilder", "registerButton", "registerProgress", "referenceContainer", "addReferenceButton", "hints")]
|
||||
script = ExtResource("8_6uwr0")
|
||||
service = NodePath("../标识解析服务")
|
||||
templateService = NodePath("../标识模板服务")
|
||||
templateIndexBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/handle-edit")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/注册标识-标识码/MarginContainer/Layout/0/LineEdit")
|
||||
generateHandleButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/generate-button")
|
||||
registerContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/register-container")
|
||||
templateFormatBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/ScrollContainer/register-container")
|
||||
registerButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/register-button")
|
||||
registerProgress = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/register-button/ProgressBar")
|
||||
referenceContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/reference-container")
|
||||
addReferenceButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/addReference-button")
|
||||
hints = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/Label2")
|
||||
|
||||
[node name="标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "indexBuilder", "templateBuilder", "handleEdit", "submitButton", "hintsLabel")]
|
||||
script = ExtResource("26_a6qku")
|
||||
service = NodePath("../标识解析服务")
|
||||
templateService = NodePath("../标识模板服务")
|
||||
indexBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder")
|
||||
templateBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/NodeBuilder")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout/0/LineEdit")
|
||||
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer2/Button")
|
||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer3/hints")
|
||||
|
||||
[node name="标识搜索服务" type="Node" parent="." node_paths=PackedStringArray("service", "searchEdit", "searchCandidateContainer", "searchEditPadding", "handleLabel", "createTimeLabel", "updateTimeLabel", "valueContainer", "referenceContainer")]
|
||||
script = ExtResource("16_14syv")
|
||||
service = NodePath("../标识解析服务")
|
||||
|
@ -1154,12 +1179,13 @@ valueTemplate = ExtResource("19_abuse")
|
|||
referenceTemplate = ExtResource("14_0l0dn")
|
||||
categoryTemplate = ExtResource("20_kicyn")
|
||||
|
||||
[node name="温湿度标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "thReader", "submitButton", "autoUpdateButton", "handleEdit", "temperatureEdit", "humidityEdit", "hintsLabel", "autoUpdateLabel")]
|
||||
[node name="温湿度标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "thReader", "submitButton", "autoUpdateButton", "updateModeButton", "handleEdit", "temperatureEdit", "humidityEdit", "hintsLabel", "autoUpdateLabel")]
|
||||
script = ExtResource("30_jn688")
|
||||
service = NodePath("../标识解析服务")
|
||||
thReader = NodePath("../温湿度传感器Reader")
|
||||
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/更新温湿度-button2")
|
||||
autoUpdateButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer/自动更新-button")
|
||||
updateModeButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer/更新模式-button")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2/LineEdit-0")
|
||||
temperatureEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit2")
|
||||
humidityEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit3")
|
||||
|
@ -1174,21 +1200,14 @@ ipEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿
|
|||
portEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2/LineEdit2")
|
||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/RichTextLabel")
|
||||
|
||||
[node name="标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "indexBuilder", "templateBuilder", "handleEdit", "submitButton", "hintsLabel")]
|
||||
script = ExtResource("26_a6qku")
|
||||
service = NodePath("../标识解析服务")
|
||||
templateService = NodePath("../标识模板服务")
|
||||
indexBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder")
|
||||
templateBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/NodeBuilder")
|
||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate/MarginContainer/Layout/LineEdit")
|
||||
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer2/Button")
|
||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer3/hints")
|
||||
|
||||
[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/内容/标识解析/Search/SearchEdit/HBoxContainer/refresh-button" to="标识搜索服务" method="Search"]
|
||||
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/标题栏Template"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板名称"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/模板介绍"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/标题栏Template"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/注册标识-标识码"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer/LineEditTemplate"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/标题栏Template"]
|
||||
[editable path="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer/传感器数据模板2"]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
using Godot;
|
||||
using BITKit;
|
||||
|
||||
|
@ -37,6 +39,8 @@ public partial class CourseElement : Node
|
|||
return;
|
||||
}
|
||||
|
||||
Stopwatch stopwatch = new();
|
||||
stopwatch.Start();
|
||||
if (CurrentScene?.Name == CourseScene?.ResourceName)
|
||||
{
|
||||
BIT4Log.Log<CourseElement>($"已返回当前课程");
|
||||
|
@ -52,6 +56,9 @@ public partial class CourseElement : Node
|
|||
CurrentScene = CourseScene!.Instantiate();
|
||||
GetTree().Root.AddChild(CurrentScene);
|
||||
UXService.Open(CurrentScene as Control);
|
||||
BIT4Log.Log<CourseElement>($"已加载新的课程:\t{CurrentScene.Name}");
|
||||
BIT4Log.Log<CourseElement>($"已加载新的课程:\t{CourseScene.ResourceName}");
|
||||
|
||||
stopwatch.Stop();
|
||||
BIT4Log.Log<CourseElement>($"加载课程耗时:\t{stopwatch.ElapsedMilliseconds}ms");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Godot.NET.Sdk/4.1.0">
|
||||
<PropertyGroup>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AGV_System\Vol.Net6\RosBridgeClient\RosBridgeClient.csproj" />
|
||||
|
@ -9,12 +9,12 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FuzzySharp" Version="2.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="7.0.9" />
|
||||
<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="MySql.EntityFrameworkCore" Version="6.0.13" />
|
||||
<PackageReference Include="MySql.EntityFrameworkCore" Version="7.0.2" />
|
||||
<PackageReference Include="SharpModbus" Version="2.0.0" />
|
||||
<PackageReference Include="UniTask" Version="2.3.3" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue