public MainPageDesignViewModel()
        {
            var root1Folder = new Folders{Name = "Root1", Id = 1,Parent = 0};
            var root1Dvm = new FolderDesignViewModel(root1Folder, null, _folderTree);
            _folderItems.Add(root1Dvm);
            var root2Folder = new Folders{Name = "Root2",Id = 2,Parent = 0};
            var root2Dvm = new FolderDesignViewModel(root2Folder, null, _folderTree);
            _folderItems.Add(root2Dvm);
            var root3Folder = new Folders{Name = "Root3",Id = 3,Parent = 0};
            var root3Dvm = new FolderDesignViewModel(root3Folder, null, _folderTree);
            _folderItems.Add(root3Dvm);
            root2Dvm.AddChild("Child1");
            root2Dvm.AddChild("Child2");
            root2Dvm.AddChild("Child3");
            _folderTree.Children = _folderItems;
            AccountsList = new ObservableCollection<AccountDesignViewModel>()
            {
                new AccountDesignViewModel()
                {
                    Id = 1, Name = "My account"
                },
                new AccountDesignViewModel()
                {
                    Id = 2, Name = "My other account"
                }   
            };

        }
示例#2
0
 public async Task Folder()
 {
     var db = Database.DbConnection;
     var folder = new Folders();
     folder.Name = "Test";
     var i = await db.InsertAsync(folder);
     var result = await db.FindAsync<Folders>(f => f.Name == "Test");
     Assert.IsNotNull(result, "Folder niet aangemaakt");
 }
 public FolderDesignViewModel(string name, FolderTreeDesignViewModel folderTree)
 {
     _folder = new Folders();
     Name = name;
     _visualTree = folderTree;
 }
 internal FolderDesignViewModel(Folders myFolder, FolderDesignViewModel myParent, FolderTreeDesignViewModel visualTree )
 {
     this._folder = myFolder;
     _visualTree = visualTree;
     Parent = myParent;
 }