private void addControlFor(WeightedTenorPoint def_) { var contrl = new CMTStructurePointEditor(); flowLayoutPanel1.Controls.Add(contrl); subscribe(contrl); contrl.Bind(def_); sortOutPositioning(); }
private void remove(CMTStructurePointEditor editor_) { subscribe(editor_, false); flowLayoutPanel1.Controls.Remove(editor_); m_points.Remove(editor_.Definition); sortOutPositioning(); }
private void subscribe(CMTStructurePointEditor editor_, bool do_=true) { if (editor_ == null) return; editor_.DeleteMe -= handleDeleteMe; if (!do_) return; editor_.DeleteMe += handleDeleteMe; }