Esempio n. 1
0
        private void Dejoin(MoveManager moveManager)
        {
            foreach (PositionableControl control in moveManager.Controls)
            {
                var scopeChild = control.CurrentPositionable as ScopeChild;
                if (scopeChild == null || scopeChild.Scope == null)
                {
                    continue;
                }

                var scopeControl = flowAreaControl.GetAllScopeControls().FirstOrDefault(c => c.CurrentScope == scopeChild.Scope);
                var command      = new RemoveSelectableFromScopeCommand(flowAreaControl, scopeControl, control);
                commandSet.AddCommand(command);
            }
        }
Esempio n. 2
0
        private void RemoveFromScope()
        {
            var removeFromScopeList = new List <RemoveSelectableFromScopeCommand>();

            foreach (SelectableControl control in controls)
            {
                var scopeControl = flowAreaControl.GetAllScopeControls().FirstOrDefault(s => s.Contains(control));
                if (scopeControl != null)
                {
                    removeFromScopeList.Add(new RemoveSelectableFromScopeCommand(flowAreaControl, scopeControl, control));
                }
            }
            removeFromScopeCommands = removeFromScopeList.ToArray();
            foreach (RemoveSelectableFromScopeCommand command in removeFromScopeCommands)
            {
                command.Execute();
            }
        }