コード例 #1
0
 public void MakeLayerActive(PLayer l)
 {
     if (Layers.Contains(l))
     {
         ActiveLayerIndex = Layers.IndexOf(l);
     }
 }
コード例 #2
0
 public LayerManager(ContextManager manager)
 {
     _manager = manager;
     _temp    = manager.ActiveKernel.Get <PLayer>();
     _layers  = new List <PLayer>();
     AddNewLayer();
     IsDrawingTemp = true;
 }
コード例 #3
0
 public bool IsActive(PLayer l)
 {
     if (Layers.Contains(l))
     {
         if (Layers.IndexOf(l) == ActiveLayerIndex)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #4
0
 public void RemoveLayer(PLayer l)
 {
     if (_layers.Contains(l))
     {
         if (_layers.Count == 1)
         {
             AddNewLayer();
             _layers.Remove(l);
         }
         ChangeActiveLayerAutomatically();
     }
 }