protected virtual void OnActionPotentialEvent(EventArgs_ActionPotential e)
        {
            EventHandler <EventArgs_ActionPotential> handler = ActionPotentialEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        //ActionPotentialEvent code
        public void ReceiveActionPotentialEvent(object sender, EventArgs_ActionPotential e) //tested
        {
            Console.WriteLine("Neuron receives action potential event.");

            //add to secondary messenger for checking
            messenger.AddEvent(e.When);

            //check whether threshold is met for cell growth event
            CheckCellGrowthEventThreshold();
        }
        //Action Potential event code
        public void RaiseActionPotentialEvent(DateTime when)
        {
            //event
            Console.WriteLine("Cell Body raises action potential event.");
            EventArgs_ActionPotential args = new EventArgs_ActionPotential(when);

            OnActionPotentialEvent(args);

            //action within cell body
            PerformMembranePotentialSpike();

            //restore to resting state
            RestoreToRestingPotential();
            SetRestingPotentialState();
        }