public List <string> GetTemplates() { var tList = new List <string>(); foreach (var tName in TemplateContainer.GetInstance().GetTemplateList().Keys) { tList.Add(tName); } return(tList); }
public IPrintObject GetPrintModel(string modelData) { JObject jo = (JObject)JsonConvert.DeserializeObject(modelData); string print_type = jo["print_type"].ToString(); Type modelType = TemplateContainer.GetInstance().GetTemplateType(print_type); if (modelType == null) { throw new Exception(Language.I.Text("err_unknown_template", "Error:Unknown Template")); } JavaScriptSerializer serializer = new JavaScriptSerializer(); IPrintObject model = (IPrintObject)serializer.Deserialize(modelData, modelType); return(model); }
public void Initialize() { TemplateContainer.GetInstance().SacnTemplate(); }