public void Lyr_Deleted(object sender, DanoEventArgs e) { #if PRISCILLA Debug.Assert(e.DanoParameters.Count == 1); string LayerName = (string)e.DanoParameters[0]; if (MnWindow.CurrentProject != null) { if (LayerName == "Background") { // pending for when we move error handling to UL5 Error.Throw("Warning!", "You cannot delete the background layer!", ErrorSeverity.Warning, 227); return; } #if v21_LayerBinding Layers.LayerNames.Remove(LayerName); #else Layers.PriscillaUI_Layers_LayerListView.Items.Remove(LayerName); #endif MnWindow.CurrentProject.SelectedBasin.RemoveLayerWithName(LayerName); } #else LayerManager LH = GlobalState.GetLCH(); #endif }