Inheritance: System.Windows.Forms.Control
Ejemplo n.º 1
0
        public FreeLinePropertyControl()
        {
            AddLabel("Width");

            numControl               = AddNumControl(1, 5, 1, 40);
            numControl.Value         = FreeLine.penSizeGlobal;
            numControl.ValueChanged += numControl_ValueChanged;

            AddLabel("Color");

            colorControl               = AddColorControl();
            colorControl.Color         = FreeLine.penColorGlobal;
            colorControl.ColorChanged += colorControl_ValueChanged;

            AddLabel("Style");

            lineDD = new TpComboBoxLine();
            AddControl(lineDD, 100);


            lineDD.LineStyles = TPLineStyle.Solid | TPLineStyle.Dot | TPLineStyle.Dash | TPLineStyle.DashDot |
                                TPLineStyle.DashDotDot;

            lineDD.SelectItem(FreeLine.penStyleGlobal);

            lineDD.SelectedIndexChanged += lineDD_ValueChanged;
        }
Ejemplo n.º 2
0
        public LinePropertyControl()
        {
            AddLabel("Width");

            numControl               = AddNumControl(1, 10, 1, 40);
            numControl.Value         = Line.penSizeGlobal;
            numControl.ValueChanged += numControl_ValueChanged;

            AddLabel("Color");

            colorControl               = AddColorControl();
            colorControl.Color         = Line.penColorGlobal;
            colorControl.ColorChanged += colorControl_ValueChanged;

            AddLabel("Style");


            AddControl(lineDD, 150);

            lineDD.LineStyles = TPLineStyle.Arrow | TPLineStyle.Solid | TPLineStyle.Dot | TPLineStyle.Dash | TPLineStyle.DashDot |
                                TPLineStyle.DashDotDot;

            lineDD.SelectItem(Line.penStyleGlobal);
            lineDD.SelectedIndexChanged += lineDD_ValueChanged;
        }
		public TpNumericUpDown AddNumControl(int min, int max, int step, int width)
		{
			var numControl = new TpNumericUpDown
			{
				Minimum = min,
				Maximum = max,
				Increment = step,
				Location = new Point(_controlOffset, Y_OFFSET20)
			};
			Controls.Add(numControl);
			_controlOffset += width + 5;
			return numControl;
		}
Ejemplo n.º 4
0
        public BoxPropertyControl()
        {
            AddLabel("Border Width");

            numControl               = AddNumControl(1, 5, 1, 40);
            numControl.Value         = Box.borderSizeGlobal;
            numControl.ValueChanged += numControl_ValueChanged;

            AddLabel("Border Color");

            colorBorderControl               = AddColorControl();
            colorBorderControl.Color         = Box.borderColorGlobal;
            colorBorderControl.ColorChanged += colorControl_ValueChanged;
        }
        public TpNumericUpDown AddNumControl(int min, int max, int step, int width)
        {
            var numControl = new TpNumericUpDown
            {
                Minimum   = min,
                Maximum   = max,
                Increment = step,
                Location  = new Point(_controlOffset, Y_OFFSET20)
            };

            Controls.Add(numControl);
            _controlOffset += width + 5;
            return(numControl);
        }
        public SelectionToolPropertyControl()
        {
            AddLabel("Width");

            numControl               = AddNumControl(1, 5, 1, 40);
            numControl.Value         = Line.penSizeGlobal;
            numControl.ValueChanged += numControl_ValueChanged;

            AddLabel("Color");

            colorControl               = AddColorControl();
            colorControl.Color         = Line.penColorGlobal;
            colorControl.ColorChanged += colorControl_ValueChanged;

            AddLabel("Style");

            AddControl(lineDD, 100);
            lineDD.SelectedIndexChanged += lineDD_ValueChanged;
        }
		public SelectionToolPropertyControl()
		{
			AddLabel("Width");

			numControl = AddNumControl(1, 5, 1, 40);
			numControl.Value = Line.penSizeGlobal;
			numControl.ValueChanged += numControl_ValueChanged;

			AddLabel("Color");

			colorControl = AddColorControl();
			colorControl.Color = Line.penColorGlobal;
			colorControl.ColorChanged += colorControl_ValueChanged;

			AddLabel("Style");

			AddControl(lineDD, 100);
			lineDD.SelectedIndexChanged += lineDD_ValueChanged;
		}
		public DecoratedTextBoxPropertyControl()
		{
			AddLabel("Border Width");

			numControl = AddNumControl(1, 5, 1, 40);
			numControl.Value = DecoratedTextBox.borderSizeGlobal;
			numControl.ValueChanged += numControl_ValueChanged;

			AddLabel("Border Color");

			colorBorderControl = AddColorControl();
			colorBorderControl.Color = DecoratedTextBox.borderColorGlobal;
			colorBorderControl.ColorChanged += colorControl_ValueChanged;

			AddLabel("Background Color");

			colorBackControl = AddColorControl();
			colorBackControl.Color = DecoratedTextBox.backColorGlobal;
			colorBackControl.ColorChanged += colorControl_ValueChanged2;
		}
        public DecoratedTextBoxPropertyControl()
        {
            AddLabel("Border Width");

            numControl               = AddNumControl(1, 5, 1, 40);
            numControl.Value         = DecoratedTextBox.borderSizeGlobal;
            numControl.ValueChanged += numControl_ValueChanged;

            AddLabel("Border Color");

            colorBorderControl               = AddColorControl();
            colorBorderControl.Color         = DecoratedTextBox.borderColorGlobal;
            colorBorderControl.ColorChanged += colorControl_ValueChanged;

            AddLabel("Background Color");

            colorBackControl               = AddColorControl();
            colorBackControl.Color         = DecoratedTextBox.backColorGlobal;
            colorBackControl.ColorChanged += colorControl_ValueChanged2;
        }
Ejemplo n.º 10
0
		public BoxPropertyControl()
		{
			AddLabel("Border Width");

			numControl = AddNumControl(1, 5, 1, 40);
			numControl.Value = Box.borderSizeGlobal;
			numControl.ValueChanged += numControl_ValueChanged;

			AddLabel("Border Color");

			colorBorderControl = AddColorControl();
			colorBorderControl.Color = Box.borderColorGlobal;
			colorBorderControl.ColorChanged += colorControl_ValueChanged;
		}
Ejemplo n.º 11
0
		public ArrowPropertyControl()
		{
			AddLabel("Width");

			numControl = AddNumControl(1, 5, 1, 40);
			numControl.Value = Line.penSizeGlobal;
			numControl.ValueChanged += numControl_ValueChanged;

			AddLabel("Color");

			colorControl = AddColorControl();
			colorControl.Color = Line.penColorGlobal;
			colorControl.ColorChanged += colorControl_ValueChanged;

			AddLabel("Style");


			AddControl(lineDD, 100);

			lineDD.LineStyles = TPLineStyle.Solid | TPLineStyle.Dot | TPLineStyle.Dash | TPLineStyle.DashDot |
			                    TPLineStyle.DashDotDot;			

			lineDD.SelectItem(Line.penStyleGlobal);

			lineDD.SelectedIndexChanged += lineDD_ValueChanged;
		}