Exemplo n.º 1
0
        public bool active(Point location, bool duplex)
        {
            if (duplex)
            {
                return(this.duplex.active(location));
            }

            return(synapse.active(location));
        }
Exemplo n.º 2
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;
                }
            }
        }