public AnalyserViewModel(AnalyserProvider analyserProvider,
                                 MainBusyService busyService,
                                 IServiceFactory serviceFactory,
                                 IInterTabClient interTabClient,
                                 SettingsViewModel settingsViewModel,
                                 IEnumerable <IImportAssembly> importServices,
                                 IEnumerable <IExportAssembly> exportServices,
                                 AppLoggerService <AnalyserViewModel> logger,
                                 MainViewIdentifier mainViewIdentifier)
        {
            this.analyserProvider = analyserProvider;
            BusyService           = busyService;
            this.serviceFactory   = serviceFactory;
            this.interTabClient   = interTabClient;
            SettingsViewModel     = settingsViewModel;
            this.logger           = logger;
            this.exportServices   = exportServices.ToList();
            this.importServices   = importServices.ToList();

            Title      = $"Dependencies Viewer {typeof(AnalyserViewModel).Assembly.GetName().Version?.ToString(3)}";
            MainViewId = mainViewIdentifier.Id;

            SettingsCommand = new Command(() => IsSettingsOpen = true);
            CloseCommand    = new Command(() => Application.Current.Shutdown());
            AboutCommand    = new Command(async() => await OpenAboutAsync());

            OpenFileCommand   = new Command(async() => await BusyService.RunActionAsync(OpenFileAsync).ConfigureAwait(false), () => !BusyService.IsBusy);
            OnDragOverCommand = new Command <DragEventArgs>(OnDragOver);
            OnDropCommand     = new Command <DragEventArgs>(async(x) => await BusyService.RunActionAsync(async() => await OnDrop(x).ConfigureAwait(false)).ConfigureAwait(false), _ => !BusyService.IsBusy);

            OnDragEnterCommand = new Command <DragEventArgs>((x) => IsDragFile = true, CanDrag);
            OnDragLeaveCommand = new Command <DragEventArgs>((x) => IsDragFile = false, CanDrag);

            ExportCommands = GenerateExportCommand();
            ImportCommands = GenerateImportCommand();

            CloseResultCommand = new Command <AssemblyModel>(CloseResult);
        }
Пример #2
0
 public MismatchVersionViewModel(MainViewIdentifier mainViewIdentifier) : base(mainViewIdentifier)
 {
 }
Пример #3
0
 public OpenCommand(MainBusyService busyService, AnalyserViewModel analyserViewModel, MainViewIdentifier mainViewIdentifier)
 {
     this.busyService        = busyService;
     this.analyserViewModel  = analyserViewModel;
     this.mainViewIdentifier = mainViewIdentifier;
 }
Пример #4
0
 public CheckCommand(MainBusyService busyService, IServiceFactory serviceFactory, MainViewIdentifier mainViewIdentifier)
 {
     this.busyService        = busyService;
     this.serviceFactory     = serviceFactory;
     this.mainViewIdentifier = mainViewIdentifier;
 }
Пример #5
0
 public LoadingErrorViewModel(MainViewIdentifier mainViewIdentifier) : base(mainViewIdentifier)
 {
 }
 protected ErrorListViewModel(MainViewIdentifier mainViewIdentifier)
 {
     this.mainViewIdentifier = mainViewIdentifier;
 }