private void BeamPortControl_Unloaded(object sender, RoutedEventArgs e) { BeamPortControl bp = sender as BeamPortControl; if (bp != null) { bp.Beam.VectorItemChanged -= new EventHandler(bp_VectorItemChanged); } }
private void BeamPortControl_Loaded(object sender, RoutedEventArgs e) { AdjustWallRatio(); BeamPortControl bp = sender as BeamPortControl; if (bp != null) { bp.Beam.VectorItemChanged += new EventHandler(bp_VectorItemChanged); } }