Before update to NET 7
This commit is contained in:
parent
ca824c3b32
commit
4af7cec47b
|
@ -1,6 +1,7 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://dey6r76kttak6"]
|
[gd_scene load_steps=4 format=3 uid="uid://dey6r76kttak6"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d1uver224k3px" path="res://addons/ui_design_tool/assets/icons/folder_open-white-18dp.svg" id="1_jbnj1"]
|
[ext_resource type="Texture2D" uid="uid://d1uver224k3px" path="res://addons/ui_design_tool/assets/icons/folder_open-white-18dp.svg" id="1_jbnj1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dn7q7grbfr7kh" path="res://addons/ui_design_tool/assets/icons/refresh-white-18dp.svg" id="1_miiu5"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uocfi"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uocfi"]
|
||||||
bg_color = Color(0.156863, 0.152941, 0.172549, 1)
|
bg_color = Color(0.156863, 0.152941, 0.172549, 1)
|
||||||
|
@ -35,7 +36,13 @@ text = "按钮"
|
||||||
[node name="Button3" type="Button" parent="Scroll/HBoxContainer/VBoxContainer"]
|
[node name="Button3" type="Button" parent="Scroll/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"ColorPanel"
|
theme_type_variation = &"ColorPanel"
|
||||||
|
text = "按钮 ColorPanel"
|
||||||
|
|
||||||
|
[node name="Button5" type="Button" parent="Scroll/HBoxContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
text = "按钮"
|
text = "按钮"
|
||||||
|
icon = ExtResource("1_miiu5")
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
[node name="Button4" type="Button" parent="Scroll/HBoxContainer/VBoxContainer"]
|
[node name="Button4" type="Button" parent="Scroll/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace BITKit;
|
||||||
|
|
||||||
|
public interface IDatabaseContext<T> where T : class
|
||||||
|
{
|
||||||
|
void Add(T entity);
|
||||||
|
UniTask AddAsync(T entity);
|
||||||
|
void Remove(T entity);
|
||||||
|
T[] GetArray();
|
||||||
|
bool TrySearch(Func<T, bool> searchFactory, out T result);
|
||||||
|
bool TrySearchArray(Func<T, bool> searchFactory, out T[] result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class EntityFrameworkContext<T>:DbContext ,IDatabaseContext<T> where T : class
|
||||||
|
{
|
||||||
|
protected DbSet<T> context { get; private set; }
|
||||||
|
|
||||||
|
public void Add(T entity)
|
||||||
|
{
|
||||||
|
context.Add(entity);
|
||||||
|
SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async UniTask AddAsync(T entity)
|
||||||
|
{
|
||||||
|
await context.AddAsync(entity);
|
||||||
|
await SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(T entity)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public T[] GetArray()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TrySearch(Func<T, bool> searchFactory, out T result)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TrySearchArray(Func<T, bool> searchFactory, out T[] result)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Logging.Console;
|
||||||
|
|
||||||
|
namespace BITKit;
|
||||||
|
|
||||||
|
public class MySQLContext<T>:DbContext where T:class
|
||||||
|
{
|
||||||
|
protected readonly string _connectSql;
|
||||||
|
protected DbSet<T> context { get; private set; }
|
||||||
|
public MySQLContext(string connectSql) : base()
|
||||||
|
{
|
||||||
|
_connectSql = connectSql;
|
||||||
|
}
|
||||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
|
{
|
||||||
|
optionsBuilder.UseMySQL("_connectSql");
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,14 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace BITKit;
|
namespace BITKit;
|
||||||
|
|
||||||
public interface IDatabaseContext<T> where T : class
|
|
||||||
{
|
|
||||||
void Add(T entity);
|
|
||||||
void Remove(T entity);
|
|
||||||
T[] GetArray();
|
|
||||||
bool TrySearch(Func<T, bool> searchFactory, out T result);
|
|
||||||
bool TrySearchArray(Func<T, bool> searchFactory, out T[] result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SqlLiteContext<T> : DbContext,IDatabaseContext<T> where T : class
|
public class SqlLiteContext<T> : DbContext,IDatabaseContext<T> where T : class
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace BITKit;
|
||||||
|
|
||||||
|
public static class LabelExtensions
|
||||||
|
{
|
||||||
|
public static async void SetTextAsync(this Label self, string text)
|
||||||
|
{
|
||||||
|
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||||
|
self.Text = text;
|
||||||
|
}
|
||||||
|
public static async void SetTextAsync(this RichTextLabel self,string text)
|
||||||
|
{
|
||||||
|
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||||
|
self.Text = text;
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,11 +11,9 @@ public partial class IDIS_RegisterService : Node
|
||||||
[ExportCategory("Services")]
|
[ExportCategory("Services")]
|
||||||
[Export] private IDIS_Service service;
|
[Export] private IDIS_Service service;
|
||||||
[Export] private IDIS_TemplateService templateService;
|
[Export] private IDIS_TemplateService templateService;
|
||||||
|
|
||||||
[ExportCategory("TemplateList")]
|
[ExportCategory("UI 绑定")]
|
||||||
[Export] private ItemList templateList;
|
[Export] private NodeBuilder templateIndexBuilder;
|
||||||
|
|
||||||
[ExportCategory("Register Data")]
|
|
||||||
[Export] private LineEdit handleEdit;
|
[Export] private LineEdit handleEdit;
|
||||||
[Export] private Button generateHandleButton;
|
[Export] private Button generateHandleButton;
|
||||||
[Export] private Control registerContainer;
|
[Export] private Control registerContainer;
|
||||||
|
@ -34,8 +32,6 @@ public partial class IDIS_RegisterService : Node
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
templateList.ItemClicked += OnItemClicked;
|
|
||||||
|
|
||||||
registerButton.Pressed += Register;
|
registerButton.Pressed += Register;
|
||||||
|
|
||||||
generateHandleButton.Pressed += ()=>handleEdit.Text = IDIS_Service.GenerateHandle();
|
generateHandleButton.Pressed += ()=>handleEdit.Text = IDIS_Service.GenerateHandle();
|
||||||
|
@ -51,21 +47,20 @@ public partial class IDIS_RegisterService : Node
|
||||||
private void Rebuild()
|
private void Rebuild()
|
||||||
{
|
{
|
||||||
if (Engine.IsEditorHint()) return;
|
if (Engine.IsEditorHint()) return;
|
||||||
templateList.Clear();
|
templateIndexBuilder.Clear();
|
||||||
foreach (var x in templateService.templates)
|
foreach (var x in templateService.templates)
|
||||||
{
|
{
|
||||||
templateList.AddItem(x.TemplateName);
|
var container = templateIndexBuilder.Build<UXContainer>();
|
||||||
|
container.button.Text = x.TemplateName;
|
||||||
|
container.button.Pressed += () =>
|
||||||
|
{
|
||||||
|
OnItemClicked(x);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnItemClicked(long index, Vector2 atPosition, long mouseButtonIndex)
|
private void OnItemClicked(IDIS_Template template)
|
||||||
{
|
{
|
||||||
MathNode.ClearChild(registerContainer);
|
|
||||||
MathNode.ClearChild(referenceContainer);
|
|
||||||
|
|
||||||
var template = templateService.templates[(int)index];
|
|
||||||
|
|
||||||
|
|
||||||
var grid = new GridContainer();
|
var grid = new GridContainer();
|
||||||
grid.Columns = 2;
|
grid.Columns = 2;
|
||||||
grid.AddThemeConstantOverride("h_separation", 64);
|
grid.AddThemeConstantOverride("h_separation", 64);
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class IDIS_DBContext:DbContext
|
||||||
Handle = handle
|
Handle = handle
|
||||||
};
|
};
|
||||||
Values.Add(value);
|
Values.Add(value);
|
||||||
SaveChanges();
|
SaveChangesAsync();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public void Register(string handle,string format, string value,string category)
|
public void Register(string handle,string format, string value,string category)
|
||||||
|
@ -197,7 +197,7 @@ public class IDIS_DBContext:DbContext
|
||||||
Category = category,
|
Category = category,
|
||||||
};
|
};
|
||||||
Datas.Add(data);
|
Datas.Add(data);
|
||||||
SaveChanges();
|
SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterReference(string handle, string refenceHandle)
|
public void RegisterReference(string handle, string refenceHandle)
|
||||||
|
@ -207,19 +207,17 @@ public class IDIS_DBContext:DbContext
|
||||||
Handle = handle,
|
Handle = handle,
|
||||||
RelatedHandle = refenceHandle,
|
RelatedHandle = refenceHandle,
|
||||||
});
|
});
|
||||||
SaveChanges();
|
SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Update(string handle, string format, string value)
|
public bool Update(string handle, string format, string value)
|
||||||
{
|
{
|
||||||
var result = Datas.FirstOrDefault(x => x.Handle == handle && x.Format == format);
|
var result = Datas.FirstOrDefault(x => x.Handle == handle && x.Format == format);
|
||||||
if (result is not null)
|
if (result is null) return false;
|
||||||
{
|
result.UpdateTime=DateTime.Now;
|
||||||
result.UpdateTime=DateTime.Now;
|
result.Value = value;
|
||||||
result.Value = value;
|
SaveChangesAsync();
|
||||||
SaveChanges();
|
return true;
|
||||||
}
|
|
||||||
return result is not null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ReSharper disable once IdentifierTypo
|
// ReSharper disable once IdentifierTypo
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
|
using System.Timers;
|
||||||
using BITFactory;
|
using BITFactory;
|
||||||
|
using BITKit;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace BITFactory;
|
namespace BITFactory;
|
||||||
public partial class IDIS_THService : Node
|
public partial class IDIS_THService : Node
|
||||||
|
@ -12,14 +18,38 @@ public partial class IDIS_THService : Node
|
||||||
|
|
||||||
[ExportCategory("UI 绑定")]
|
[ExportCategory("UI 绑定")]
|
||||||
[Export] private Button submitButton;
|
[Export] private Button submitButton;
|
||||||
|
[Export] private CheckButton autoUpdateButton;
|
||||||
[Export] private LineEdit handleEdit;
|
[Export] private LineEdit handleEdit;
|
||||||
[Export] private LineEdit temperatureEdit;
|
[Export] private LineEdit temperatureEdit;
|
||||||
[Export] private LineEdit humidityEdit;
|
[Export] private LineEdit humidityEdit;
|
||||||
[Export] private RichTextLabel hintsLabel;
|
[Export] private RichTextLabel hintsLabel;
|
||||||
|
[Export] private RichTextLabel autoUpdateLabel;
|
||||||
|
|
||||||
|
private Timer autoUpdateTimer;
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
submitButton.Pressed += Submit;
|
submitButton.Pressed += Submit;
|
||||||
|
autoUpdateButton.Toggled += toggle =>
|
||||||
|
{
|
||||||
|
submitButton.Disabled = toggle;
|
||||||
|
handleEdit.Editable = !toggle;
|
||||||
|
temperatureEdit.Editable = !toggle;
|
||||||
|
humidityEdit.Editable = !toggle;
|
||||||
|
autoUpdateTimer.Enabled = toggle;
|
||||||
|
};
|
||||||
|
|
||||||
|
autoUpdateTimer = new Timer();
|
||||||
|
autoUpdateTimer.AutoReset = true;
|
||||||
|
autoUpdateTimer.Interval = 1000;
|
||||||
|
autoUpdateTimer.Elapsed += AutoUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void AutoUpdate(object sender, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
||||||
|
UpdateByReader();
|
||||||
|
}
|
||||||
|
|
||||||
private void Submit()
|
private void Submit()
|
||||||
{
|
{
|
||||||
switch (handleEdit.Text, temperatureEdit.Text, humidityEdit.Text)
|
switch (handleEdit.Text, temperatureEdit.Text, humidityEdit.Text)
|
||||||
|
@ -57,6 +87,21 @@ public partial class IDIS_THService : Node
|
||||||
|
|
||||||
private void UpdateByReader()
|
private void UpdateByReader()
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(handleEdit.Text))
|
||||||
|
{
|
||||||
|
autoUpdateLabel.SetTextAsync("空的标识码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (service.Update(handleEdit.Text, "温度", thReader.temperature.ToString(CultureInfo.InvariantCulture)) is false)
|
||||||
|
{
|
||||||
|
autoUpdateLabel.SetTextAsync("温度更新失败,未知异常");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (service.Update(handleEdit.Text, "湿度", thReader.humidity.ToString(CultureInfo.InvariantCulture)) is false)
|
||||||
|
{
|
||||||
|
autoUpdateLabel.SetTextAsync("湿度更新失败,未知异常");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
autoUpdateLabel.SetTextAsync($"温湿度已自动更新:{DateTime.Now}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
using Godot;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
|
||||||
using BITKit;
|
using BITKit;
|
||||||
using BITKit.IO;
|
using BITKit.IO;
|
||||||
using RosSharp.RosBridgeClient.MessageTypes.Moveit;
|
using Godot;
|
||||||
|
|
||||||
namespace BITFactory;
|
namespace BITFactory;
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -24,11 +22,11 @@ public partial class IDIS_TemplateService : Node
|
||||||
private static string assetPath => PathHelper.GetPath("标识注册模板.zip");
|
private static string assetPath => PathHelper.GetPath("标识注册模板.zip");
|
||||||
private const string templateName = $"{nameof(IDIS_Template)}.json";
|
private const string templateName = $"{nameof(IDIS_Template)}.json";
|
||||||
public readonly List<IDIS_Template> templates=new();
|
public readonly List<IDIS_Template> templates=new();
|
||||||
private readonly Queue<IDIS_Template> selectedQueue = new();
|
|
||||||
[ExportCategory("Quick Start")]
|
[ExportCategory("Quick Start")]
|
||||||
[Export] private Button createButton;
|
[Export] private Button createButton;
|
||||||
[Export] private Button newFormatButton;
|
[Export] private Button newFormatButton;
|
||||||
[Export] private ItemList itemList;
|
[Export] private NodeBuilder templateIndexBuilder;
|
||||||
[Export] private LineEdit templateNameEdit;
|
[Export] private LineEdit templateNameEdit;
|
||||||
[Export] private LineEdit templateDescriptionEdit;
|
[Export] private LineEdit templateDescriptionEdit;
|
||||||
[Export] private Control container;
|
[Export] private Control container;
|
||||||
|
@ -39,13 +37,13 @@ public partial class IDIS_TemplateService : Node
|
||||||
|
|
||||||
private bool isDirty;
|
private bool isDirty;
|
||||||
|
|
||||||
private IDIS_Template _selectedTemplate=>_selectedIndex==-1?null:templates[_selectedIndex];
|
private IDIS_Template _selectedTemplate;
|
||||||
private int _selectedIndex=-1;
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
if (File.Exists(assetPath) is false)
|
if (File.Exists(assetPath) is false)
|
||||||
{
|
{
|
||||||
BIT4Log.Log<IDIS_TemplateService>($"未找到配置文件:{assetPath}");
|
BIT4Log.Log<IDIS_TemplateService>($"未找到配置文件:{assetPath}");
|
||||||
|
Save();
|
||||||
}
|
}
|
||||||
var temp = BITAssets.Read<List<IDIS_Template>>(assetPath, templateName);
|
var temp = BITAssets.Read<List<IDIS_Template>>(assetPath, templateName);
|
||||||
|
|
||||||
|
@ -55,9 +53,6 @@ public partial class IDIS_TemplateService : Node
|
||||||
createButton.Pressed += CreateTemplate;
|
createButton.Pressed += CreateTemplate;
|
||||||
newFormatButton.Pressed += CreateFormat;
|
newFormatButton.Pressed += CreateFormat;
|
||||||
|
|
||||||
itemList.ItemSelected += OnItemSelected;
|
|
||||||
itemList.ItemClicked += OnItemClicked;
|
|
||||||
|
|
||||||
templateNameEdit.TextChanged += OnTemplateNameChanged;
|
templateNameEdit.TextChanged += OnTemplateNameChanged;
|
||||||
templateDescriptionEdit.TextChanged += OnTemplateDescriptionChanged;
|
templateDescriptionEdit.TextChanged += OnTemplateDescriptionChanged;
|
||||||
|
|
||||||
|
@ -78,11 +73,7 @@ public partial class IDIS_TemplateService : Node
|
||||||
|
|
||||||
public override void _ExitTree()
|
public override void _ExitTree()
|
||||||
{
|
{
|
||||||
BITAssets.Build(assetPath,new IAsset[]
|
Save();
|
||||||
{
|
|
||||||
new BITAsset(templateName,JsonHelper.Get(templates))
|
|
||||||
});
|
|
||||||
BIT4Log.Log<IDIS_TemplateService>($"已创建配置文件:{assetPath}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateTemplate()
|
private void CreateTemplate()
|
||||||
|
@ -93,6 +84,15 @@ public partial class IDIS_TemplateService : Node
|
||||||
});
|
});
|
||||||
EnsureConfigure();
|
EnsureConfigure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Save()
|
||||||
|
{
|
||||||
|
BITAssets.Build(assetPath,new IAsset[]
|
||||||
|
{
|
||||||
|
new BITAsset(templateName,JsonHelper.Get(templates))
|
||||||
|
});
|
||||||
|
BIT4Log.Log<IDIS_TemplateService>($"已创建配置文件:{assetPath}");
|
||||||
|
}
|
||||||
private void OnTemplateNameChanged(string text)
|
private void OnTemplateNameChanged(string text)
|
||||||
{
|
{
|
||||||
if (_selectedTemplate is null) return;
|
if (_selectedTemplate is null) return;
|
||||||
|
@ -105,70 +105,68 @@ public partial class IDIS_TemplateService : Node
|
||||||
_selectedTemplate.TemplateDescription = text;
|
_selectedTemplate.TemplateDescription = text;
|
||||||
_selectedTemplate.UpdateTime= DateTime.Now;
|
_selectedTemplate.UpdateTime= DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureConfigure()
|
private void EnsureConfigure()
|
||||||
{
|
{
|
||||||
itemList.Clear();
|
|
||||||
MathNode.ClearChild(container);
|
MathNode.ClearChild(container);
|
||||||
|
|
||||||
|
templateIndexBuilder.Clear();
|
||||||
|
|
||||||
foreach (var x in templates)
|
foreach (var x in templates)
|
||||||
{
|
{
|
||||||
itemList.AddItem(x.TemplateName);
|
var _container = templateIndexBuilder.Build<UXContainer>();
|
||||||
|
_container.button.Text = x.TemplateName;
|
||||||
|
_container.button.Pressed += () =>
|
||||||
|
{
|
||||||
|
_selectedTemplate = x;
|
||||||
|
EnsureConfigure();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_selectedTemplate is null) return;
|
if (_selectedTemplate is null) return;
|
||||||
templateNameEdit.Text=_selectedTemplate.TemplateName;
|
|
||||||
templateDescriptionEdit.Text=_selectedTemplate.TemplateDescription;
|
|
||||||
templateCreateTimeLabel.Text = _selectedTemplate.CreateTime.ToString(CultureInfo.InvariantCulture);
|
|
||||||
templateUpdateTimeLabel.Text = _selectedTemplate.UpdateTime.ToString(CultureInfo.InvariantCulture);
|
|
||||||
|
|
||||||
for (var i = 0; i < _selectedTemplate.Formats.Count; i++)
|
templateNameEdit.Text = _selectedTemplate.TemplateName;
|
||||||
|
templateDescriptionEdit.Text = _selectedTemplate.TemplateDescription;
|
||||||
|
templateCreateTimeLabel.Text = _selectedTemplate.CreateTime.ToString(CultureInfo.InvariantCulture);
|
||||||
|
templateUpdateTimeLabel.Text = _selectedTemplate.UpdateTime.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
for (var i = 0; i < _selectedTemplate.Formats.Count; i++)
|
||||||
|
{
|
||||||
|
var x = _selectedTemplate.Formats[i];
|
||||||
|
var _container = templateContainer.Instantiate<UXContainer>();
|
||||||
|
|
||||||
|
_container.lineEdits[0].Text = x.format;
|
||||||
|
_container.lineEdits[1].Text = x.hint;
|
||||||
|
_container.lineEdits[2].Text = x.category;
|
||||||
|
|
||||||
|
var index = i;
|
||||||
|
|
||||||
|
_container.lineEdits[0].TextChanged += (s) =>
|
||||||
{
|
{
|
||||||
var x = _selectedTemplate.Formats[i];
|
var current = _selectedTemplate.Formats[index];
|
||||||
var _container = templateContainer.Instantiate<UXContainer>();
|
current.format = s;
|
||||||
|
_selectedTemplate.Formats[index] = current;
|
||||||
_container.lineEdits[0].Text = x.format;
|
_selectedTemplate.UpdateTime = DateTime.Now;
|
||||||
_container.lineEdits[1].Text = x.hint;
|
};
|
||||||
_container.lineEdits[2].Text = x.category;
|
_container.lineEdits[1].TextChanged += s =>
|
||||||
|
{
|
||||||
var index = i;
|
var current = _selectedTemplate.Formats[index];
|
||||||
|
current.hint = s;
|
||||||
_container.lineEdits[0].TextChanged += (s) =>
|
_selectedTemplate.Formats[index] = current;
|
||||||
{
|
};
|
||||||
var current = _selectedTemplate.Formats[index];
|
_container.lineEdits[2].TextChanged += s =>
|
||||||
current.format = s;
|
{
|
||||||
_selectedTemplate.Formats[index] = current;
|
var current = _selectedTemplate.Formats[index];
|
||||||
_selectedTemplate.UpdateTime= DateTime.Now;
|
current.category = s;
|
||||||
};
|
_selectedTemplate.Formats[index] = current;
|
||||||
_container.lineEdits[1].TextChanged += s =>
|
};
|
||||||
{
|
_container.button.Pressed += () =>
|
||||||
var current = _selectedTemplate.Formats[index];
|
{
|
||||||
current.hint = s;
|
_selectedTemplate.Formats.RemoveAt(index);
|
||||||
_selectedTemplate.Formats[index] = current;
|
EnsureConfigure();
|
||||||
};
|
};
|
||||||
_container.lineEdits[2].TextChanged += s =>
|
|
||||||
{
|
container.AddChild(_container);
|
||||||
var current = _selectedTemplate.Formats[index];
|
}
|
||||||
current.category = s;
|
|
||||||
_selectedTemplate.Formats[index] = current;
|
|
||||||
};
|
|
||||||
_container.button.Pressed += () =>
|
|
||||||
{
|
|
||||||
_selectedTemplate.Formats.RemoveAt(index);
|
|
||||||
EnsureConfigure();
|
|
||||||
};
|
|
||||||
|
|
||||||
container.AddChild(_container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void OnItemSelected(long id)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
private void OnItemClicked(long index, Vector2 atPosition, long mouseButtonIndex)
|
|
||||||
{
|
|
||||||
// var currentItem = _templates[(int)index];
|
|
||||||
// templateNameEdit.Text = currentItem.TemplateName;
|
|
||||||
_selectedIndex = (int)index;
|
|
||||||
EnsureConfigure();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using BITKit;
|
using BITKit;
|
||||||
|
|
||||||
namespace BITFactory;
|
namespace BITFactory;
|
||||||
|
@ -7,18 +9,26 @@ public partial class IDIS_UpdateService : Node
|
||||||
{
|
{
|
||||||
[ExportCategory("Service")]
|
[ExportCategory("Service")]
|
||||||
[Export] private IDIS_Service service;
|
[Export] private IDIS_Service service;
|
||||||
|
|
||||||
[Export] private IDIS_TemplateService templateService;
|
[Export] private IDIS_TemplateService templateService;
|
||||||
|
|
||||||
[ExportCategory("UI 绑定")]
|
[ExportCategory("UI 绑定")]
|
||||||
[Export] private NodeBuilder indexBuilder;
|
[Export] private NodeBuilder indexBuilder;
|
||||||
[Export] private NodeBuilder templateBuilder;
|
[Export] private NodeBuilder templateBuilder;
|
||||||
[Export] private LineEdit handleEdit;
|
[Export] private LineEdit handleEdit;
|
||||||
|
[Export] private Button submitButton;
|
||||||
|
[Export] private RichTextLabel hintsLabel;
|
||||||
|
|
||||||
private ButtonGroup _buttonGroup;
|
private ButtonGroup _buttonGroup;
|
||||||
|
|
||||||
|
private readonly Dictionary<string,LineEdit> dataEdits = new();
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_buttonGroup = new ButtonGroup();
|
_buttonGroup = new ButtonGroup();
|
||||||
|
|
||||||
|
submitButton.Pressed += Submit;
|
||||||
|
|
||||||
|
submitButton.Disabled = true;
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,11 +48,36 @@ public partial class IDIS_UpdateService : Node
|
||||||
private void Entry(IDIS_Template template)
|
private void Entry(IDIS_Template template)
|
||||||
{
|
{
|
||||||
templateBuilder.Clear();
|
templateBuilder.Clear();
|
||||||
|
dataEdits.Clear();
|
||||||
foreach (var x in template.Formats)
|
foreach (var x in template.Formats)
|
||||||
{
|
{
|
||||||
var container = templateBuilder.Build<UXContainer>();
|
var container = templateBuilder.Build<UXContainer>();
|
||||||
container.Text = x.format;
|
container.Text = x.format;
|
||||||
container.lineEdit.PlaceholderText = x.hint;
|
container.lineEdit.PlaceholderText = x.hint;
|
||||||
|
|
||||||
|
dataEdits.TryAdd(x.format, container.lineEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
submitButton.Disabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Submit()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(handleEdit.Text))
|
||||||
|
{
|
||||||
|
hintsLabel.Text="请填写标识码";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var handle = handleEdit.Text;
|
||||||
|
var values = new Dictionary<string, string>(
|
||||||
|
dataEdits
|
||||||
|
.Where(x=>string.IsNullOrEmpty(x.Value.Text) is false)
|
||||||
|
.Select(x => new KeyValuePair<string, string>(x.Key, x.Value.Text))
|
||||||
|
);
|
||||||
|
foreach (var x in values)
|
||||||
|
{
|
||||||
|
service.Update(handle, x.Key, x.Value);
|
||||||
|
}
|
||||||
|
hintsLabel.Text=$"更新成功,已更新{values.Count}个值"+DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Net.Mime;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
@ -13,7 +15,7 @@ namespace BITFactory;
|
||||||
public partial class 温湿度Reader : Node
|
public partial class 温湿度Reader : Node
|
||||||
{
|
{
|
||||||
[ExportCategory("参数")]
|
[ExportCategory("参数")]
|
||||||
[Export(PropertyHint.Range,"100,1000")] private int interval=500;
|
[Export(PropertyHint.Range,"100,2000")] private int interval=500;
|
||||||
|
|
||||||
[ExportCategory("网络设置")]
|
[ExportCategory("网络设置")]
|
||||||
[Export] private string ip="192.168.3.7";
|
[Export] private string ip="192.168.3.7";
|
||||||
|
@ -33,6 +35,7 @@ public partial class 温湿度Reader : Node
|
||||||
private ModbusMaster _modbus;
|
private ModbusMaster _modbus;
|
||||||
private System.Timers.Timer timer;
|
private System.Timers.Timer timer;
|
||||||
private CancellationTokenSource _CancellationTokenSource;
|
private CancellationTokenSource _CancellationTokenSource;
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_CancellationTokenSource = new CancellationTokenSource();
|
_CancellationTokenSource = new CancellationTokenSource();
|
||||||
|
@ -67,11 +70,13 @@ public partial class 温湿度Reader : Node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdatePortAndIP();
|
||||||
|
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
timer.Interval = interval;
|
timer.Interval = interval;
|
||||||
timer.Elapsed += OnTimerElapsed;
|
timer.Elapsed += OnTimerElapsed;
|
||||||
timer.AutoReset = true;
|
timer.AutoReset = false;
|
||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,29 +84,42 @@ public partial class 温湿度Reader : Node
|
||||||
{
|
{
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 内部方法,用于更新IP和端口
|
||||||
|
/// </summary>
|
||||||
private void UpdatePortAndIP()
|
private void UpdatePortAndIP()
|
||||||
{
|
{
|
||||||
_modbus.Dispose();
|
_modbus?.Dispose();
|
||||||
_modbus = ModbusMaster.TCP(ip, port);
|
try
|
||||||
|
{
|
||||||
|
_modbus = ModbusMaster.TCP(ip, port);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
BIT4Log.Log<温湿度Reader>(e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 内部方法,定时器回调用于读取Modbus
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
private async void OnTimerElapsed(object sender, ElapsedEventArgs e)
|
private async void OnTimerElapsed(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
SetHints( "正在获取温湿度数据..."+DateTime.Now);
|
|
||||||
_CancellationTokenSource.Cancel();
|
_CancellationTokenSource.Cancel();
|
||||||
await UniTask.SwitchToTaskPool();
|
await UniTask.SwitchToTaskPool();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
hintsLabel.SetTextAsync( "正在读取温湿度数据..."+DateTime.Now);
|
||||||
|
|
||||||
var vs = _modbus.ReadInputRegisters(1, 0, 2);
|
var vs = _modbus.ReadInputRegisters(1, 0, 2);
|
||||||
|
|
||||||
_CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
hintsLabel.SetTextAsync( "已采集到数据,正在解析..."+DateTime.Now);
|
||||||
|
|
||||||
if (vs is not { Length: 2 })
|
if (vs is not { Length: 2 })
|
||||||
{
|
{
|
||||||
SetHints(hintsLabel.Text = $"获取温湿度数据失败:数据长度为:{vs.Length}"+DateTime.Now);
|
hintsLabel.SetTextAsync(hintsLabel.Text = $"获取温湿度数据失败:数据长度为:{vs.Length}"+DateTime.Now);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -109,25 +127,21 @@ public partial class 温湿度Reader : Node
|
||||||
temperature = vs[0] / 10.0;
|
temperature = vs[0] / 10.0;
|
||||||
humidity = vs[1] / 10.0;
|
humidity = vs[1] / 10.0;
|
||||||
|
|
||||||
SetHints("已获取到温湿度数据:"+DateTime.Now);
|
hintsLabel.SetTextAsync("已获取到温湿度数据:"+DateTime.Now);
|
||||||
|
|
||||||
temperatureContaier.Text = temperature.ToString(CultureInfo.InvariantCulture);
|
temperatureContaier.label.SetTextAsync(temperature.ToString(CultureInfo.InvariantCulture)); ;
|
||||||
humidityContainer.Text = humidity.ToString(CultureInfo.InvariantCulture);
|
humidityContainer.label.SetTextAsync(humidity.ToString(CultureInfo.InvariantCulture));
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
//SetHints("连接超时:"+DateTime.Now);
|
hintsLabel.SetTextAsync("连接超时:"+DateTime.Now);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SetHints(ex.Message);
|
hintsLabel.SetTextAsync(ex.Message);
|
||||||
GD.Print("ex:" + ex);
|
//GD.Print("ex:" + ex);
|
||||||
}
|
}
|
||||||
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SetHints(string hints)
|
|
||||||
{
|
|
||||||
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
|
|
||||||
hintsLabel.Text = hints;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,39 +233,61 @@ text = "标识模板"
|
||||||
text = "在注册与更新标识之前,我们需要一个创建标识模板,
|
text = "在注册与更新标识之前,我们需要一个创建标识模板,
|
||||||
然后我们可以通过创建的模板注册标识"
|
然后我们可以通过创建的模板注册标识"
|
||||||
|
|
||||||
[node name="占位符" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/标题栏Template" index="2"]
|
|
||||||
visible = false
|
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_constants/separation = 64
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer"]
|
[node name="VBoxContainer3" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
text = "标识注册模板"
|
text = "模板列表"
|
||||||
|
|
||||||
[node name="ItemList" type="ItemList" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
auto_height = true
|
horizontal_scroll_mode = 0
|
||||||
item_count = 3
|
|
||||||
item_0/text = "1"
|
|
||||||
item_1/text = "2"
|
|
||||||
item_2/text = "3"
|
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="NodeBuilder" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer" node_paths=PackedStringArray("emptyHints")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
script = ExtResource("14_q0cb2")
|
||||||
|
emptyHints = NodePath("Label2")
|
||||||
|
template = ExtResource("14_pcoc2")
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="Option-Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button2" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button2/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button3" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button3/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button4" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button4/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button5" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button5/Button")
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3/ScrollContainer/NodeBuilder"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "oops,没有找到标识模板,去创建模板吧!"
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer3"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "创建新的注册模板"
|
text = "创建新的注册模板"
|
||||||
|
|
||||||
[node name="VSeparator" type="VSeparator" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer"]
|
[node name="VSeparator" type="VSeparator" parent="Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 64
|
theme_override_constants/separation = 64
|
||||||
|
|
||||||
|
@ -396,7 +418,6 @@ layout_mode = 2
|
||||||
text = "保存注册模板"
|
text = "保存注册模板"
|
||||||
|
|
||||||
[node name="标注注册" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
[node name="标注注册" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/margin_left = 64
|
theme_override_constants/margin_left = 64
|
||||||
theme_override_constants/margin_top = 64
|
theme_override_constants/margin_top = 64
|
||||||
|
@ -417,27 +438,46 @@ text = "当我们创建标识模板后,我们就可以通过标识模板快速
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 64
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer"]
|
[node name="NodeBuilder" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("emptyHints")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
theme_override_constants/separation = 12
|
||||||
|
script = ExtResource("14_q0cb2")
|
||||||
|
emptyHints = NodePath("Label2")
|
||||||
|
template = ExtResource("14_pcoc2")
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
text = "选择标识模板"
|
text = "选择标识模板"
|
||||||
|
|
||||||
[node name="ItemList" type="ItemList" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="Option-Button" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
button = NodePath("../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button/Button")
|
||||||
auto_height = true
|
|
||||||
item_count = 4
|
[node name="Option-Button2" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
item_0/text = "1"
|
layout_mode = 2
|
||||||
item_1/text = "2"
|
button = NodePath("../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button2/Button")
|
||||||
item_2/text = "3"
|
|
||||||
item_3/text = "4"
|
[node name="Option-Button3" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button3/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button4" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button4/Button")
|
||||||
|
|
||||||
|
[node name="Option-Button5" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder" node_paths=PackedStringArray("button") instance=ExtResource("14_pcoc2")]
|
||||||
|
layout_mode = 2
|
||||||
|
button = NodePath("../../../../../标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder/Option-Button5/Button")
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/NodeBuilder"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "oops,没有找到标识模板,去创建模板吧!"
|
||||||
|
|
||||||
[node name="VSeparator" type="VSeparator" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer"]
|
[node name="VSeparator" type="VSeparator" parent="Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 64
|
theme_override_constants/separation = 64
|
||||||
|
|
||||||
|
@ -514,6 +554,7 @@ theme_override_styles/background = SubResource("StyleBoxEmpty_1rin1")
|
||||||
show_percentage = false
|
show_percentage = false
|
||||||
|
|
||||||
[node name="标识更新" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
[node name="标识更新" type="MarginContainer" parent="Layout/UX Window Service/Horizontal Layout/内容"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/margin_left = 64
|
theme_override_constants/margin_left = 64
|
||||||
theme_override_constants/margin_top = 64
|
theme_override_constants/margin_top = 64
|
||||||
|
@ -522,6 +563,7 @@ theme_override_constants/margin_bottom = 128
|
||||||
|
|
||||||
[node name="Layout" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新"]
|
[node name="Layout" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout" instance=ExtResource("13_7vm0l")]
|
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout" instance=ExtResource("13_7vm0l")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -536,6 +578,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2"]
|
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"HeaderLarge"
|
||||||
text = "模板列表"
|
text = "模板列表"
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2"]
|
||||||
|
@ -624,6 +667,17 @@ text = "选择一个模板,然后我们开始更新"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout"]
|
||||||
|
layout_mode = 2
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
|
[node name="hints" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "等待更新中"
|
||||||
|
fit_content = true
|
||||||
|
text_direction = 2
|
||||||
|
|
||||||
[node name="HBoxContainer2" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout"]
|
[node name="HBoxContainer2" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 2
|
alignment = 2
|
||||||
|
@ -900,12 +954,26 @@ layout_mode = 2
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
theme_override_colors/font_color = Color(0.509804, 0.509804, 0.509804, 1)
|
theme_override_colors/font_color = Color(0.509804, 0.509804, 0.509804, 1)
|
||||||
text = "已获取的传感器数据"
|
text = "配置传感器参数"
|
||||||
|
|
||||||
[node name="GridContainer2" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
[node name="GridContainer2" type="GridContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
columns = 3
|
columns = 3
|
||||||
|
|
||||||
|
[node name="Label-0" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "标识码:"
|
||||||
|
|
||||||
|
[node name="LineEdit-0" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2"]
|
||||||
|
custom_minimum_size = Vector2(384, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
placeholder_text = "88.123.99/xxxxxxxxxxxxxxxx"
|
||||||
|
|
||||||
|
[node name="hints-2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "88.123.99开头"
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2"]
|
[node name="Label" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "IP:"
|
text = "IP:"
|
||||||
|
@ -956,13 +1024,26 @@ text = "湿度"
|
||||||
[node name="Label2" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer/传感器数据模板2/VBoxContainer/MarginContainer/HBoxContainer" index="1"]
|
[node name="Label2" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer/传感器数据模板2/VBoxContainer/MarginContainer/HBoxContainer" index="1"]
|
||||||
text = "%"
|
text = "%"
|
||||||
|
|
||||||
|
[node name="自动更新提示-label" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "正在等待自动更新"
|
||||||
|
fit_content = true
|
||||||
|
|
||||||
[node name="RichTextLabel" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
[node name="RichTextLabel" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "正在等待连接到温湿度传感器..."
|
text = "正在等待连接到温湿度传感器..."
|
||||||
fit_content = true
|
fit_content = true
|
||||||
|
|
||||||
[node name="更新温湿度-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="自动更新-button" type="CheckButton" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "自动更新"
|
||||||
|
|
||||||
|
[node name="更新温湿度-button" type="Button" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
text = "更新温湿度"
|
text = "更新温湿度"
|
||||||
|
|
||||||
[node name="VBoxContainer2" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
[node name="VBoxContainer2" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer"]
|
||||||
|
@ -978,20 +1059,6 @@ text = "手动提交数据"
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
columns = 3
|
columns = 3
|
||||||
|
|
||||||
[node name="Label-0" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "标识码:"
|
|
||||||
|
|
||||||
[node name="LineEdit-0" type="LineEdit" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
|
||||||
custom_minimum_size = Vector2(384, 0)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "88.123.99/xxxxxxxxxxxxxxxx"
|
|
||||||
|
|
||||||
[node name="hints-0" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "88.123.99开头"
|
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
[node name="Label2" type="Label" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "温度:"
|
text = "温度:"
|
||||||
|
@ -1006,6 +1073,7 @@ textValidation = SubResource("Resource_di31i")
|
||||||
hints = NodePath("../hints-1")
|
hints = NodePath("../hints-1")
|
||||||
|
|
||||||
[node name="hints-1" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
[node name="hints-1" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
||||||
|
custom_minimum_size = Vector2(128, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "输入正确的温度"
|
text = "输入正确的温度"
|
||||||
|
@ -1025,6 +1093,7 @@ textValidation = SubResource("Resource_di31i")
|
||||||
hints = NodePath("../hints-2")
|
hints = NodePath("../hints-2")
|
||||||
|
|
||||||
[node name="hints-2" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
[node name="hints-2" type="RichTextLabel" parent="Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2"]
|
||||||
|
custom_minimum_size = Vector2(128, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
|
|
||||||
|
@ -1043,11 +1112,11 @@ layout_mode = 2
|
||||||
[node name="标识解析服务" type="Node" parent="."]
|
[node name="标识解析服务" type="Node" parent="."]
|
||||||
script = ExtResource("3_xbtmk")
|
script = ExtResource("3_xbtmk")
|
||||||
|
|
||||||
[node name="标识模板服务" type="Node" parent="." node_paths=PackedStringArray("createButton", "newFormatButton", "itemList", "templateNameEdit", "templateDescriptionEdit", "container", "templateCreateTimeLabel", "templateUpdateTimeLabel")]
|
[node name="标识模板服务" type="Node" parent="." node_paths=PackedStringArray("createButton", "newFormatButton", "templateIndexBuilder", "templateNameEdit", "templateDescriptionEdit", "container", "templateCreateTimeLabel", "templateUpdateTimeLabel")]
|
||||||
script = ExtResource("4_oj8cs")
|
script = ExtResource("4_oj8cs")
|
||||||
createButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer/Button")
|
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")
|
newFormatButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/Button")
|
||||||
itemList = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer/ItemList")
|
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")
|
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")
|
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")
|
container = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/ScrollContainer/Format-Container")
|
||||||
|
@ -1055,11 +1124,11 @@ templateCreateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layou
|
||||||
templateUpdateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/GridContainer/updateTime-label")
|
templateUpdateTimeLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识模板/VBoxContainer/HBoxContainer/VBoxContainer2/VBoxContainer/GridContainer/updateTime-label")
|
||||||
templateContainer = ExtResource("3_gmthc")
|
templateContainer = ExtResource("3_gmthc")
|
||||||
|
|
||||||
[node name="标识注册服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "templateList", "handleEdit", "generateHandleButton", "registerContainer", "registerButton", "registerProgress", "referenceContainer", "addReferenceButton", "hints")]
|
[node name="标识注册服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "templateIndexBuilder", "handleEdit", "generateHandleButton", "registerContainer", "registerButton", "registerProgress", "referenceContainer", "addReferenceButton", "hints")]
|
||||||
script = ExtResource("8_6uwr0")
|
script = ExtResource("8_6uwr0")
|
||||||
service = NodePath("../标识解析服务")
|
service = NodePath("../标识解析服务")
|
||||||
templateService = NodePath("../标识模板服务")
|
templateService = NodePath("../标识模板服务")
|
||||||
templateList = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer/ItemList")
|
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/handle-edit")
|
||||||
generateHandleButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/HBoxContainer/generate-button")
|
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")
|
registerContainer = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标注注册/VBoxContainer/HBoxContainer/VBoxContainer2/MarginContainer/VBoxContainer/register-container")
|
||||||
|
@ -1085,15 +1154,17 @@ valueTemplate = ExtResource("19_abuse")
|
||||||
referenceTemplate = ExtResource("14_0l0dn")
|
referenceTemplate = ExtResource("14_0l0dn")
|
||||||
categoryTemplate = ExtResource("20_kicyn")
|
categoryTemplate = ExtResource("20_kicyn")
|
||||||
|
|
||||||
[node name="温湿度标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "thReader", "submitButton", "handleEdit", "temperatureEdit", "humidityEdit", "hintsLabel")]
|
[node name="温湿度标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "thReader", "submitButton", "autoUpdateButton", "handleEdit", "temperatureEdit", "humidityEdit", "hintsLabel", "autoUpdateLabel")]
|
||||||
script = ExtResource("30_jn688")
|
script = ExtResource("30_jn688")
|
||||||
service = NodePath("../标识解析服务")
|
service = NodePath("../标识解析服务")
|
||||||
thReader = NodePath("../温湿度传感器Reader")
|
thReader = NodePath("../温湿度传感器Reader")
|
||||||
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/更新温湿度-button2")
|
submitButton = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/更新温湿度-button2")
|
||||||
handleEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit-0")
|
autoUpdateButton = 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")
|
temperatureEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit2")
|
||||||
humidityEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit3")
|
humidityEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/GridContainer2/LineEdit3")
|
||||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/Label3")
|
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer2/Label3")
|
||||||
|
autoUpdateLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/自动更新提示-label")
|
||||||
|
|
||||||
[node name="温湿度传感器Reader" type="Node" parent="." node_paths=PackedStringArray("temperatureContaier", "humidityContainer", "ipEdit", "portEdit", "hintsLabel")]
|
[node name="温湿度传感器Reader" type="Node" parent="." node_paths=PackedStringArray("temperatureContaier", "humidityContainer", "ipEdit", "portEdit", "hintsLabel")]
|
||||||
script = ExtResource("27_q8j7q")
|
script = ExtResource("27_q8j7q")
|
||||||
|
@ -1103,16 +1174,17 @@ ipEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿
|
||||||
portEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2/LineEdit2")
|
portEdit = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/GridContainer2/LineEdit2")
|
||||||
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/RichTextLabel")
|
hintsLabel = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/温湿度传感器/VBoxContainer/VBoxContainer/RichTextLabel")
|
||||||
|
|
||||||
[node name="标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "indexBuilder", "templateBuilder", "handleEdit")]
|
[node name="标识更新服务" type="Node" parent="." node_paths=PackedStringArray("service", "templateService", "indexBuilder", "templateBuilder", "handleEdit", "submitButton", "hintsLabel")]
|
||||||
script = ExtResource("26_a6qku")
|
script = ExtResource("26_a6qku")
|
||||||
service = NodePath("../标识解析服务")
|
service = NodePath("../标识解析服务")
|
||||||
templateService = NodePath("../标识模板服务")
|
templateService = NodePath("../标识模板服务")
|
||||||
indexBuilder = NodePath("../Layout/UX Window Service/Horizontal Layout/内容/标识更新/Layout/HBoxContainer/VBoxContainer2/ScrollContainer/NodeBuilder")
|
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")
|
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")
|
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/导航栏/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"]
|
|
||||||
[connection signal="pressed" from="Layout/UX Window Service/Horizontal Layout/内容/标识解析/Search/SearchEdit/HBoxContainer/refresh-button" to="标识搜索服务" method="Search"]
|
[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/标题栏Template"]
|
||||||
|
|
|
@ -112,43 +112,43 @@ theme_override_constants/margin_bottom = 32
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 32
|
theme_override_constants/separation = 32
|
||||||
|
|
||||||
[node name="HBoxContainer" type="VBoxContainer" parent="UXPanel/ReferenceRect/HBoxContainer"]
|
[node name="Layout" type="VBoxContainer" parent="UXPanel/ReferenceRect/HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(384, 0)
|
custom_minimum_size = Vector2(384, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer/HBoxContainer"]
|
[node name="Label" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
text = "CAICT定制版"
|
text = "CAICT定制版"
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer/HBoxContainer"]
|
[node name="Label2" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderSmall"
|
theme_type_variation = &"HeaderSmall"
|
||||||
text = "仅包括1个课程"
|
text = "仅包括1个课程"
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="HSeparator" type="HSeparator" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 32
|
theme_override_constants/separation = 32
|
||||||
|
|
||||||
[node name="Label3" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="Label3" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
text = "教程与实训"
|
text = "教程与实训"
|
||||||
|
|
||||||
[node name="Label4" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="Label4" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_type_variation = &"HeaderSmall"
|
theme_type_variation = &"HeaderSmall"
|
||||||
theme_override_colors/font_color = Color(0, 0.698039, 0.886275, 1)
|
theme_override_colors/font_color = Color(0, 0.698039, 0.886275, 1)
|
||||||
text = "导入链接(试用版未启用)"
|
text = "导入链接(试用版未启用)"
|
||||||
|
|
||||||
[node name="HSeparator2" type="HSeparator" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="HSeparator2" type="HSeparator" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 32
|
theme_override_constants/separation = 32
|
||||||
|
|
||||||
[node name="RichTextLabel" type="RichTextLabel" parent="UXPanel/ReferenceRect/HBoxContainer/HBoxContainer"]
|
[node name="RichTextLabel" type="RichTextLabel" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "最后更新时间:
|
text = "最后更新时间:
|
||||||
|
@ -161,6 +161,28 @@ Powered By
|
||||||
重庆市渝北区宝圣湖街道食品城大道18号重庆广告产业园15幢1单元2-3"
|
重庆市渝北区宝圣湖街道食品城大道18号重庆广告产业园15幢1单元2-3"
|
||||||
fit_content = true
|
fit_content = true
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="UXPanel/ReferenceRect/HBoxContainer/Layout"]
|
||||||
|
layout_mode = 2
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "联系人:"
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "王浩 15928031321"
|
||||||
|
|
||||||
|
[node name="Label3" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "邮箱:"
|
||||||
|
|
||||||
|
[node name="Label4" type="Label" parent="UXPanel/ReferenceRect/HBoxContainer/Layout/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "wanghao@cn-intelli.com"
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="UXPanel/ReferenceRect/HBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="UXPanel/ReferenceRect/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
@ -187,11 +209,14 @@ text = "工业互联网标识解析"
|
||||||
text = "#371647"
|
text = "#371647"
|
||||||
|
|
||||||
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer2" index="1"]
|
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer2" index="1"]
|
||||||
text = "2"
|
text = "5"
|
||||||
|
|
||||||
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer3" index="1"]
|
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer3" index="1"]
|
||||||
text = "0"
|
text = "0"
|
||||||
|
|
||||||
|
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer4" index="1"]
|
||||||
|
text = "1"
|
||||||
|
|
||||||
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer6" index="1"]
|
[node name="Label2" parent="UXPanel/ReferenceRect/HBoxContainer/ScrollContainer/VBoxContainer/NinePatchRect4/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/VBoxContainer6" index="1"]
|
||||||
text = "30"
|
text = "30"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.19" />
|
<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.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="Microsoft.Extensions.Logging.Console" Version="8.0.0-preview.4.23259.5" />
|
||||||
|
<PackageReference Include="MySql.EntityFrameworkCore" Version="6.0.13" />
|
||||||
<PackageReference Include="SharpModbus" Version="2.0.0" />
|
<PackageReference Include="SharpModbus" Version="2.0.0" />
|
||||||
<PackageReference Include="UniTask" Version="2.3.3" />
|
<PackageReference Include="UniTask" Version="2.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Reference in New Issue