private string GetCoordinatesString(IOElementModel item, string itemdefine, string itemtype) { StringBuilder sb = new StringBuilder(); if (item.BitmapCoordinaten?.Count > 0) { sb.Append($"{ts}X_{itemtype}[{itemdefine}] = {item.BitmapCoordinaten[0].X}; "); sb.AppendLine($"Y_{itemtype}[{itemdefine}] = {item.BitmapCoordinaten[0].Y};"); } else { sb.Append($"{ts}X_{itemtype}[{itemdefine}] = NG; "); sb.AppendLine($"Y_{itemtype}[{itemdefine}] = NG;"); } if (item.BitmapCoordinaten?.Count > 1) { for (int i = 1; i < item.BitmapCoordinaten.Count; ++i) { sb.Append($"{ts}X_{itemtype}[{itemdefine}_{i}] = {item.BitmapCoordinaten[i].X}; "); sb.Append($"Y_{itemtype}[{itemdefine}_{i}] = {item.BitmapCoordinaten[i].Y}; "); sb.AppendLine($"NR_{itemtype}[{itemdefine}_{i}] = {itemdefine};"); } } return(sb.ToString()); }
public static string GetBitmapCoordinaatOutputDefine(this IOElementModel o, string name = null) { if (name != null) { return(CCOLGeneratorSettingsProvider.Default.GetPrefix("us") + name); } else { return(CCOLGeneratorSettingsProvider.Default.GetPrefix("us") + o.Naam); } }
public BitmappedItemViewModel(IOElementModel ioelem, string naam, Type t) { _IOElement = ioelem; _Naam = naam; IOType = t; foreach (BitmapCoordinaatModel coord in _IOElement.BitmapCoordinaten) { Coordinates.Add(new Point(coord.X, coord.Y)); } Coordinates.CollectionChanged += Coordinates_CollectionChanged; }
public static string GetBitmapCoordinaatInputDefine(this IOElementModel i) { return(CCOLGeneratorSettingsProvider.Default.GetPrefix("us") + i.Naam); }
public CCOLIOElement(IOElementModel ioelem, string naam) { Naam = naam; Element = ioelem; Dummy = false; }