private void StartTesting() { var testingModel = Prepare(); var annService = new AnnTestingService(testingModel, TestingProgressChanged); annService.Start(); }
public string this[string columnName] { get { string error = null; switch (columnName) { case nameof(NeuralNetworkPath): { if (string.IsNullOrEmpty(_neuralNetworkPath)) { error = string.Format(Properties.Resources.FieldIsRequiredValidationMessage, Properties.Resources.NeuralNetworkPathCaption); break; } if (!File.Exists(_neuralNetworkPath)) { error = Properties.Resources.PathNoExistValidationMessage; break; } var nnColumns = AnnTestingService.GetNeuralNetworkInputVariables(NeuralNetworkPath); if (!nnColumns.All(x => UploadFileViewModel.Columns.Contains(x))) { error = Properties.Resources.NotAllNNVariablesAreMappedValidationMessage; } break; } case nameof(UploadFileViewModel): { if (string.IsNullOrEmpty(UploadFileViewModel.SelectedSheet)) { error = string.Format(Properties.Resources.FieldIsRequiredValidationMessage, Properties.Resources.SheetCaption); } if (string.IsNullOrEmpty(UploadFileViewModel.SelectedIdColumn)) { error = string.Format(Properties.Resources.FieldIsRequiredValidationMessage, Properties.Resources.IdColumnCaption); } if (string.IsNullOrEmpty(UploadFileViewModel.FilePath)) { error = string.Format(Properties.Resources.FieldIsRequiredValidationMessage, Properties.Resources.FileFieldCaption); } break; } case nameof(SelectOutputColumnsViewModel): { if (SelectOutputColumnsViewModel.UnselectedItems.Any() && !SelectOutputColumnsViewModel.SelectedItems.Any()) { error = string.Format(Properties.Resources.NoItemSelectedValidationMessage, Properties.Resources.OutputColumnsCaption); } break; } } if (error != null) { if (!_errorList.ContainsKey(columnName)) { _errorList.Add(columnName, error); } else { _errorList[columnName] = error; } } if (error == null && _errorList.ContainsKey(columnName)) { _errorList.Remove(columnName); } OnPropertyChanged(nameof(Error)); ((CommandHandler)StartTestingCommand).RaiseCanExecuteChanged(); return(error); } }