private void OnCreateNewTabItem(object?obj) { if (obj is not DirectoryTabItemViewModel directoryTabItem) { return; } var tab = new DirectoryTabItemViewModel(_synchronizationHelper, ChromEr.RootName, ChromEr.RootName); TabItems.Add(tab); }
public void OnOpenNewTab(FileEntityViewModel fileEntityViewModel, bool isSelectNewTab = false) { if (fileEntityViewModel is DirectoryViewModel directoryViewModel) { var tab = new DirectoryTabItemViewModel(_synchronizationHelper, directoryViewModel.FullName, directoryViewModel.Name); TabItems.Add(tab); if (isSelectNewTab) { CurrentTabItem = tab; } } }