//event test public void SignalActionPotentialEvent( ) { Console.WriteLine("action potential triggered!"); ActionPotentialEventArgs args = new ActionPotentialEventArgs(); OnActionPotentialEvent(args); }
protected virtual void OnActionPotentialEvent(ActionPotentialEventArgs e) { EventHandler <ActionPotentialEventArgs> handler = ActionPotentialEvent; if (handler != null) { handler(this, e); } }
//test for action potential event public void ReceiveActionPotentialEvent(object sender, ActionPotentialEventArgs e) { Console.WriteLine("received action potential event"); //add to secondary messenger for checking secondary.AddEvent(DateTime.Now); if (secondary.GrowthStateAchieved(DateTime.Now)) { state = CellGrowthState.Growth; this.SignalCellGrowthEvent(); //add new dendrite(s) } }