private static void AddDropSlot(this IDraggable element) { var win = new DropContainerWindow(element.ObjectId); if (win.ShowDialog() != true) return; if (win.SelElement.Type == ObjectType.DropContainer) { var mainWin = DesignerMainWindow.GetInstance(); var drop = win.SelElement as DropContainer; mainWin.canMainCanvas.AddIObject(drop); } element.Draggable = true; element.HasDropContainer = true; element.DropContainerId = win.SelElement.ObjectId; ComAction act = new DropObject(element.ObjectId, element.DropContainerId, element.ObjectId); var hasActions = element as IInteractive; if (hasActions != null) hasActions.Actions.Add(act); }
private ComAction LoadDropObject(IEnumerable<XAttribute> attributes) { DropObject action = new DropObject(); action.Type = ActionType.dropObject; foreach (var attr in attributes) { switch (attr.Name.ToString()) { case "": break; default: break; } } return action; }