AddNewPath() public method

Adds path to top of list of most recently used files if it exists (returns false if it doesn't exist)
public AddNewPath ( string path ) : bool
path string
return bool
Example #1
0
 public void SelectCollectionAndClose(string path)
 {
     SelectedPath = path;
     if (!string.IsNullOrEmpty(path))
     {
         _mruList.AddNewPath(path);
         Invoke(DoneChoosingOrCreatingLibrary);
     }
 }
Example #2
0
 public void SelectCollectionAndClose(string path)
 {
     SelectedPath = path;
     if (!string.IsNullOrEmpty(path))
     {
         if (ReportIfInvalidCollectionToEdit(path))
         {
             return;
         }
         //CheckForBeingInDropboxFolder(path);
         _mruList.AddNewPath(path);
         Invoke(DoneChoosingOrCreatingLibrary);
     }
 }
 public void LaunchDemoDialog()
 {
     Browser.SetUpXulRunner();
     var mru = new MostRecentPathsList();
     foreach (var dir in Directory.GetDirectories(NewCollectionWizard.DefaultParentDirectoryForCollections))
     {
         foreach (var path in Directory.GetFiles(dir, "*.BloomCollection"))
         {
             mru.AddNewPath(path);
             break;
         }
     }
     using (var dlg = new OpenAndCreateCollectionDialog(mru))
     {
         dlg.ShowDialog();
     }
 }
        public void SelectCollectionAndClose(string path)
        {
            if (Bloom.Utils.LongPathAware.GetExceedsMaxPath(path))
            {
                Utils.LongPathAware.ReportLongPath(path);
                return;                 // don't close
            }

            SelectedPath = path;
            if (!string.IsNullOrEmpty(path))
            {
                if (Utils.MiscUtils.ReportIfInvalidCollectionToEdit(path))
                {
                    return;
                }
                //CheckForBeingInDropboxFolder(path);
                _mruList.AddNewPath(path);
                Invoke(DoneChoosingOrCreatingCollection);
            }
        }