Пример #1
0
        protected virtual void OnOpinionChanged(OpinionEventArgs e)
        {
            EventHandler <OpinionEventArgs> handler = OpinionChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        protected virtual void OnOpinionChanged(OpinionEventArgs e)
        {
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler <OpinionEventArgs> handler = OpinionChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #3
0
        //現在の考えが意見を形成したら。
        private void CurrentThought_OpinionChanged(object sender, OpinionEventArgs e)
        {
            if (thoughts.Count < 2 || (thoughts.Count >= 2 && Opinion.Value != e.Opinion))
            {
                //自らのイベントを発火
                OnOpinionChanged(e);
            }


            //順番大切!
            AddThought();
        }
Пример #4
0
        void thought_OpinionChanged(object sender, OpinionEventArgs e)
        {
            //この段階では、前の段階のOpinionがある
            //thoughtStack.CurrentThought.Opinion

            NotifyOthers(e.Opinion);

            //自信のイベントも連鎖して発火
            OnOpinionChanged(e);


            //コノ後、新しい意見が積み重なってしまうので注意。
            //気を配らなきゃいけないのめんどくさいので設計ヨクない
        }
Пример #5
0
 public void thought_OpinionChanged(object sender, OpinionEventArgs e)
 {
     NotifyOthers(e.Opinion);
     OnOpinionChanged(e);
 }
Пример #6
0
 void AgentOpinionChanged(object sender, OpinionEventArgs e)
 {
     //Console.WriteLine("opinion " + e.Opinion);
 }
Пример #7
0
 void algorithm_OpinionChanged(object sender, OpinionEventArgs e)
 {
     OnOpinionChanged(e);
 }
Пример #8
0
        //現在の考えが意見を形成したら。
        private void CurrentThought_OpinionChanged(object sender, OpinionEventArgs e)
        {
            if (thoughts.Count < 2 || ( thoughts.Count >= 2 && Opinion.Value != e.Opinion) )
            {
                //自らのイベントを発火
                OnOpinionChanged(e);
            }

            //順番大切!
            AddThought();
        }
Пример #9
0
        protected virtual void OnOpinionChanged(OpinionEventArgs e)
        {
            EventHandler<OpinionEventArgs> handler = OpinionChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #10
0
        protected virtual void OnOpinionChanged(OpinionEventArgs e)
        {
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler<OpinionEventArgs> handler = OpinionChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #11
0
 public void thought_OpinionChanged(object sender, OpinionEventArgs e)
 {
     NotifyOthers(e.Opinion);
     OnOpinionChanged(e);
 }
Пример #12
0
        void thought_OpinionChanged(object sender, OpinionEventArgs e)
        {
            //この段階では、前の段階のOpinionがある
            //thoughtStack.CurrentThought.Opinion

            NotifyOthers( e.Opinion );

            //自信のイベントも連鎖して発火
            OnOpinionChanged(e);

            //コノ後、新しい意見が積み重なってしまうので注意。
            //気を配らなきゃいけないのめんどくさいので設計ヨクない
        }