예제 #1
0
 public void Remove(IAreaContents areaItem)
 {
     if (areaItem is UIElement uIElement)
     {
         if (ContentsCanvas.Children.Contains(uIElement))
         {
             ContentsCanvas.Children.Remove(uIElement);
             if (string.IsNullOrEmpty(areaItem.Group))
             {
                 Grouped[areaItem.Group].Remove(areaItem);
                 if (Grouped[areaItem.Group].Count == 0)
                 {
                     Grouped.Remove(areaItem.Group);
                 }
             }
             if (areaItem.Select)
             {
                 AreaItemSelectOperator.Remove(areaItem);
                 Selected.Remove(areaItem);
             }
         }
     }
 }
예제 #2
0
 public ContentsAreaBase(Canvas canvas)
 {
     ContentsCanvas         = canvas;
     AreaItemSelectOperator = new AreaItemSelectOperator(canvas);
     AreaItemOperator       = new AreaItemOperator(canvas);
 }