public ExpPen CreatePen(ExpPen.ToolAttribute attribute, string name) { ExpPen pen = new ExpPen(_penInc++, name, attribute); _pens.Add(pen); return(pen); }
public ExpPen CreatePen(ExpPen.ToolAttribute attribute, string name, uint id) { ExpPen pen = new ExpPen(id, name, attribute); _pens.Add(pen); return(pen); }
public ExpPen GetPenByAttribute(ExpPen.ToolAttribute attribute) { ExpPen pen = _pens.Find(p => p.Attribute == attribute); if (null == pen) { pen = CreatePen(attribute); } return(pen); }
public ExpPen CreatePen(ExpPen.ToolAttribute attribute) { string name = string.Empty; switch (attribute) { case ExpPen.ToolAttribute.LT_CONSTRUCTION: name = "Construction"; break; case ExpPen.ToolAttribute.LT_COTATION: name = "Cotation"; break; case ExpPen.ToolAttribute.LT_CREASING: name = "Crease"; break; case ExpPen.ToolAttribute.LT_CUT: name = "Cut"; break; case ExpPen.ToolAttribute.LT_HALFCUT: name = "Halfcut"; break; case ExpPen.ToolAttribute.LT_PERFOCREASING: name = "Perfocreasing"; break; default: break; } return(CreatePen(attribute, name)); }