浏览代码

1

样式分支
fyf 2 年前
父节点
当前提交
8e1444f103
共有 2 个文件被更改,包括 28 次插入3 次删除
  1. +27
    -2
      BPASmartClient.SCADAControl/CustomerControls/TheDataGrid.xaml.cs
  2. +1
    -1
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml

+ 27
- 2
BPASmartClient.SCADAControl/CustomerControls/TheDataGrid.xaml.cs 查看文件

@@ -119,9 +119,34 @@ namespace BPASmartClient.SCADAControl.CustomerControls
{
if (!string.IsNullOrEmpty(DataSouceInformation))
{
if (Class_DataBus.GetInstance().Dic_APIData.ContainsKey(DataSouceInformation))
if (DataSouceType == DataTypeEnum.API接口)
{
FDataSouce= Class_DataBus.GetInstance().Dic_APIData[DataSouceInformation];// = GenerateData;
if (Class_DataBus.GetInstance().Dic_APIData.ContainsKey(DataSouceInformation))
{
FDataSouce = Class_DataBus.GetInstance().Dic_APIData[DataSouceInformation];// = GenerateData;
}
}
else if (DataSouceType == DataTypeEnum.Redis)
{
if (DataSouceInformation.Contains(".") && DataSouceInformation.Contains("{Binding "))
{
string[] str = DataSouceInformation.Replace("{Binding ", "").Replace("}", "").Split(".");
if (str.Length > 1)
{
if (Class_DataBus.GetInstance().Dic_DeviceData.ContainsKey(str[0]))
{
Dictionary<string, DeviceDataModel> b = Class_DataBus.GetInstance().Dic_DeviceData[str[0]];
if (b != null && b.ContainsKey(str[1]))
{
FDataSouce = b[str[1]].VarVaule;
}
}
}
}
}
else if (DataSouceType == DataTypeEnum.静态数据)
{
FDataSouce = "";
}
}
}


+ 1
- 1
BeDesignerSCADA/Controls/MainCanvasPanel.xaml 查看文件

@@ -361,7 +361,7 @@
</mypro:EditorTemplateDefinition.EditingTemplate>
</mypro:EditorTemplateDefinition>

<mypro:EditorTemplateDefinition TargetProperties="Text,Content,Title,Value,BindingIsChecked,Header,KgValue,WLText,WLTitle" >
<mypro:EditorTemplateDefinition TargetProperties="Text,Content,Title,Value,BindingIsChecked,Header,KgValue,WLText,WLTitle,DataSouceInformation" >
<mypro:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<!--此处可自由发挥-->


正在加载...
取消
保存