Ejemplo n.º 1
0
        private void RemoveBoundComment()
        {
            var removeBoundCommentList = new List <RemoveBoundCommentCommand>();

            foreach (SourceControl sourceControl in sources)
            {
                if (sourceControl.CurrentSource.Comment != null)
                {
                    var boundComment = flowAreaControl.GetAllBoundCommentControls().FirstOrDefault(c => c.CurrentComment == sourceControl.CurrentSource.Comment);
                    if (boundComment != null)
                    {
                        removeBoundCommentList.Add(new RemoveBoundCommentCommand(flowAreaControl, sourceControl, boundComment));
                    }
                }
            }
            removeBoundCommentCommands = removeBoundCommentList.ToArray();
            foreach (RemoveBoundCommentCommand command in removeBoundCommentCommands)
            {
                command.Execute();
            }
        }