Пример #1
0
        public ShellViewModel(IMessageBoxManager messageBoxManager, IWindowManager windowManager, IFileDialogManager fileDialogManager)
        {
            _fileDialogManager = fileDialogManager ?? new FileDialogManager();
            _windowManager     = windowManager ?? new WindowManager();
            _messageBoxManager = messageBoxManager ?? new MessageBoxManager();

            _tableSelectionObserver = Observable.FromEventPattern <PropertyChangedEventArgs>(this,
                                                                                             "PropertyChanged")
                                      .Where(x => x.EventArgs.PropertyName == "TableSelection")
                                      .Throttle(TimeSpan.FromMilliseconds(750))
                                      .Subscribe(x => Generate());
        }
Пример #2
0
        public ShellViewModel(IMessageBoxManager messageBoxManager, IWindowManager windowManager, IFileDialogManager fileDialogManager)
        {
            _fileDialogManager = fileDialogManager ?? new FileDialogManager();
            _windowManager = windowManager ?? new WindowManager();
            _messageBoxManager = messageBoxManager ?? new MessageBoxManager();

            _tableSelectionObserver = Observable.FromEventPattern<PropertyChangedEventArgs>(this,
                                                                                            "PropertyChanged")
                    .Where(x => x.EventArgs.PropertyName == "TableSelection")
                    .Throttle(TimeSpan.FromMilliseconds(750))
                    .Subscribe(x => Generate());
        }
Пример #3
0
 public PackAndGo(
     IFileDialogManager fileDialogManager,
     IFileService fileService,
     IModelExporter modelExporter,
     IGtfCopier gtfCopier,
     IBatchCopier batchCopier,
     IZipper zipper,
     IMonitorCopier monitorCopier,
     ITaskSchedulerProvider schedulerProvider
     )
 {
     _fileDialogManager = fileDialogManager;
     _fileService       = fileService;
     _modelExporter     = modelExporter;
     _gtfCopier         = gtfCopier;
     _batchCopier       = batchCopier;
     _zipper            = zipper;
     _monitorCopier     = monitorCopier;
     _schedulerProvider = schedulerProvider;
 }
Пример #4
0
        public void SetUp()
        {
            _projectContext = A.Fake <IProjectContext>();

            _workbenchViewModel = A.Fake <IWorkbenchViewModel>();
            A.CallTo(() => _workbenchViewModel.ProjectContext).Returns(_projectContext);

            _fileDialogManager = A.Fake <IFileDialogManager>();
            _modelExporter     = A.Fake <IModelExporter>();
            _gtfCopier         = A.Fake <IGtfCopier>();
            _batchCopier       = A.Fake <IBatchCopier>();
            _zipper            = A.Fake <IZipper>();
            _monitorCopier     = A.Fake <IMonitorCopier>();
            var fileService = A.Fake <IFileService>();

            _schedulerProvider = A.Fake <ITaskSchedulerProvider>();
            A.CallTo(
                () => _schedulerProvider.PoolScheduler.InvokeAsync(
                    A <Action> ._,
                    A <CancellationToken> ._,
                    A <ExecutionMode> ._)).Invokes(oc => oc.GetArgument <Action>(0)());

            _packAndGo = new PackAndGo(_fileDialogManager, fileService, _modelExporter, _gtfCopier, _batchCopier, _zipper, _monitorCopier, _schedulerProvider);
        }
Пример #5
0
 public JsonFileReader(IFileDialogManager fileDialogManager, IFileService fileService, IWindowManager windowManager)
 {
     _fileDialogManager = fileDialogManager;
     _fileService       = fileService;
     _windowManager     = windowManager;
 }