public BondStructureFolderNode(UltraTree owningTree_, BondStructureFolder folder_, BondStructureFolderTreeDisplayMode mode_, bool readTree_=true)
    {
      m_folder = folder_;
      Text = folder_.FolderName;
      m_mode = mode_;
      Owner = owningTree_;
      if (readTree_)
      {
        foreach (var folder in m_folder.SubFolders.OrderBy(x => x.FolderName))
          Nodes.Add(new BondStructureFolderNode(owningTree_, folder, mode_, readTree_));

        if(m_mode==BondStructureFolderTreeDisplayMode.Full)
          foreach (var item in m_folder.Items.OrderBy(x=>x.Name))
            Nodes.Add(new StructureNode(item));
      }

      LeftImages.Add(BSAResources.folder_icon_16black);

      subscribeToFolder();

    }
    private void collectStatLineCreatorsFromFolder(BondStructureFolder folder_, IList<IStatLineCreator> addToThis_)
    {
      foreach (var ite in folder_.Items)
        addToThis_.Add(new BondStructureDefinitionCache.BondStructureCreator(ite));

      foreach (var subFolder in folder_.SubFolders)
        collectStatLineCreatorsFromFolder(subFolder, addToThis_);
    }
    private void collectDefinitionsFromFolder(BondStructureFolder folder_, IList<BondStructureDefinition> addToThis_)
    {
      foreach( var ite in folder_.Items)
        if (!(addToThis_.Contains(ite)))
          addToThis_.Add(ite);

      foreach (var subfolder in folder_.SubFolders)
        collectDefinitionsFromFolder(subfolder, addToThis_);
    }
Exemplo n.º 4
0
 public FolderClickedArgs(BondStructureFolder folder_, MouseButtons buttons_)
 {
   Folder = folder_;
   Buttons = buttons_;
 }
Exemplo n.º 5
0
 protected override void Dispose(bool disposing)
 {
   m_folder = null;
   base.Dispose(disposing);
 }
Exemplo n.º 6
0
 public ClearFolderMenuItem(BondStructureFolder folder_)
   : base(folder_.fullPathToThisFolder,"Remove all items")
 {
   m_folder = folder_;
 }
 public override void Dispose()
 {
   subscribeToFolder(false);
   m_folder = null;
   Owner = null;
   base.Dispose();
 }
Exemplo n.º 8
0
    internal BondStructureFolder getSubFolder(string folderName_, bool createIfNotThere_ = true)
    {
      if (folderName_ == null) return this;

      var item = SubFolders.FirstOrDefault(x => String.CompareOrdinal(folderName_, x.FolderName) == 0);

      if (item == null && createIfNotThere_)
      {
        item = new BondStructureFolder(folderName_, this);
        SubFolders.Add(item);
        OnFolderContentsChanged(new BondStructureFolderChangedArgs(this, item, CacheAction.FolderAdded));
      }

      return item;
    }
Exemplo n.º 9
0
 public BondStructureFolder(string name_, BondStructureFolder parent_)
 {
   FolderName = name_;
   Parent = parent_;
 }