示例#1
0
        /// <summary>
        /// build record computer
        /// </summary>
        /// <returns></returns>
        RecordComputer BuildLocateExpressionRecordComputer(TaskViewsCollection taskViews)
        {
            RecordComputerBuilder recordComputerBuilder = new LocateExpressionRecordComputerBuilder()
            {
                LocalDataviewManager = LocalDataviewManager,
                TaskViews            = taskViews
            };

            return(recordComputerBuilder.Build());
        }
示例#2
0
        void CreateRecordCursors(TaskViewsCollection views)
        {
            foreach (var view in views.RecordViews)
            {
                if (view is RuntimeRealView)
                {
                    ((RuntimeRealView)view).BuildCursor();
                }
            }

            if (views.ViewMain != null)
            {
                views.ViewMain.BuildLocateCursor();
            }
        }
示例#3
0
        /// <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));
                }
            }
        }
示例#4
0
        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);
        }