public DispatchThreadDelayedOperationExecutor( IDelayedOperationExecutor delayedOperationExecutor, ISynchronizationContextProvider synchronizationContextProvider) { _delayedOperationExecutor = delayedOperationExecutor; _synchronizationContextProvider = synchronizationContextProvider; }
public UIDelayedOperationProcessor( IDelayedOperationProcessor delayedOperationProcessor, ISynchronizationContextProvider synchronizationContextProvider) { _delayedOperationProcessor = delayedOperationProcessor; _synchronizationContextProvider = synchronizationContextProvider; }
public ChoosePageViewModel(ObservableCollection <Type> types, ISynchronizationContextProvider syncContext, Commands Commands) { this.syncContext = syncContext.SynchronizationContext; this.Commands = Commands; Name = GetType().Name; ListViewModels = new ObservableCollection <string>(); foreach (var item in types) { ListViewModels.Add(item.Name); } string pathToSave = "PreviouslySelectedProducts.xml"; XmlSerializer formatter = new XmlSerializer(typeof(ObservableCollection <TypePath>)); using (FileStream fs = new FileStream(pathToSave, FileMode.OpenOrCreate)) { if (fs.Length == 0) { formatter.Serialize(fs, PreviouslySelectedVM); } else { PreviouslySelectedVM = (ObservableCollection <TypePath>)formatter.Deserialize(fs); RemoveDuplicates(); fs.SetLength(0); formatter.Serialize(fs, PreviouslySelectedVM); } } }
public UIRequestProcessor(ITypedRequestProcessProxy typedRequestProcessProxy, IDelayedOperationProcessor delayedOperationProcessor, ISynchronizationContextProvider synchronizationContextProvider) { _typedRequestProcessProxy = typedRequestProcessProxy; _delayedOperationProcessor = delayedOperationProcessor; _synchronizationContextProvider = synchronizationContextProvider; }
public SourceExplorerHierarchyControllerFactory( ISynchronizationContextProvider synchronizationContextProvider, IFileSystemTreeSource fileSystemTreeSource, IVisualStudioPackageProvider visualStudioPackageProvider, IVsGlyphService vsGlyphService, IImageSourceFactory imageSourceFactory, IOpenDocumentHelper openDocumentHelper, IFileSystem fileSystem, IClipboard clipboard, IWindowsExplorer windowsExplorer, IUIRequestProcessor uiRequestProcessor, IEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IDelayedOperationProcessor delayedOperationProcessor, IUIThread uiThread) { _synchronizationContextProvider = synchronizationContextProvider; _fileSystemTreeSource = fileSystemTreeSource; _visualStudioPackageProvider = visualStudioPackageProvider; _vsGlyphService = vsGlyphService; _imageSourceFactory = imageSourceFactory; _openDocumentHelper = openDocumentHelper; _fileSystem = fileSystem; _clipboard = clipboard; _windowsExplorer = windowsExplorer; _uiRequestProcessor = uiRequestProcessor; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _delayedOperationProcessor = delayedOperationProcessor; _uiThread = uiThread; }
public Commands(ISynchronizationContextProvider syncContext, IVmObject vmObject, IDialogService dialogService, IDataService dataService) { this.vmObject = vmObject; this.dialogService = dialogService; this.dataService = dataService; this.scheduler = new SynchronizationContextScheduler(syncContext.SynchronizationContext); this.syncContext = syncContext; DoNothingCommand = CreateCommand(DoNothing); NextCurrentRowCommand = CreateCommand <object>(NextCurrentRow); PrevCurrentRowCommand = CreateCommand <object>(PrevCurrentRow); ToEndElementCommand = CreateCommand <object>(ToEndElement); ToFirstElementCommand = CreateCommand <object>(ToFirstElement); StartOrPausePlayCommand = CreateCommand <object>(StartOrPausePlay); OpenXmlForTableCreationCommand = CreateCommand(OpenFileForDataCreation); SaveXmlFromTableCommand = CreateCommand(SaveXmlFromTable); ShowHelpInformationCommand = CreateCommand <object>(ShowHelpInformation); UpdateCurrentRowCommand = CreateCommand <object>(UpdateCurrentRow); AddViewModelCommand = CreateCommand <object>(AddViewModel); AddPreviouslySelectedViewModelCommand = CreateCommand <object>(AddPreviouslySelectedViewModel); ConnectAsTcpClientCommand = CreateCommand <object>(RunConnectAsTcpClient); TestCommand = CreateCommand <object>(Test); RemoveViewModelCommand = CreateCommand(RemoveViewModel); }
public IPageViewModel CreateViewModelByType(Type t, ISynchronizationContextProvider s, IDialogService dialogService, IDataService dataService, Commands c) { ConstructorInfo ctor = t.GetConstructor(new[] { typeof(ISynchronizationContextProvider), typeof(IDialogService), typeof(IDataService), typeof(Commands) }); object instance = ctor.Invoke(new object[] { s, dialogService, dataService, c }); return((IPageViewModel)instance); }
public SourceExplorerHierarchyControllerFactory( ISynchronizationContextProvider synchronizationContextProvider, IFileSystemTreeSource fileSystemTreeSource, IVisualStudioPackageProvider visualStudioPackageProvider, IVsGlyphService vsGlyphService, IImageSourceFactory imageSourceFactory, IOpenDocumentHelper openDocumentHelper, IFileSystem fileSystem, IClipboard clipboard, IWindowsExplorer windowsExplorer, IDispatchThreadServerRequestExecutor dispatchThreadServerRequestExecutor, IEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IDelayedOperationExecutor delayedOperationExecutor, IDispatchThread dispatchThread, IShowServerInfoService showServerInfoService) { _synchronizationContextProvider = synchronizationContextProvider; _fileSystemTreeSource = fileSystemTreeSource; _visualStudioPackageProvider = visualStudioPackageProvider; _vsGlyphService = vsGlyphService; _imageSourceFactory = imageSourceFactory; _openDocumentHelper = openDocumentHelper; _fileSystem = fileSystem; _clipboard = clipboard; _windowsExplorer = windowsExplorer; _dispatchThreadServerRequestExecutor = dispatchThreadServerRequestExecutor; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _delayedOperationExecutor = delayedOperationExecutor; _dispatchThread = dispatchThread; _showServerInfoService = showServerInfoService; }
public CodeSearchController( CodeSearchControl control, IDispatchThreadServerRequestExecutor dispatchThreadServerRequestExecutor, IDispatchThreadDelayedOperationExecutor dispatchThreadDelayedOperationExecutor, IFileSystemTreeSource fileSystemTreeSource, ITypedRequestProcessProxy typedRequestProcessProxy, IProgressBarTracker progressBarTracker, IStandarImageSourceFactory standarImageSourceFactory, IWindowsExplorer windowsExplorer, IClipboard clipboard, ISynchronizationContextProvider synchronizationContextProvider, IOpenDocumentHelper openDocumentHelper, ITextDocumentTable textDocumentTable, IEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IBuildOutputParser buildOutputParser, IVsEditorAdaptersFactoryService adaptersFactoryService, IShowServerInfoService showServerInfoService) { _control = control; _dispatchThreadServerRequestExecutor = dispatchThreadServerRequestExecutor; _fileSystemTreeSource = fileSystemTreeSource; _typedRequestProcessProxy = typedRequestProcessProxy; _progressBarTracker = progressBarTracker; _standarImageSourceFactory = standarImageSourceFactory; _windowsExplorer = windowsExplorer; _clipboard = clipboard; _synchronizationContextProvider = synchronizationContextProvider; _openDocumentHelper = openDocumentHelper; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _buildOutputParser = buildOutputParser; _adaptersFactoryService = adaptersFactoryService; _showServerInfoService = showServerInfoService; _searchResultDocumentChangeTracker = new SearchResultsDocumentChangeTracker( dispatchThreadDelayedOperationExecutor, textDocumentTable); _taskCancellation = new TaskCancellation(); // Ensure initial values are in sync. GlobalSettingsOnPropertyChanged(null, null); // Ensure changes to ViewModel are synchronized to global settings ViewModel.PropertyChanged += ViewModelOnPropertyChanged; // Ensure changes to global settings are synchronized to ViewModel _globalSettingsProvider.GlobalSettings.PropertyChanged += GlobalSettingsOnPropertyChanged; _eventBusCookie1 = _eventBus.RegisterHandler("TextDocument-Open", TextDocumentOpenHandler); _eventBusCookie2 = _eventBus.RegisterHandler("TextDocument-Closed", TextDocumentClosedHandler); _eventBusCookie3 = _eventBus.RegisterHandler("TextDocumentFile-FileActionOccurred", TextDocumentFileActionOccurred); typedRequestProcessProxy.EventReceived += TypedRequestProcessProxy_OnEventReceived; dispatchThreadServerRequestExecutor.ProcessFatalError += DispatchThreadServerRequestExecutor_OnProcessFatalError; fileSystemTreeSource.TreeReceived += FileSystemTreeSource_OnTreeReceived; fileSystemTreeSource.ErrorReceived += FileSystemTreeSource_OnErrorReceived; }
public ReportServerProgress( ITypedRequestProcessProxy typedRequestProcessProxy, ISynchronizationContextProvider synchronizationContextProvider, IStatusBar statusBar) { _typedRequestProcessProxy = typedRequestProcessProxy; _synchronizationContextProvider = synchronizationContextProvider; _statusBar = statusBar; }
public RT01ViewModel(ISynchronizationContextProvider syncContext, IDialogService dialogService, IDataService dataService, Commands Commands) { Name = GetType().Name; DialogService = dialogService; DialogService.Filter = "CSV files (*.csv)|*.csv"; this.syncContext = syncContext.SynchronizationContext; this.Commands = Commands; FillData(); }
public MT1553ViewModel(ISynchronizationContextProvider syncContext, IDialogService dialogService, IDataService dataService, Commands Commands) { ; Name = GetType().Name; DialogService = dialogService; DialogService.Filter = "TXT files (*.txt)|*.txt"; this.syncContext = syncContext.SynchronizationContext; this.Commands = Commands; FillData(); }
public DispatchThreadServerRequestExecutor(ITypedRequestProcessProxy typedRequestProcessProxy, IDelayedOperationExecutor delayedOperationExecutor, ISynchronizationContextProvider synchronizationContextProvider) { _typedRequestProcessProxy = typedRequestProcessProxy; _delayedOperationExecutor = delayedOperationExecutor; _synchronizationContextProvider = synchronizationContextProvider; _typedRequestProcessProxy.ProcessStarted += TypedRequestProcessProxyOnProcessStarted; _typedRequestProcessProxy.ProcessFatalError += TypedRequestProcessProxyOnProcessFatalError; }
public Commands(ISynchronizationContextProvider syncContext, IVmObject vmObject, IDialogService dialogService, IDataService dataService) { this.vmObject = vmObject; this.dialogService = dialogService; this.dataService = dataService; this.scheduler = new SynchronizationContextScheduler(syncContext.SynchronizationContext); this.syncContext = syncContext; DoNothingCommand = CreateCommand <object>(DoNothing); OpenFolderCommand = CreateCommand(OpenFolder); }
public FirstViewModel(ISynchronizationContextProvider syncContext, IDialogService dialogService, IDataService dataService, Commands Commands) { DialogService = dialogService; //DialogService.Filter = "BMD files (*.bmd)|*.bmd"; this.SyncContext = syncContext.SynchronizationContext; this.Commands = Commands; Name = "Первая бизнес-модель"; MainModels = new ObservableCollectionExtended <MainModel>(); CreateNodes(); }
public StartVmObject(ISynchronizationContextProvider syncContext, IDialogService dialogService, IDataService dataService) { this.syncContext = syncContext.SynchronizationContext; this.Commands = new Commands(syncContext, this, dialogService, dataService); Title = "Viewer"; Types = GetTypes(); SelectedViewModel = new FirstViewModel(syncContext, dialogService, dataService, Commands); }
public StartVmObject(ISynchronizationContextProvider syncContext, IDialogService dialogService, IDataService dataService) { this.syncContext = syncContext.SynchronizationContext; this.Commands = new Commands(syncContext, this, dialogService, dataService); GetTypes(); ViewModels = new ObservableCollection <IPageViewModel>(); ViewModels.Add(new ChoosePageViewModel(Types, syncContext, Commands) { }); SelectedViewModel = ViewModels[ViewModels.Count - 1]; }
public SourceExplorerViewModelHost( SourceExplorerControl control, IUIRequestProcessor uiRequestProcessor, IStandarImageSourceFactory standarImageSourceFactory, IWindowsExplorer windowsExplorer, IClipboard clipboard, ISynchronizationContextProvider synchronizationContextProvider, IOpenDocumentHelper openDocumentHelper) { _control = control; _uiRequestProcessor = uiRequestProcessor; _standarImageSourceFactory = standarImageSourceFactory; _windowsExplorer = windowsExplorer; _clipboard = clipboard; _synchronizationContextProvider = synchronizationContextProvider; _openDocumentHelper = openDocumentHelper; }
public CodeSearchController( CodeSearchControl control, IUIRequestProcessor uiRequestProcessor, IUIDelayedOperationProcessor uiDelayedOperationProcessor, IProgressBarTracker progressBarTracker, IStandarImageSourceFactory standarImageSourceFactory, IWindowsExplorer windowsExplorer, IClipboard clipboard, ISynchronizationContextProvider synchronizationContextProvider, IOpenDocumentHelper openDocumentHelper, ITextDocumentTable textDocumentTable, IEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IBuildOutputParser buildOutputParser, IVsEditorAdaptersFactoryService adaptersFactoryService) { _control = control; _uiRequestProcessor = uiRequestProcessor; _progressBarTracker = progressBarTracker; _standarImageSourceFactory = standarImageSourceFactory; _windowsExplorer = windowsExplorer; _clipboard = clipboard; _synchronizationContextProvider = synchronizationContextProvider; _openDocumentHelper = openDocumentHelper; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _buildOutputParser = buildOutputParser; _adaptersFactoryService = adaptersFactoryService; _searchResultDocumentChangeTracker = new SearchResultsDocumentChangeTracker( uiDelayedOperationProcessor, textDocumentTable); _taskCancellation = new TaskCancellation(); // Ensure initial values are in sync. GlobalSettingsOnPropertyChanged(null, null); // Ensure changes to ViewModel are synchronized to global settings ViewModel.PropertyChanged += ViewModelOnPropertyChanged; // Ensure changes to global settings are synchronized to ViewModel _globalSettingsProvider.GlobalSettings.PropertyChanged += GlobalSettingsOnPropertyChanged; _eventBusCookie1 = _eventBus.RegisterHandler("TextDocument-Open", TextDocumentOpenHandler); _eventBusCookie2 = _eventBus.RegisterHandler("TextDocument-Closed", TextDocumentClosedHandler); _eventBusCookie3 = _eventBus.RegisterHandler("TextDocumentFile-FileActionOccurred", TextDocumentFileActionOccurred); }
public SourceExplorerHierarchyController( ISynchronizationContextProvider synchronizationContextProvider, IFileSystemTreeSource fileSystemTreeSource, IVisualStudioPackageProvider visualStudioPackageProvider, IVsGlyphService vsGlyphService, IImageSourceFactory imageSourceFactory, IOpenDocumentHelper openDocumentHelper, IFileSystem fileSystem, IClipboard clipboard, IWindowsExplorer windowsExplorer, IDispatchThreadServerRequestExecutor dispatchThreadServerRequestExecutor, ITypedRequestProcessProxy typedRequestProcessProxy, IDispatchThreadEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IDelayedOperationExecutor delayedOperationExecutor, IDispatchThread dispatchThread, IShowServerInfoService showServerInfoService) { _synchronizationContextProvider = synchronizationContextProvider; _fileSystemTreeSource = fileSystemTreeSource; _visualStudioPackageProvider = visualStudioPackageProvider; _imageSourceFactory = imageSourceFactory; _openDocumentHelper = openDocumentHelper; _fileSystem = fileSystem; _clipboard = clipboard; _windowsExplorer = windowsExplorer; _dispatchThreadServerRequestExecutor = dispatchThreadServerRequestExecutor; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _delayedOperationExecutor = delayedOperationExecutor; _showServerInfoService = showServerInfoService; _nodeTemplateFactory = new NodeTemplateFactory(vsGlyphService, imageSourceFactory); _nodeViewModelLoader = new NodeViewModelLoader(typedRequestProcessProxy); _hierarchy = new VsHierarchyAggregate( visualStudioPackageProvider.Package.ServiceProvider, vsGlyphService, _imageSourceFactory, _nodeTemplateFactory, _nodeViewModelLoader, dispatchThread); }
public OpenFileController( OpenFileControl control, IDispatchThreadServerRequestExecutor dispatchThreadServerRequestExecutor, IDispatchThreadDelayedOperationExecutor dispatchThreadDelayedOperationExecutor, IFileSystemTreeSource fileSystemTreeSource, ITypedRequestProcessProxy typedRequestProcessProxy, IStandarImageSourceFactory standarImageSourceFactory, IWindowsExplorer windowsExplorer, IClipboard clipboard, ISynchronizationContextProvider synchronizationContextProvider, IOpenDocumentHelper openDocumentHelper, ITextDocumentTable textDocumentTable, IDispatchThreadEventBus eventBus, IGlobalSettingsProvider globalSettingsProvider, IBuildOutputParser buildOutputParser, IVsEditorAdaptersFactoryService adaptersFactoryService, IShowServerInfoService showServerInfoService) { _control = control; _dispatchThreadServerRequestExecutor = dispatchThreadServerRequestExecutor; _fileSystemTreeSource = fileSystemTreeSource; _typedRequestProcessProxy = typedRequestProcessProxy; _standarImageSourceFactory = standarImageSourceFactory; _windowsExplorer = windowsExplorer; _clipboard = clipboard; _synchronizationContextProvider = synchronizationContextProvider; _openDocumentHelper = openDocumentHelper; _eventBus = eventBus; _globalSettingsProvider = globalSettingsProvider; _buildOutputParser = buildOutputParser; _adaptersFactoryService = adaptersFactoryService; _showServerInfoService = showServerInfoService; _taskCancellation = new TaskCancellation(); typedRequestProcessProxy.EventReceived += TypedRequestProcessProxy_OnEventReceived; dispatchThreadServerRequestExecutor.ProcessFatalError += DispatchThreadServerRequestExecutor_OnProcessFatalError; fileSystemTreeSource.TreeReceived += FileSystemTreeSource_OnTreeReceived; fileSystemTreeSource.ErrorReceived += FileSystemTreeSource_OnErrorReceived; }
public DispatchThreadEventBus(ISynchronizationContextProvider synchronizationContextProvider) { _synchronizationContextProvider = synchronizationContextProvider; }
public UpdateNotificationListener(IToolWindowAccessor toolWindowAccessor, ISynchronizationContextProvider synchronizationContextProvider) { _toolWindowAccessor = toolWindowAccessor; _synchronizationContextProvider = synchronizationContextProvider; }
public EventBus(ISynchronizationContextProvider synchronizationContextProvider) { _synchronizationContextProvider = synchronizationContextProvider; }