/// <summary> /// build record computer /// </summary> /// <returns></returns> RecordComputer BuildLocateExpressionRecordComputer(TaskViewsCollection taskViews) { RecordComputerBuilder recordComputerBuilder = new LocateExpressionRecordComputerBuilder() { LocalDataviewManager = LocalDataviewManager, TaskViews = taskViews }; return(recordComputerBuilder.Build()); }
void CreateRecordCursors(TaskViewsCollection views) { foreach (var view in views.RecordViews) { if (view is RuntimeRealView) { ((RuntimeRealView)view).BuildCursor(); } } if (views.ViewMain != null) { views.ViewMain.BuildLocateCursor(); } }
/// <summary> /// create record views /// </summary> void CreateRealRecordViews(TaskViewsCollection taskViews) { List <IDataviewHeader> dataviewHeaders = task.DataviewHeadersTable.FindAll(l => l is LocalDataviewHeader); foreach (IDataviewHeader dataviewHeader in dataviewHeaders) { if (dataviewHeader.IsMainSource) { taskViews.SetMainView(CreateMainSourceView(dataviewHeader)); } else { taskViews.AddLinkView(dataviewHeader.Id, (LinkView)CreateLinkView(dataviewHeader)); } } }
internal TaskViewsCollection BuildViewsCollection(Task task) { TaskViewsCollection taskViews = new TaskViewsCollection(); this.task = task; taskViews.Task = task; taskViews.Fields.AddRange(FieldsBuilder.Build(task)); taskViews.SetVirtualView(CreateVirtualView()); taskViews.SetRemoveView(CreateRemoteView()); CreateRealRecordViews(taskViews); CreateRecordCursors(taskViews); taskViews.MapRecordFields(); taskViews.SetRecordsComputer(BuildRecordComputer(taskViews)); taskViews.SetLocateExpressionRecordComputer(BuildLocateExpressionRecordComputer(taskViews)); if (taskViews.ViewMain == null) { LocalDataviewManager.PositionCache.IncludesFirst = true; LocalDataviewManager.PositionCache.IncludesLast = true; } return(taskViews); }