public NeuronDisplay(Neuron neuron) { InitializeComponent(); linkedNeuron = neuron; if (neuron.GetType() == typeof(InputNeuron)) { this.BackColor = Color.Blue; } else if (neuron.GetType() == typeof(OutputNeuron)) { this.BackColor = Color.Orange; } Form1.GetInstance().displays.Add(linkedNeuron, this); }