public MarkButtonDTO GetMarkButton(DrawingStandards _standard, MarkTypes _type) { var mark = markCollection.FirstOrDefault(x => x.standard == _standard && x.type == _type); return(new MarkButtonDTO() { id = mark.id, name = GetMarkDescription(mark.id), picture = mark.picture32 }); }
private MarkDTO GetMarkDTO(DrawingStandards _standard, MarkTypes _type) { var item = markCollection.FirstOrDefault(x => x.standard.Equals(_standard) && x.type.Equals(_type)); if (item.Equals(default(MarkDTO))) { throw new Exception("Brak koty wysokościowej " + _type.ToString()); } else { return(item); } }
public Bitmap GetIcon(DrawingStandards _standard, MarkTypes _type, IconSize _size) { Dictionary <MarkTypes, Dictionary <IconSize, Bitmap> > key1; if (data.TryGetValue(_standard, out key1)) { Dictionary <IconSize, Bitmap> key2; if (key1.TryGetValue(_type, out key2)) { return(key2[_size]); } } return(DefaultIcon); }
public Bitmap GetIcon(DrawingStandards standard, MarkTypes type) { return(GetIcon(standard, type, IconSize.medium)); }
public string GetMarkDescription(DrawingStandards _standard, MarkTypes _type) { return(markTypes[GetMarkDTO(_standard, _type).type]); }