public void UnlockLayer(CamViewLayer layer) { this.UnlockLayer(layer.GetType()); }
public void ActivateLayer(CamViewLayer layer) { if (this.activeLayers == null) this.activeLayers = new List<CamViewLayer>(); if (this.activeLayers.Contains(layer)) return; if (this.activeLayers.Any(l => l.GetType() == layer.GetType())) return; if (this.lockedLayers.Contains(layer.GetType())) return; this.activeLayers.Add(layer); layer.View = this; // No glControl yet? We're not initialized properly and this is the initial state. Enter the state later. if (this.glControl != null) { layer.OnActivateLayer(); this.glControl.Invalidate(); } }
public void DeactivateLayer(CamViewLayer layer) { if (this.activeLayers == null) this.activeLayers = new List<CamViewLayer>(); if (!this.activeLayers.Contains(layer)) return; if (this.lockedLayers.Contains(layer.GetType())) return; layer.OnDeactivateLayer(); layer.View = null; this.activeLayers.Remove(layer); this.glControl.Invalidate(); }
public LayerEntry(Type stateType, CamViewLayer layer) { this.layerType = stateType; this.layer = layer; }