示例#1
0
        protected override void UnExecuteCore()
        {
            RootControl root         = Root.MyRootControl;
            UsingBlock  usingSection = CodeUnit.UsingSection;

            foreach (UsingDirective b in this.list)
            {
                if (root.IsFocusInsideControl(b.MyControl))
                {
                    b.RemoveFocus();
                }
                usingSection.VMembers.Children.Delete(b);
            }

            if (usingSection.VMembers.Children.Count == 0)
            {
                if (root.IsFocusInsideControl(usingSection.MyControl))
                {
                    usingSection.RemoveFocus();
                }
                CodeUnit.Children.Delete((Block)usingSection);
            }
        }