Esempio n. 1
0
        public BackupPanelVM()
        {
            curVM = this;

            backupCommand = new DelegateCommand(Backup);
            useCommand = new DelegateCommand(Use);
            deleteCommand = new DelegateCommand(Delete);

            _backupRoot = new BackupVM(new Backup("Track Tree"));

            _rootCollection.Add(_backupRoot);

            LoadBackupList();
            LoadTrackTree();
        }
Esempio n. 2
0
        private void UpdateBackupView()
        {
            
            if (_selectedBackupIndex > -1 && _backupList.Count > 0)
            {
                //Update Log display
                XElement backup = XElement.Load(_backupList[_selectedBackupIndex].Path);
                Log = (string)backup.Attribute("Log");

                //Update Backup Tree View
                _backupTreeView.Clear();

                BackupVM backupTreeItem = new BackupVM(new Backup((string)backup.Attribute("Title")));
                _backupTreeView.Add(backupTreeItem);

                foreach (XElement dir in backup.Elements("Directory"))
                {
                    DirVM dirTreeItem = new DirVM(new BackupDir((string)dir.Attribute("Name")));
                    backupTreeItem.Add(dirTreeItem);
                    
                    foreach (XElement file in dir.Elements("File"))
                    {
                        FileVM fileTreeItem = new FileVM(new BackupFile((string)file.Attribute("Name"),""));
                        dirTreeItem.Add(fileTreeItem);
                    }
                }

            }
        }
Esempio n. 3
0
        public DirVM(BackupDir dir, BackupVM parent = null)
            : base(parent)
        {
            _dir = dir;

            addFileCommand = new DelegateCommand(AddTrackedFile);
            renameCommand = new DelegateCommand(Rename);
            deleteCommand = new DelegateCommand(Delete);
        }