Example #1
0
 private void sceneLayoutStopped(object sender, EventArgs e)
 {
     this.layoutStartStopBTN.Text = "Start";
     if (this.bPendingGraphCreation)
     {
         IGraphCreator gc = this.graphCreatorCMB.SelectedItem as IGraphCreator;
         if (gc != null)
         {
             this.TurnOffShortPath();
             this.mScene.ClearGraph();
             if (this.graphStyleResetOnCreateCHK.Checked)
             {
                 this.nodeRadNUM.Value = (decimal)gc.DefaultNodeRad;
                 this.edgeAngNUM.Value = (decimal)gc.DefaultEdgeAng;
                 gc.CreateGraph(this.mScene,
                                gc.DefaultNodeRad, gc.DefaultEdgeAng);
             }
             else
             {
                 gc.CreateGraph(this.mScene,
                                (float)this.nodeRadNUM.Value,
                                (float)this.edgeAngNUM.Value);
             }
             this.RefreshShortPathAlgs();
             this.graphCreatorCMB.Enabled      = true;
             this.shortPathAlgCMB.Enabled      = true;
             this.shortPathDirectedCHK.Enabled = true;
             this.shortPathReversedCHK.Enabled = true;
         }
         this.bPendingGraphCreation = false;
     }
 }
Example #2
0
        public void SetUp()
        {
            routeRepository        = Substitute.For <IRouteRepository>();
            graphCreator           = Substitute.For <IGraphCreator>();
            dijkstraImplementation = Substitute.For <IDijkstraImplementation>();

            dijkstraLowestPriceFinder = new DijkstraLowestPriceFinder(routeRepository, graphCreator, dijkstraImplementation);
        }
 public MainWindow()
 {
     InitializeComponent();
     _contentHandler = new TextContentHandler();
     _graphCreator = new GraphCreator();
     _huffmannEncodedMap = new ObservableCollection<DisplayData>();
     this.DataContext = _huffmannEncodedMap;
 }
Example #4
0
 public MainWindow()
 {
     InitializeComponent();
     _contentHandler     = new TextContentHandler();
     _graphCreator       = new GraphCreator();
     _huffmannEncodedMap = new ObservableCollection <DisplayData>();
     this.DataContext    = _huffmannEncodedMap;
 }
Example #5
0
 public GraphSolverIntegrationTests()
 {
     _graphCreator = new GraphCreator();
     _sut          = new GraphSolver(_graphCreator);
 }
Example #6
0
 public Book(string filePath, IGraphCreator graphCreator)
     : this(filePath, graphCreator, Path.GetFileName(filePath))
 {
 }
Example #7
0
 public Book(string filePath, IGraphCreator graphCreator, string name)
     : this(name, graphCreator.CreateGraphFromFile(filePath))
 {
     m_GraphCreator = graphCreator;
 }
Example #8
0
 internal GraphSolver(IGraphCreator graphCreator)
 {
     _graphCreator = graphCreator;
 }
Example #9
0
 public GraphCreatorTests()
 {
     _sut = new GraphCreator();
 }
 public DijkstraLowestPriceFinder(IRouteRepository routeRepository, IGraphCreator graphCreator, IDijkstraImplementation dijkstraImplementation)
 {
     this.routeRepository        = routeRepository;
     this.graphCreator           = graphCreator;
     this.dijkstraImplementation = dijkstraImplementation;
 }
Example #11
0
 public Book(string filePath, IGraphCreator graphCreator)
     : this(filePath, graphCreator, Path.GetFileName(filePath))
 {
 }
Example #12
0
 public Book(string filePath, IGraphCreator graphCreator, string name)
     : this(name, graphCreator.CreateGraphFromFile(filePath))
 {
     m_GraphCreator = graphCreator;
 }