public DirectoryTabItemViewModel(ISynchronizationHelper synchronizationHelper) { _synchronizationHelper = synchronizationHelper; _backgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true, WorkerReportsProgress = true }; _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted; _backgroundWorker.DoWork += BackgroundWorker_DoWork; _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged; _history = new DirectoryHistory("Мой компьютер", "Мой компьютер"); OpenCommand = new DelegateCommand(Open); MoveBackCommand = new DelegateCommand(OnMoveBack, OnCanMoveBack); MoveForwardCommand = new DelegateCommand(OnMoveForward, OnCanMoveForward); Name = _history.Current.DirectoryPathName; FilePath = _history.Current.DirectoryPath; OpenDirectory(); _history.HistoryChanged += History_HistoryChanged; }
public SynchronizationService(IGithubClient githubClient, IProjectService projectService, ISynchronizationHelper synchronizationHelper, ISecretService secretService) { _githubClient = githubClient; _projectService = projectService; _synchronizationHelper = synchronizationHelper; _secretService = secretService; }
public ProjectService(BuilderContext context, IMapper mapper, IQuartzService quartzService, IBuildStepService buildStepService, ISynchronizationHelper synchronizationHelper) : base(context, mapper) { _quartzService = quartzService; _buildStepService = buildStepService; _synchronizationHelper = synchronizationHelper; }
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; }
public MainViewModel(ISynchronizationHelper synchronizationHelper) { _synchronizationHelper = synchronizationHelper; AddTabItemCommand = new DelegateCommand(OnAddTabItem); CloseCommand = new DelegateCommand(OnClose); AddTabItemViewModel(); BookmarkClickCommand = new DelegateCommand(OnBookmarkClicked); Bookmarks = new ObservableCollection <MenuItemViewModel> { new MenuItemViewModel("C:\\") { Header = "C:\\", Command = BookmarkClickCommand }, new MenuItemViewModel(@"C:\Games\ArtMoney") { Header = @"ArtMoney", Command = BookmarkClickCommand } }; }