示例#1
0
 private void AddLayer(ImageEditorLayer layer, Panel parent)
 {
     if (layer != null && parent != null)
     {
         layer.Owner = this;
         layer.AttachUI(parent);
     }
 }
示例#2
0
 private void RemoveLayer(ImageEditorLayer layer, Panel parent)
 {
     if (layer != null && parent != null)
     {
         layer.DetachUI(parent);
         layer.Owner = null;
     }
 }
示例#3
0
        private void SelectLayer(ImageEditorTool tool)
        {
            this.RemoveLayer(this.toolLayer, this.imageHost);

            this.toolLayer = this.LayerSelector != null?this.LayerSelector.SelectLayer(tool) : null;

            this.AddLayer(this.toolLayer, this.imageHost);

            this.InvalidateArrange();
        }