public CreationHistory(AnimatedState active) { synapse = active; int x = (int)(active.State.X); int y = (int)(active.State.Y); Location = new Point(x, y); }
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(); }
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; } } }
public void setDuplex(Synapse synapse) { duplex = new AnimatedState(synapse, vector, true); duplex.changePosition(); }