public void ImportGPXFile(String filename, bool autoclose)
 {
     System.IO.FileStream fs = System.IO.File.OpenRead (filename);
     GPXParser parser = new GPXParser ();
     parser.IgnoreExtraFields = Config.ImportIgnoreExtraFields;
     parser.PreserveFound = Config.ImportPreventStatusOverwrite;
     parser.PurgeLogs = Config.ImportPurgeOldLogs;
     parser.CacheOwner = m_app.OwnerIDs;
     parser.Bookmark = Config.ImportBookmarkList;
     ProgressDialog pdlg = new ProgressDialog (parser);
     pdlg.AutoClose = autoclose;
     pdlg.Icon = this.Icon;
     pdlg.Modal = true;
     pdlg.Start (filename, m_app.CacheStore);
     CacheList.Refresh ();
     fs.Close ();
 }
 private void ImportDirectory(String path, bool delete, bool autoClose)
 {
     GPXParser parser = new GPXParser ();
     parser.Bookmark = Config.ImportBookmarkList;
     parser.IgnoreExtraFields = Config.ImportIgnoreExtraFields;
     parser.PreserveFound = Config.ImportPreventStatusOverwrite;
     parser.PurgeLogs = Config.ImportPurgeOldLogs;
     parser.CacheOwner = m_app.OwnerIDs;
     ProgressDialog pdlg = new ProgressDialog (parser);
     pdlg.Icon = this.Icon;
     pdlg.AutoClose = autoClose;
     pdlg.Modal = true;
     pdlg.StartMulti (path, m_app.CacheStore, delete);
     CacheList.Refresh ();
 }