コード例 #1
0
        public CreationHistory(AnimatedState active)
        {
            synapse = active;

            int x = (int)(active.State.X);
            int y = (int)(active.State.Y);

            Location = new Point(x, y);
        }
コード例 #2
0
        public AnimatedSynapse(AnimatedNeuron pre, AnimatedNeuron post, Synapse syn)
        {
            this.pre  = pre;
            this.post = post;

            duplex  = null;
            vector  = new AnimatedVector(pre, post);
            synapse = new AnimatedState(syn, vector);

            pre.Output.Add(this);
            post.Input.Add(this);

            changePosition();
        }
コード例 #3
0
        protected override void mouseMove(object sender, MouseEventArgs e)
        {
            if (shift != null)
            {
                base.mouseMove(sender, e);
                return;
            }

            if (active != null)
            {
                if (active.active(e.Location))
                {
                    return;
                }

                if (mapHistory.ContainsKey(active))
                {
                    mapHistory[active].hide();
                }

                active = null;
                time   = 0;
                return;
            }

            foreach (CreatedSynapse synapse in synapses)
            {
                AnimatedSynapse s = synapse.Synapse;

                if (s.active(e.Location, false))
                {
                    active = s.getState(false);
                    return;
                }

                if (s.isDuplex() && s.active(e.Location, true))
                {
                    active = s.getState(true);
                    return;
                }
            }
        }
コード例 #4
0
 public void setDuplex(Synapse synapse)
 {
     duplex = new AnimatedState(synapse, vector, true);
     duplex.changePosition();
 }