public FileSystemItemViewModel(string fullPath, string rootPath, FileSystemItemViewModel parent, AssetsViewModel assets) { FullPath = fullPath; _rootPath = rootPath; _parent = parent; _assets = assets; Name = FullPath == rootPath ? Path.GetFileName(Path.GetDirectoryName(fullPath)) : Path.GetFileName(FullPath); }
public EditorViewModel(ProjectReference projectReference, IConfigurationContainer <ProjectConfiguration> configuration, AssetsViewModel assets, Lazy <EditorWindow> window, Func <AssetStoreWindow> assetStore, StatusBarViewModel statusBar, IObserver <LogMessage> log, IObservable <EditorApp> app ) { _projectReference = projectReference; _configuration = configuration; _window = window; _assetStore = assetStore; StatusBar = statusBar; _log = log; _disposable.Add(app.ObserveOnDispatcher().Subscribe(SetApp, _ => SetApp(null), () => SetApp(null))); Assets = assets; ExitCommand = new ActionCommand(Exit); AssetStoreCommand = new ActionCommand(AssetStore); _inspector = new InspectorViewModel(); _hierarchyViewModel = new HierarchyViewModel(_inspector); LoadAllModelsCommand = new ActionCommand(LoadAllModels); }
public FileViewModel(string fullPath, string rootPath, FileSystemItemViewModel parent, AssetsViewModel assets) : base(fullPath, rootPath, parent, assets) { _info = new Lazy <FileInfo>(() => new FileInfo(fullPath)); EditCommand = new ActionCommand(Edit); }
public FolderViewModel(string fullPath, string rootPath, FileSystemItemViewModel parent, AssetsViewModel assets) : base(fullPath, rootPath, parent, assets) { OpenCommand = new ActionCommand(Select); ExportPackageCommand = new ActionCommand(ExportPackage); Preview = assets.PreviewFactory.CreateFolderPreview(ResourcePath, fullPath); }