internal CCFieldArray(CCreator parent, ITisFieldArrayData fieldArray) : this(parent, fieldArray != null? fieldArray.Name:String.Empty, parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(fieldArray) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(fieldArray, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(fieldArray, true) : null) { this.EflowOwner = fieldArray; this.ParentCollection = fieldArray.ParentCollection; this.ParentForm = fieldArray.ParentForm; this.ParentPage = fieldArray.ParentPage; this.ParentGroup = fieldArray.ParentFieldGroup; this.ParentTable = fieldArray.ParentFieldTable; this.NamedParent = fieldArray.ParentFieldTable.Name; if (fields == null) { fields = new List <CCField>(); } else { fields.Clear(); } foreach (ITisFieldData fd in fieldArray.LinkedFields) { fields.Add(new CCField(this.ParentCreator, fd)); } }
public CCTable(CCreator parent, ITisFieldTableData fieldTable) #endif : this(parent, fieldTable.Name, parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(fieldTable) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(fieldTable, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(fieldTable, true) : null) { this.EflowOwner = fieldTable; this.ParentCollection = fieldTable.ParentCollection; this.ParentForm = fieldTable.ParentForm; this.ParentPage = fieldTable.ParentPage; this.ParentGroup = fieldTable.ParentFieldGroup; this.NamedParent = fieldTable.ParentFieldGroupExists ? fieldTable.ParentFieldGroup.Name : String.Empty; List <CCFieldArray> fas = new List <CCFieldArray>(); if (fieldArrays == null) { fieldArrays = new List <CCFieldArray>(); } else { fieldArrays.Clear(); } foreach (ITisFieldArrayData fa in fieldTable.FieldArrays) { fieldArrays.Add(new CCFieldArray(this.ParentCreator, fa)); } }
public CCPage(CCreator parent, ITisPageData page) #endif : base(parent, page != null? page.Name:String.Empty, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(page, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(page, true) : null) { try { if (groups == null) { groups = new List <CCGroup>(); } else { groups.Clear(); } this.Attachments = CCUtils.GetAttachments(page); this.EflowOwner = page; this.ParentCollection = page.ParentCollection; this.ParentForm = page.ParentForm; this.PageID = page.PageId; this.NamedParent = page.ParentFormExists ? page.ParentForm.Name : String.Empty; List <String> grpNames = new List <String>(); foreach (ITisFieldData fld in page.LinkedFields) { if (grpNames.Contains(fld.ParentFieldGroup.Name.ToUpper())) { continue; } grpNames.Add(fld.ParentFieldGroup.Name.ToUpper()); groups.Add(new CCGroup(this.ParentCreator, fld.ParentFieldGroup)); } foreach (ITisFieldTableData fldTbl in page.LinkedFieldTables) { if (grpNames.Contains(fldTbl.ParentFieldGroup.Name.ToUpper())) { continue; } grpNames.Add(fldTbl.ParentFieldGroup.Name.ToUpper()); groups.Add(new CCGroup(this.ParentCreator, fldTbl.ParentFieldGroup)); } } catch (Exception ex) { ILog.LogError(ex); } }
/// <summary> /// Get all the file attachments defined for a page. /// </summary> /// <param name="page"></param> /// <returns></returns> public static String[] GetAttachments(ITisPageData page) { List <String> result = new List <String>(); try { foreach (String sa in page.ParentCollection.AttachedFileManager.QueryAttachedTypes()) { String fullPath = page.GetAttachmentFileName(sa.Trim('.')); if (File.Exists(fullPath) && !result.Contains(fullPath)) { result.Add(fullPath); } } } catch (Exception ex) { ILog.LogError(ex); } return(result.ToArray()); }
public static PageOcrData FromPRD(ITisPageData pageData) #endif { try { if (pageData != null) { PageOcrData res = FromPRD(pageData.GetAttachmentFileName("PRD"), true); res.Index = pageData.OrderInCollection - 1; return(res); } else { throw new Exception(String.Format("ITisPageData specified in: [{0}] is not valid", MethodBase.GetCurrentMethod().Name)); } } catch (Exception ex) { ILog.LogError(ex); } return(null); }
public CCField(CCreator parent, ITisFieldData field) : #endif this(parent, field != null? field.Name:String.Empty, field != null? field.Contents:String.Empty, field != null? field.Confidence:short.MinValue, field != null? field.FieldBoundingRect:new TIS_RECT(), parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(field) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(field, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(field, true) : null) { this.EflowOwner = field; this.ParentCollection = field.ParentCollection; this.ParentForm = field.ParentForm; this.ParentPage = field.ParentPage; this.ParentGroup = field.ParentFieldGroup; this.ParentFieldArray = field.ParentFieldArray; this.Index = field.TableRepetitionIndex; this.ParentTable = field.ParentFieldTable; if (field.ParentFieldArrayExists) { this.NamedParent = field.ParentFieldArray.Name; } else if (field.ParentFieldGroupExists) { this.NamedParent = field.ParentFieldGroup.Name; } }
internal CCPage(CCreator parent, ITisPageData page)
public CCPage(ITisPageData page) : this(null, page) { }
/// <summary> /// Create <see cref="PageOcrData"/> from a prd file (get the path from the specified tis page. /// </summary> /// <param name="pageData">The ITisPageData object to desrialize as <see cref="PageOcrData"/>.</param> /// <returns>PageOcrData when successfull, null when failed.</returns> #if INTERNAL internal static PageOcrData FromPRD(ITisPageData pageData)