private void ResetViewsLayout() { foreach (DockContent view in m_views) { view.Hide(); view.DockPanel = null; } ConsoleView.Show(dockPanel, DockState.DockBottom); ConsoleView.DockPanel.DockBottomPortion = 0.3; NodePropertyView.Show(dockPanel, DockState.DockRight); NodePropertyView.DockPanel.DockRightPortion = 0.15; TaskView.Show(dockPanel, DockState.DockLeft); TaskView.DockPanel.DockLeftPortion = 0.15; MemoryBlocksView.Show(dockPanel, DockState.Float); MemoryBlocksView.DockHandler.FloatPane.DockTo(dockPanel, DockStyle.Right); TaskPropertyView.Show(dockPanel, DockState.Float); TaskPropertyView.DockHandler.FloatPane.DockTo(dockPanel, DockStyle.Left); ValidationView.Show(dockPanel, DockState.Float); ValidationView.DockHandler.FloatPane.DockTo(dockPanel, DockStyle.Bottom); }
private void StartSimulation(bool oneStepOnly) { if (SimulationHandler.State == MySimulationHandler.SimulationState.STOPPED) { MyLog.INFO.WriteLine("--------------"); bool anyOutputChanged = UpdateMemoryModel(); MyValidator validator = ValidationView.Validator; validator.Simulation = SimulationHandler.Simulation; validator.ClearValidation(); Project.World.ValidateWorld(validator); Project.Network.Validate(validator); validator.AssertError(!anyOutputChanged, Project.Network, "Possible infinite loop in memory block sizes."); ValidationView.UpdateListView(); validator.Simulation = null; ResetObservers(); if (validator.ValidationSucessfull) { try { SimulationHandler.StartSimulation(oneStepOnly); } catch (Exception e) { MyLog.ERROR.WriteLine("Simulation cannot be started! Exception occured: " + e.Message); } } else { MyLog.ERROR.WriteLine("Simulation cannot be started! Validation failed."); OpenFloatingOrActivate(ValidationView); } } else { try { SimulationHandler.StartSimulation(oneStepOnly); } catch (Exception e) { MyLog.ERROR.WriteLine("Simulation cannot be started! Exception occured: " + e.Message); } } }