public CCCollection(CCreator parent, ITisClientServicesModule csm, ITisCollectionData collection) #endif : base(parent, collection != null? collection.Name:String.Empty, parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(collection) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(collection, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(collection, true) : null) { try { Priority = WorkflowPriorityLevel.Normal; FlowType = String.Empty; TargetQueue = String.Empty; LoginApplication = String.Empty; LoginStation = String.Empty; ImagePath = String.Empty; if (forms == null) { forms = new List <CCForm>(); } else { forms.Clear(); } this.LoginStation = csm.Session.StationName; this.LoginApplication = csm.Application.AppName; this.ParentCollection = collection; this.FlowType = collection.FlowType; this.EflowOwner = collection; this.ImagePath = collection.GetAttachmentFileName(CCEnums.CCFilesExt.TIF.ToString()); #region remove the collection image path from the attachments. List <String> att = new List <string>(); att.AddRange(CCUtils.GetAttachments(csm, collection.AttachedFileManager)); for (int ia = att.Count - 1; ia >= 0; ia--) { if (String.Compare(Path.GetFileName(att[ia]), this.ImagePath, true) == 0) { att.RemoveAt(ia); } } #endregion this.Attachments = att.ToArray(); this.Priority = collection.PriorityLevel; //-- Create forms --\\ foreach (ITisFormData frm in collection.Forms) { forms.Add(new CCForm(this.ParentCreator, frm)); } } catch (Exception ex) { ILog.LogError(ex); } }
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; } }
public CCGroup(CCreator parent, ITisFieldGroupData group) #endif : base(parent, group != null? group.Name:String.Empty, parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(group) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(group, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(group, true) : null) { try { if (fields == null) { fields = new List <CCField>(); } else { fields.Clear(); } if (tables == null) { tables = new List <CCTable>(); } else { tables.Clear(); } this.EflowOwner = group; this.ParentCollection = group.ParentCollection; this.ParentForm = group.ParentForm; this.NamedParent = group.ParentForm.Name; List <String> fieldNames = new List <String>(); foreach (ITisFieldData fld in group.LinkedFields) { if (fieldNames.Contains(fld.Name.ToUpper())) { continue; } if (this.ParentPage == null) { this.ParentPage = fld.ParentPage; } fields.Add(new CCField(this.ParentCreator, fld)); fieldNames.Add(fld.Name); } foreach (ITisFieldTableData fldTbl in group.LinkedFieldTables) { if (this.ParentPage == null) { this.ParentPage = fldTbl.ParentPage; } tables.Add(new CCTable(this.ParentCreator, fldTbl)); } } catch (Exception ex) { ILog.LogError(ex); } }
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); } }
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 CCForm(CCreator parent, ITisFormData form) #endif : base(parent, form != null? form.Name:String.Empty, parent == null || !parent.CurrentProfile.IgnoreExceptions ? CCUtils.GetSpecialTags(form) : null, parent == null || !parent.CurrentProfile.IgnoreNamedUserTags ? CCUtils.GetNamedUserTags(form, false) : null, parent == null || !parent.CurrentProfile.IgnoreUserTags ? CCUtils.GetUserTags(form, true) : null) { try { if (pages == null) { pages = new List <CCPage>(); } else { pages.Clear(); } this.ParentCollection = form.ParentCollection; this.FormType = form.FormType; this.EflowOwner = form; this.NamedParent = form.ParentCollection.Name; foreach (ITisPageData pg in form.LinkedPages) { pages.Add(new CCPage(this.ParentCreator, pg)); } } catch (Exception ex) { ILog.LogError(ex); } }