private void BtnSolveClick(object sender, RoutedEventArgs e) { List<Solver.Colorizer> colors = GenerateColorPalette(); var slvr = new Solver(_charges, _surfaces, _imageHieght, _imageWidth); slvr.SolveIt(); SolverOutput solvedutput; if (chkBoxDrawLines.IsChecked != null && chkBoxDrawLines.IsChecked == true) { BitmapSource outputData = slvr.CustomeColorizerSolverWithLines(colors, colorPickerLineColors.SelectedColor); solvedutput = new SolverOutput(outputData, colors, _charges); } else { BitmapSource outputData = slvr.CustomeColorizerSolver(colors); solvedutput = new SolverOutput(outputData, colors, _charges); } solvedutput.lblMarker.Visibility = Visibility.Hidden; solvedutput.recMarker.Visibility = Visibility.Hidden; solvedutput.gridMarker.Visibility = Visibility.Hidden; solvedutput.Show(); Close(); }
private void BtnSolveClick(object sender, RoutedEventArgs e) { List <Solver.Colorizer> colors = GenerateColorPalette(); var slvr = new Solver(_charges, _surfaces, _imageHieght, _imageWidth); slvr.SolveIt(); SolverOutput solvedutput; if (chkBoxDrawLines.IsChecked != null && chkBoxDrawLines.IsChecked == true) { BitmapSource outputData = slvr.CustomeColorizerSolverWithLines(colors, colorPickerLineColors.SelectedColor); solvedutput = new SolverOutput(outputData, colors, _charges); } else { BitmapSource outputData = slvr.CustomeColorizerSolver(colors); solvedutput = new SolverOutput(outputData, colors, _charges); } solvedutput.lblMarker.Visibility = Visibility.Hidden; solvedutput.recMarker.Visibility = Visibility.Hidden; solvedutput.gridMarker.Visibility = Visibility.Hidden; solvedutput.Show(); Close(); }