Example #1
0
        public void PopulateDrives()
        {
            if (StorageAccount == null)
            {
                return;
            }

            BackupPlanPathNodeRepository dao = new BackupPlanPathNodeRepository();

            try
            {
                //IFileVersion version = BuildVersion(Plan);
                IList <Models.BackupPlanPathNode> drives = dao.GetAllDrivesByStorageAccount(StorageAccount);

                foreach (var drive in drives)
                {
                    //EntryInfo info = new EntryInfo(TypeEnum.DRIVE, drive.Name, drive.Name, version);
                    BackupPlanTreeNode driveNode = BackupPlanTreeNode.CreateDriveNode(drive);
                    this.Nodes.Add(driveNode);
                    RestoreNodeState(driveNode);
                }
            }
            catch (System.SystemException e)
            {
                ShowErrorMessage(e, null);
            }
        }
Example #2
0
        private BackupPlanTreeNode AddDriveNode(TreeView view, BackupPlanPathNode pathNode)
        {
            Assert.AreEqual(EntryType.DRIVE, pathNode.Type);
            BackupPlanTreeNode node = BackupPlanTreeNode.CreateDriveNode(pathNode);

            view.Nodes.Add(node);
            return(node);
        }