예제 #1
0
        private void OnCreateNewTabItem(object?obj)
        {
            if (obj is not DirectoryTabItemViewModel directoryTabItem)
            {
                return;
            }

            var tab = new DirectoryTabItemViewModel(_synchronizationHelper,
                                                    ChromEr.RootName, ChromEr.RootName);

            TabItems.Add(tab);
        }
예제 #2
0
        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;
                }
            }
        }