public Render(Canvas canvas, NodeCollectionStorage<FullConnectedGraph> nodeCollectionStorage, SolversHolder solversHolder)
 {
     _canvas = canvas;
     _nodeCollectionStorage = nodeCollectionStorage;
     _nodeRender = RenderFactory.GetNodeRender(nodeCollectionStorage, canvas);
     _linkRender = RenderFactory.GetLinkRender(nodeCollectionStorage, canvas);
     _routeRender = RenderFactory.GetRouteRender(canvas);
 }
 public static ResultRender GetResultRender(Canvas canvas, SolversHolder solversHolder, 
     NodeCollectionStorage<FullConnectedGraph> storage)
 {
     var ellipseCreator = new EllipseCreator(Brushes.Black, Brushes.SlateGray, 4, 0.5);
     var minPointEllipseCreator = new EllipseCreator(Brushes.Red, Brushes.Transparent, 6, 0.7);
     var polyLinesCreator = new PolylineCreator(Brushes.Blue, 1, 1);
     var step = 0.005;
     var scalarizator = new WeightedSumScalarizator<Route>(step);
     const double border = 5;
     return new ResultRender(canvas, ellipseCreator, minPointEllipseCreator, polyLinesCreator, border, storage, scalarizator);
 }
 public ResultsWindow(SolversHolder solversHolder, NodeCollectionStorage<FullConnectedGraph> storage )
 {
     InitializeComponent();
     Loaded += delegate
     {
         var t = ResultsCanvas.Width;
     };
     Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
     Arrange(new Rect(0, 0, Width, Height));
     _render = RenderFactory.GetResultRender(ResultsCanvas, solversHolder, storage);
     //solversHolder.Solved += SolvedHandler;
 }
 public MainWindow()
 {
     InitializeComponent();
     var bruteForceSolverBuilder = new BruteForceSolverBuilder();
     var geneticSolverBuilder = new GeneticSolverBuilder();
     _optionsWindow = new OptionsWindow(geneticSolverBuilder, bruteForceSolverBuilder);
     _solversHolder = new SolversHolder(_nodeCollectionStorage,geneticSolverBuilder,bruteForceSolverBuilder,_optionsWindow);
     _resultsWindow = new ResultsWindow(_solversHolder, _nodeCollectionStorage);
     _nodeCountWindow = new ConfirmNodeCountWindow();
     _nodeCountWindow.ConfirmEvent += NodeCountWindowConfirmed;
     _render = new Render(MainCanvas, _nodeCollectionStorage, _solversHolder);
 }