温湿度传感器更新
现在可以手动更新温湿度了
This commit is contained in:
@@ -17,7 +17,7 @@ public class IDIS_Template
|
||||
public string IconPath="Register";
|
||||
public DateTime CreateTime=DateTime.Now;
|
||||
public DateTime UpdateTime=DateTime.Now;
|
||||
public List<(string format,string hint)> Formats=new();
|
||||
public List<(string format,string hint,string category)> Formats=new();
|
||||
}
|
||||
public partial class IDIS_TemplateService : Node
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public partial class IDIS_TemplateService : Node
|
||||
{
|
||||
if (_selectedTemplate is null) return;
|
||||
_selectedTemplate.Formats ??= new();
|
||||
_selectedTemplate.Formats.Add(("新的数据格式","格式类型"));
|
||||
_selectedTemplate.Formats.Add(("新的数据格式","格式类型","数据类型"));
|
||||
_selectedTemplate.UpdateTime= DateTime.Now;
|
||||
EnsureConfigure();
|
||||
}
|
||||
@@ -128,6 +128,7 @@ public partial class IDIS_TemplateService : Node
|
||||
|
||||
_container.lineEdits[0].Text = x.format;
|
||||
_container.lineEdits[1].Text = x.hint;
|
||||
_container.lineEdits[2].Text = x.category;
|
||||
|
||||
var index = i;
|
||||
|
||||
@@ -144,6 +145,12 @@ public partial class IDIS_TemplateService : Node
|
||||
current.hint = s;
|
||||
_selectedTemplate.Formats[index] = current;
|
||||
};
|
||||
_container.lineEdits[2].TextChanged += s =>
|
||||
{
|
||||
var current = _selectedTemplate.Formats[index];
|
||||
current.category = s;
|
||||
_selectedTemplate.Formats[index] = current;
|
||||
};
|
||||
_container.button.Pressed += () =>
|
||||
{
|
||||
_selectedTemplate.Formats.RemoveAt(index);
|
||||
|
Reference in New Issue
Block a user