private void AddSimulation(StartSimulation m) { Context.GetLogger().Info($"Coordinator - Starting simulation of {m.ProjectId}"); _queue.Tell(new AddNewSimulation() { OriginalSender = Sender, ProjId = m.ProjectId, Technology = m.Technology }); }
/// <summary> /// Handle StartSimulation message. /// </summary> /// <param name="msg">The message to handle.</param> private void Handle(StartSimulation msg) { // initialize state _numberOfCars = msg.NumberOfCars; _carsSimulated = 0; _rnd = new Random(); // start simulationloop SimulatePassingCar simulatePassingCar = new SimulatePassingCar(GenerateRandomLicenseNumber()); Context.System.Scheduler.ScheduleTellOnce( _rnd.Next(_minEntryDelayInMS, _maxEntryDelayInMS), Self, simulatePassingCar, Self); }
//Start simulation button private void button2_Click(object sender, EventArgs e) { this.button3.Enabled = true; this.button2.Enabled = false; this.toolStripStatusLabel1.Text = $"time: {0}"; pictureBox1.Visible = false; radioButton1.Checked = false; NumberOfPassengersInElevator = 0; label1.Text = "Rides = 0"; label2.Text = "Iddle rides = 0"; label3.Text = "Transported mass = 0"; label4.Text = $"Passengers count = {NumberOfCreatedPeople}"; StartSimulation?.Invoke(); }
public override void OnEvent(StartSimulation evnt) { PlacementReferences.Scanning = false; }
private void StartButton_Click(object sender, EventArgs e) { StartSimulation?.Invoke(); }
public SimulationSetupScreen(StartSimulation starter) { InitializeComponent(); commence = starter; }
private void Skills_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { StartSimulation.RaiseCanExecuteChanged(); DeleteSkill.RaiseCanExecuteChanged(); }