Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions libEDSsharp/CanOpenEDS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,14 @@ public void Write(StreamWriter writer, InfoSection.Filetype ft, Odtype odt = Odt
}

writer.WriteLine(string.Format("ObjectType=0x{0:X}", (int)objecttype));
writer.WriteLine(string.Format(";StorageLocation={0}", prop.CO_storageGroup));
if (prop.CO_countLabel != "")
{
writer.WriteLine(string.Format(";CountLabel={0}", prop.CO_countLabel));
}
if (prop.CO_storageGroup != "")
{
writer.WriteLine(string.Format(";StorageLocation={0}", prop.CO_storageGroup));
}

if (objecttype == ObjectType.ARRAY)
{
Expand Down Expand Up @@ -521,9 +528,9 @@ public void Parseline(string linex, int no)
}
}
else
//Only allow our own extensions to populate the key/value pair
{
if (key == "StorageLocation" || key == "TPDODetectCos")
//Only allow our own extensions to populate the key/value pair
if (key == "CountLabel" || key == "StorageLocation" || key == "TPDODetectCos")
{
try
{
Expand Down Expand Up @@ -618,6 +625,11 @@ public void ParseEDSentry(KeyValuePair<string, Dictionary<string, string>> kvp)
}

//Access Type
if (kvp.Value.ContainsKey("CountLabel"))
{
od.prop.CO_countLabel = kvp.Value["CountLabel"];
}

if (kvp.Value.ContainsKey("StorageLocation"))
{
od.prop.CO_storageGroup = kvp.Value["StorageLocation"];
Expand Down