public MainViewModel(
     IFileReaderProvider fileReaderProvider,
     ICoverMatrixManager coverMatrixManager,
     IExcelWriter excelWriter,
     IValidateService validateService,
     IGroupingManager groupingManager,
     ITxtExporter txtExporter,
     IFileChecker fileChecker,
     IFileReader fileReader,
     IOpenFileDialog openFileDialog) : base(validateService)
 {
     Progress              = new ProgressBarModel();
     _txtExportert         = txtExporter;
     _fileChecker          = fileChecker;
     _fileReader           = fileReader;
     _openFileDialog       = openFileDialog;
     _fileReaderProvider   = fileReaderProvider;
     _coverMatrixManager   = coverMatrixManager;
     _excelWriter          = excelWriter;
     RunIndicatorVisible   = false;
     ExcelIndicatorVisible = false;
     CmdCancelComputeData  = new DelegateCommand(async() => await CancelComputeData(), () => CancelEnabled);
     CmdComputeData        = new DelegateCommand(async() => await ComputeData(), RunEnableCheck);
     CmdReadFile           = new DelegateCommand(ReadFile, () => RunButtonIndicatorVisible);
     CmdExportToExcel      = new DelegateCommand(async() => await ExportToExcel(), () => CanEnable);
     CmdExportTstToTxt     = new DelegateCommand(async() => await ExportToTxt(CoverResult.TestMatrix, "_Obiekty_testowe"), () => CanEnable);
     CmdExportTrnToTxt     = new DelegateCommand(async() => await ExportToTxt(CoverResult.DataMatrix, "_Obiekty_treningowe"), () => CanEnable);
     MethodsDelegates      = groupingManager.GetGroupingMethods();
     SelectedMethod        = MethodsDelegates.FirstOrDefault();
 }
Exemplo n.º 2
0
 public FileConverterController(
     IFileReaderProvider fileReaderProvider,
     IGroupingManager groupingManager,
     ITxtExporter txtExportert,
     ICoverMatrixManager coverMatrixManager,
     IExcelWriter excelWriter)
 {
     _fileReaderProvider = fileReaderProvider;
     _groupingManager    = groupingManager;
     _txtExportert       = txtExportert;
     _coverMatrixManager = coverMatrixManager;
     _excelWriter        = excelWriter;
 }