void AddFoldersToFolderMenuItem(FolderMenuItem item, string overridePath = null, BackupSessionHistory history = null) { var path = overridePath == null ? item.Path : overridePath; if (!m_IStorage.DirectoryExists(path)) { return; } var subdirectoryList = m_IStorage.GetDirectoriesNames(path); foreach (string subdirectory in subdirectoryList) { string newPath = m_IStorage.Combine(path, subdirectory); FileAttributes attr = m_IStorage.GetFileAttributes(newPath); if (!IsHidden(attr) && !IsNameExistsInNameList(subdirectory, item.ChildFolderMenuItems)) { HistoryTypeEnum?historyType = GetFolderHistoryType(m_IStorage.Combine(item.RelativePath, subdirectory)); //if (history == null)// || history.SessionHistoryIndex == 1 || historyType == HistoryTypeEnum.Deleted) { bool bSelected = item.Selected == true; var rp = m_IStorage.Combine(item.RelativePath, subdirectory); Application.Current.Dispatcher.Invoke(new Action(() => { item.ChildFolderMenuItems.Add(CreateMenuItem(m_IStorage.IsFolder(newPath), bSelected, newPath, rp, subdirectory, item, attr, historyType)); })); } } } }
protected string GetTargetArchivePath(string path) { return(m_IStorage.Combine(path, BackupProfileData.TargetBackupBaseDirectoryName)); }