public ExperimentSelectionWindow(SimulationInstanceDirector simulationInstanceDirector) { InitializeComponent(); // Set the reference to the experiment directory _simulationInstanceDirector = simulationInstanceDirector; // Pull the list of experiment names to populate the configuration combo box _simulationInstanceDirector.RetrieveExperimentConfigurationNames( Properties.Settings.Default.ExperimentDbConnectionString); }
public MainWindow() { InitializeComponent(); // Instantiate the controllers _simInstanceDirector = new SimulationInstanceDirector(); // Configure experiment instance _simInstanceDirector.SetupNewExecution((int) SimulationCanvas.Height, (int) SimulationCanvas.Width, Brushes.LightSteelBlue, 2); // Restore relevant state of any previous sessions RestorePreviousSessionState(); // TODO: Technically, this stuff should only be called when maze genome file is referenced // Get maze boundaries/walls /*foreach (Line mazeWall in _mazeSimulationGraphicsController.GetMazeWalls()) { SimulationCanvas.Children.Add(mazeWall); } testRect = new Rectangle(); testRect.Width = 20; testRect.Height = 20; testRect.Fill = Brushes.Lime; SimulationCanvas.Children.Add(testRect); Canvas.SetLeft(testRect, 100); Canvas.GetLeft(testRect);*/ // TODO: This is the reference code for setting up the timer for simulation steps /* System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer(); timer.Tick += new EventHandler(dispatchTimer_Tick); timer.Interval = new TimeSpan(0, 0, 0, 0, 10); timer.Start(); */ }