Example #1
0
        private void Init()
        {
            this.UserDeletable       = true;
            this.Draggable           = true;
            this.MyControl.Focusable = true;
            this.MyListControl.Box.Margins.SetAll(1);

            const int x  = ShapeStyle.DefaultFontSize;
            const int x2 = ShapeStyle.DefaultFontSize / 2;

            TypeBlock = new TypeNameBlock();
            TypeBlock.MyTextBox.MinWidth = x;
            TypeBlock.MyTextBox.Box.Padding.SetLeftAndRight(x, x2);
            TypeBlock.MyTextBox.Layout();
            TypeBlock.MyTextBox.KeyPress += TypeBlock_KeyPress;
            TypeBlock.MyTextBox.CharFilters.Add(CommonCharFilters.AcceptNoWhitespace);

            NameBlock = new TypeNameBlock();
            NameBlock.MyTextBox.MinWidth = x;
            NameBlock.MyTextBox.Box.Padding.SetLeftAndRight(x2, 0);
            NameBlock.MyTextBox.Layout();
            NameBlock.MyTextBox.KeyPress += NameBlock_KeyPress;
            NameBlock.MyTextBox.CharFilters.Add(CommonCharFilters.AcceptNoWhitespace);

            this.Children.Add(Modifiers);
            this.Children.Add(new KeywordLabel("delegate"));
            this.Children.Add(TypeBlock);
            this.Children.Add(NameBlock);
            this.Children.Add(Parameters);
        }
Example #2
0
        public ClassOrStructBlock(string keyword)
            : base()
        {
            NameBlock = new TypeNameBlock(16);

            //HMembers.Add(new PictureBlock(CSharpPictureLibrary.Instance.TypeClass));
            InitModifiers();
            HMembers.Add(Modifiers);
            HMembers.Add(new KeywordLabel(keyword));
            HMembers.Add(NameBlock);
            VMembers.Children.Add(new EmptyClassMember());

            MyUniversalControl.CanOffsetCurlies = true;
        }
Example #3
0
        public InterfaceBlock()
            : base()
        {
            NameBlock = new TypeNameBlock(2 * ShapeStyle.DefaultFontSize);
            MyUniversalControl.CanOffsetCurlies = true;
            MyUniversalControl.OpenCurlyHasNegativeLowerMargin = false;

            InitModifiers();
            HMembers.Add(Modifiers);

            HMembers.Add(new KeywordLabel("interface"));
            HMembers.Add(NameBlock);
            VMembers.Children.Add(new InterfaceMemberDeclarationBlock());
        }
Example #4
0
        public InterfaceBlock()
            : base()
        {
            NameBlock = new TypeNameBlock(2 * ShapeStyle.DefaultFontSize);
            MyUniversalControl.CanOffsetCurlies = true;
            MyUniversalControl.OpenCurlyHasNegativeLowerMargin = false;

            InitModifiers();
            HMembers.Add(Modifiers);

            HMembers.Add(new KeywordLabel("interface"));
            HMembers.Add(NameBlock);
            VMembers.Children.Add(new InterfaceMemberDeclarationBlock());
        }
Example #5
0
        public ClassOrStructBlock(string keyword)
            : base()
        {
            NameBlock = new TypeNameBlock(16);

            //HMembers.Add(new PictureBlock(CSharpPictureLibrary.Instance.TypeClass));
            InitModifiers();
            HMembers.Add(Modifiers);
            HMembers.Add(new KeywordLabel(keyword));
            HMembers.Add(NameBlock);
            VMembers.Children.Add(new EmptyClassMember());

            MyUniversalControl.CanOffsetCurlies = true;
        }
Example #6
0
        private void Init()
        {
            this.UserDeletable = true;
            this.Draggable = true;
            this.MyControl.Focusable = true;
            this.MyListControl.Box.Margins.SetAll(1);

            const int x = ShapeStyle.DefaultFontSize;
            const int x2 = ShapeStyle.DefaultFontSize / 2;

            TypeBlock = new TypeNameBlock();
            TypeBlock.MyTextBox.MinWidth = x;
            TypeBlock.MyTextBox.Box.Padding.SetLeftAndRight(x, x2);
            TypeBlock.MyTextBox.Layout();
            TypeBlock.MyTextBox.KeyPress += TypeBlock_KeyPress;
            TypeBlock.MyTextBox.CharFilters.Add(CommonCharFilters.AcceptNoWhitespace);

            NameBlock = new TypeNameBlock();
            NameBlock.MyTextBox.MinWidth = x;
            NameBlock.MyTextBox.Box.Padding.SetLeftAndRight(x2, 0);
            NameBlock.MyTextBox.Layout();
            NameBlock.MyTextBox.KeyPress += NameBlock_KeyPress;
            NameBlock.MyTextBox.CharFilters.Add(CommonCharFilters.AcceptNoWhitespace);

            this.Children.Add(Modifiers);
            this.Children.Add(new KeywordLabel("delegate"));
            this.Children.Add(TypeBlock);
            this.Children.Add(NameBlock);
            this.Children.Add(Parameters);
        }