Ejemplo n.º 1
0
        public GenericBindingComboBox(string text) : base()
        {
            ApplicationSettings.SkinControl(this);

            _value        = new PropertyBinding <T>();
            DropDownStyle = ComboBoxStyle.DropDownList;

            SelectedIndexChanged += changeItem;
        }
Ejemplo n.º 2
0
        public SBAnimationBar()
        {
            ApplicationSettings.SkinControl(this);

            animationTrack               = new TrackBar();
            animationTrack.Dock          = DockStyle.Top;
            animationTrack.ValueChanged += FrameChanged;

            playButton        = new SBButton(PlayText);
            playButton.Dock   = DockStyle.Top;
            playButton.Click += PlayPause;

            Controls.Add(playButton);
            Controls.Add(animationTrack);

            Frame = new PropertyBinding <float>();
        }
Ejemplo n.º 3
0
        public GenericBindingVector4Editor(string Name = "", bool isColor = false) : base()
        {
            _value = new PropertyBinding <Vector4>();

            IsColor = isColor;

            MaximumSize = new System.Drawing.Size(int.MaxValue, 32);

            NameLabel      = new Label();
            NameLabel.Text = Name;

            Controls.Add(NameLabel, 0, 0);

            if (isColor)
            {
                ColorSelect        = new SBButton("");
                ColorSelect.Click += SelectColor;
                Controls.Add(ColorSelect);
                Controls.Add(ColorSelect, 1, 0);
            }
            else
            {
                XEdit = new GenericBindingTextBox <float>();
                YEdit = new GenericBindingTextBox <float>();
                ZEdit = new GenericBindingTextBox <float>();
                WEdit = new GenericBindingTextBox <float>();
                System.Drawing.Size MaxSize = new System.Drawing.Size(64, 32);
                XEdit.MaximumSize = MaxSize;
                YEdit.MaximumSize = MaxSize;
                ZEdit.MaximumSize = MaxSize;
                WEdit.MaximumSize = MaxSize;
                Controls.Add(XEdit, 1, 0);
                Controls.Add(YEdit, 2, 0);
                Controls.Add(ZEdit, 3, 0);
                Controls.Add(WEdit, 4, 0);
            }

            RowStyles.Add(new RowStyle()
            {
                SizeType = SizeType.AutoSize
            });
        }