Exemplo n.º 1
0
 public override void Copy()
 {
     if (SelectedTopics != null && SelectedTopics.Length > 0)
     {
         var topics = SelectedTopics.OrderBy(t => t.Level).ToArray();
         Copy(topics, true);
     }
     else if (SelectedObject is Widget)// && ((Widget)SelectedObject).CanCopy)
     {
         var widgets = SelectedObjects.Where(o => o is Widget).ToArray();
         Copy(widgets, false);
     }
 }
Exemplo n.º 2
0
 public override void Cut()
 {
     if (SelectedTopics != null && SelectedTopics.Length > 0)
     {
         var topics  = SelectedTopics.OrderBy(t => t.Level).ToArray();
         var command = new CutCommand(topics);
         ExecuteCommand(command);
     }
     else if (SelectedObject is Widget)
     {
         var widgets = SelectedObjects.Where(o => o is Widget).ToArray();
         var command = new CutCommand(widgets);
         ExecuteCommand(command);
     }
 }