public void SetSelectedDirectory(CDirectoryEntry directory) { ActiveDirectory = directory.Path; SelectedFolderPath.Clear(); CDirectoryEntry dir = directory; SelectedFolderPath.Add(RootDirectory); while (dir.ParentDirectory != null) { SelectedFolderPath.Insert(1, dir); dir = dir.ParentDirectory; } UpdateShownAssets(); }
public CAssetBrowserViewModel() : base("AssetBrowser") { SetIconSourcePath("Resources/Images/Tabs/assetbrowser.png"); Content = new AssetBrowserView(); m_rootDirectory = new CDirectoryEntry("", this); // Start at the project root RootFolders.Add(m_rootDirectory); SelectedFolderPath.Add(m_rootDirectory); ImportCommand = new CRelayCommand(OnImport); DeleteAssetCommand = new CRelayCommand(OnDeleteAsset); CreateMaterialCommand = new CRelayCommand(OnCreateMaterial); CreateEntityCommand = new CRelayCommand(OnCreateEntity); CreateInterfaceCommand = new CRelayCommand(OnCreateInterface); }