public static void CreateChromer(ISynchronizationHelper helper, ITabClient tabClient, Action <TabsViewModel, Point> windowFactory) { if (Instance == null) { CultureInfo currentCulture = new("Ru-ru"); CultureInfo.CurrentCulture = currentCulture; CultureInfo.CurrentUICulture = currentCulture; Instance = new ChromEr(helper, tabClient, windowFactory); } }
private ChromEr(ISynchronizationHelper synchronizationHelper, ITabClient tabClient, Action <TabsViewModel, Point> windowFactory) { _synchronizationHelper = synchronizationHelper; _tabClient = tabClient; _windowFactory = windowFactory; var converter = new ExtensionToImageFileConverter(); OpenNewWindowCommand = new DelegateCommand(OnOpenNewWindow); IconsManager = new IconsManager(converter); BookmarksManager = new BookmarksManager(converter); }
public TabsViewModel(ISynchronizationHelper synchronizationHelper, ITabClient tabClient, IEnumerable <DirectoryTabItemViewModel> init) { _synchronizationHelper = synchronizationHelper; InterTabClient = tabClient; CreateNewTabItemCommand = new DelegateCommand(OnCreateNewTabItem); OpenTabItemInNewWindowCommand = new DelegateCommand(OnOpenTabItemInNewWindow, OnCanOpenTabItemInNewWindow); DuplicateTabCommand = new DelegateCommand(OnDuplicate); CloseAllTabsCommand = new DelegateCommand(OnCloseAllTabs, CanCloseAllTabs); TabItems = new ObservableCollection <ChromerTabItemViewModel>(init); Factory = CreateTabVm; TabItems.CollectionChanged += TabItemsOnCollectionChanged; }