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;
        }
Example #2
0
        private static void ShapeFileFeatureSource_BuildingIndex(object sender, BuildingIndexShapeFileFeatureSourceEventArgs e)
        {
            if (Application.Current != null)
            {
                Application.Current.Dispatcher.BeginInvoke(new Action <StatusBar>(s =>
                {
                    s.CurrentProgressBar.IsIndeterminate = false;
                    s.CurrentProgressBar.Value           = e.CurrentRecordIndex * 100 / e.RecordCount;
                }), StatusBar.GetInstance());
            }

            if (isCancelled)
            {
                e.Cancel = true;
            }
        }
 private void ShapeFileFeatureSource_BuildingIndex(object sender, BuildingIndexShapeFileFeatureSourceEventArgs e)
 {
     if (Application.Current != null && e.ShapePathFilename.Equals(filePath))
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             if (!e.Cancel)
             {
                 Status = string.Format(CultureInfo.InvariantCulture, statusFormat, filePath, e.CurrentRecordIndex * 100 / e.RecordCount + "%");
             }
         }));
         if (IsCancel && !e.Cancel)
         {
             e.Cancel = true;
         }
     }
 }