public virtual void OnExit(AgentEventArgs<Agent> aea) { var handler = Exit; if (handler != null) { handler(this, aea); } }
public void DeathEvent(object source, AgentEventArgs args) { // Brain target_brain; foreach (Phenotype brain in brains.Keys) { if (brain.Id == args.id) { // target_brain = brain; brains[brain] = args.score; break; } } counter++; if (counter == brains.Count) { popManager.evaluateGeneration(brains); // SpawnEntities(); } // brains[target_brain] = args.score; }
private void Apply_Click(object sender, RoutedEventArgs e) { IPAddress newServerIp = null; try { newServerIp = IPAddress.Parse(ServerText.Text.Trim()); } catch (Exception) { ServerText.Background = Brushes.Red; } int newPort = 0; try { newPort = Int32.Parse(PortText.Text.Trim()); if (newPort < 1024 || newPort > 65535) { newPort = 0; } } catch (Exception) { PortText.Background = Brushes.Red; } if (newServerIp != null && newPort != 0) { IPEndPoint ipEP = new IPEndPoint(newServerIp, newPort); var args = new AgentEventArgs(ipEP); _applySettings.Invoke(sender, args); WindowState = WindowState.Minimized; ShowInTaskbar = false; } }
public void Agent_OnSupervisorMessageCallback(object sender, AgentEventArgs e) { //SignalRNotificationBlaster.AgentOnSupervisorMessageBlast(e); }
public void Agent_OnVoiceStateChangeCallback(object sender, AgentEventArgs e) { //SignalRNotificationBlaster.AgentOnVoiceStateChangeBlast(e); }
public void Agent_OnWaitCallback(object sender, AgentEventArgs e) { //SignalRNotificationBlaster.AgentOnWaitBlast(e); }