public static Image UpdateEzdApi(CompetitorData competitor, int width, int height) { if (!string.IsNullOrEmpty(competitor.FirstName)) { JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(0), competitor.FirstName); } if (!string.IsNullOrEmpty(competitor.LastName)) { JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(1), competitor.LastName); } if (!string.IsNullOrEmpty(competitor.TimeOfDistance)) { JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(2), competitor.TimeOfDistance); } if (!string.IsNullOrEmpty(competitor.Distance)) { JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(3), competitor.Distance); } var img = JczLmc.GetCurPreviewImage(width, height); img = Images.SetImageTransparent(img); return(img); }
public static List <Tuple <string, StringBuilder> > GetEzdData() { var count = JczLmc.GetEntityCount(); var ezdObjects = new List <Tuple <string, StringBuilder> >(); var names = new List <string>(); for (int i = 0; i < count; i++) { names.Add(JczLmc.GetEntityNameByIndex(i)); } names = names.Where(p => { return(!string.IsNullOrEmpty(p)); }).Distinct().ToList(); foreach (var name in names) { if (!string.IsNullOrEmpty(name)) { var str = new StringBuilder(); JczLmc.GetTextByName(name, str); ezdObjects.Add(new Tuple <string, StringBuilder>(name, str)); } } return(ezdObjects); }