Example #1
0
 private void processMethod()
 {
     using (Utils.ProgressBlock progress = new Utils.ProgressBlock(_ownerPlugin, STR_IMPORTINGPOLY, STR_IMPORTINGFILE, _filenames.Length, 0))
     {
         int index = 0;
         try
         {
             foreach (string fn in _filenames)
             {
                 progress.UpdateProgress(STR_IMPORTINGPOLY, STR_IMPORTINGFILE, _filenames.Length, index);
                 if (fn.ToLower().EndsWith(".txt"))
                 {
                     if (!_ownerPlugin.processTextFile(_selectedAreaType, fn, _selectedParent))
                     {
                         break;
                     }
                 }
                 else if (fn.ToLower().EndsWith(".gpx"))
                 {
                     if (!_ownerPlugin.processGpxFile(_selectedAreaType, fn, _selectedParent))
                     {
                         break;
                     }
                 }
                 index++;
             }
         }
         catch
         {
         }
     }
     _actionReady.Set();
 }