public HierachicalWrapper_Folder GetOrCreateRootFolder()
 {
     if (RootFolderViewWrapper != null)
     {
         return(RootFolderViewWrapper);
     }
     RootFolderViewWrapper = new HierachicalWrapper_Folder("[My Notes]", _config, DP_ROOTFOLDER, false, false);
     SubFolder.Add(RootFolderViewWrapper);
     return(RootFolderViewWrapper);
 }
        public HierachicalWrapper_Folder GetOrCreateFolder(string txt, out bool created)
        {
            foreach (var item in SubFolder)
            {
                if (item.Header.ToLower() == txt.ToLower())
                {
                    created = false; return(item);
                }
            }
            var i = new HierachicalWrapper_Folder(txt, _config, _path.SubDir(txt), false, false);

            SubFolder.Add(i);
            created = true;
            return(i);
        }
        public void CopyPermanentsTo(HierachicalWrapper_Folder other)
        {
            foreach (var folder1 in SubFolder)
            {
                var folder2 = other.SubFolder.FirstOrDefault(sf => sf._path.EqualsIgnoreCase(folder1._path));
                if (folder2 == null && folder1.Permanent)
                {
                    folder2           = other.GetOrCreateFolder(folder1.Header, out _);
                    folder2.Permanent = true;
                }

                if (folder2 != null)
                {
                    folder1.CopyPermanentsTo(folder2);
                }
            }
        }
 public HierachicalWrapper_AllNotes(HierachicalWrapper_Folder baseWrapper, IHierachicalWrapperConfig cfg)
     : base("All notes", cfg, DP_ALLNOTES, false, false)
 {
     _baseWrapper = baseWrapper;
     IsSelected   = true;
 }
 public void Add(HierachicalWrapper_Folder elem)
 {
     SubFolder.Add(elem);
 }
 public HierachicalWrapper_UnsortedNotes(HierachicalWrapper_Folder baseWrapper, IHierachicalWrapperConfig cfg)
     : base("Unsorted notes", cfg, DP_UNSORTEDNOTES, false, false)
 {
     _baseWrapper = baseWrapper;
 }