|
|
@@ -112,6 +112,17 @@ namespace BPASmart.VariableManager |
|
|
|
|
|
|
|
private void DataSave() |
|
|
|
{ |
|
|
|
for (int i = 0; i < Json<CommunicationPar>.Data.CommunicationDevices.Count; i++) |
|
|
|
{ |
|
|
|
for (int m = 0; m < Json<CommunicationPar>.Data.CommunicationDevices.ElementAt(i).VarTableModels.Count; m++) |
|
|
|
{ |
|
|
|
var deviceType = Json<CommunicationPar>.Data.CommunicationDevices.ElementAt(i).CommDevice; |
|
|
|
var deviceValue = Json<CommunicationPar>.Data.CommunicationDevices.ElementAt(i).VarTableModels.ElementAt(m).Address; |
|
|
|
string RealAddress = AddressConvert.GetInstance.PlcConverter(deviceType, deviceValue); |
|
|
|
Json<CommunicationPar>.Data.CommunicationDevices.ElementAt(i).VarTableModels.ElementAt(m).RealAddress = RealAddress; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Json<CommunicationPar>.Save(); |
|
|
|
} |
|
|
|
|
|
|
|