private void ShapeFileFeatureSource_BuildingIndex(object sender, BuildingIndexShapeFileFeatureSourceEventArgs e)
        {
            BuildingIndexEventArgs args = new BuildingIndexEventArgs(e.RecordCount, e.CurrentRecordIndex, e.CurrentFeature, e.StartProcessTime, e.Cancel);

            OnBuildingIndex(args);
            e.Cancel = args.Cancel;
        }
        protected virtual void OnBuildingIndex(BuildingIndexEventArgs args)
        {
            EventHandler <BuildingIndexEventArgs> handler = BuildingIndex;

            if (handler != null)
            {
                handler(this, args);
            }
        }
        private void IndexAdapter_BuildingIndex(object sender, BuildingIndexEventArgs e)
        {
            int progressPercentage = e.CurrentRecordIndex * 100 / e.RecordCount;
            var updatingArgs       = new UpdatingTaskProgressEventArgs(TaskState.Updating, progressPercentage);

            updatingArgs.Current    = e.CurrentRecordIndex;
            updatingArgs.UpperBound = e.RecordCount;
            OnUpdatingProgress(updatingArgs);
            if (updatingArgs.TaskState == TaskState.Canceled)
            {
                e.Cancel = true;
            }
        }
예제 #4
0
 private void BuildingIndex(object sender, BuildingIndexEventArgs e)
 {
     Progress = e.CurrentRecordIndex * 100 / e.RecordCount;
 }