Exemplo n.º 1
0
        public ShapeOutlinefrm(ShapeOutline _shapeoutline)
        {
            this.tempshapeoutline = new ShapeOutline(_shapeoutline);
            InitializeComponent();

            comboBoxStartCap.Visible = this.tempshapeoutline.ShowCaps;
            comboBoxEndCap.Visible   = this.tempshapeoutline.ShowCaps;
            labelStrartCap.Visible   = this.tempshapeoutline.ShowCaps;
            labelEndCap.Visible      = this.tempshapeoutline.ShowCaps;

            comboBoxStartCap.DataSource = Enum.GetValues(typeof(LineCap));
            comboBoxEndCap.DataSource   = Enum.GetValues(typeof(LineCap));
            comboBoxDash.DataSource     = Enum.GetValues(typeof(DashStyle));

            colorComboStartColor.Title     = "Start Color";
            colorComboStartColor.FillColor = tempshapeoutline.BoarderColor1;
            numericUpDown1.Value           = tempshapeoutline.BoarderWidth;

            comboBoxDash.SelectedItem     = tempshapeoutline.BoarderDashStyle;
            comboBoxStartCap.SelectedItem = tempshapeoutline.StartLineCap;
            comboBoxEndCap.SelectedItem   = tempshapeoutline.EndLineCap;

            checkBoxBlinking.Checked = tempshapeoutline.BoarderBlinking;

            this.colorComboStartColor.ColorChanged += new EventHandler(colorComboStartColor_ColorChanged);
        }
Exemplo n.º 2
0
        // Overrides the ConvertTo method of TypeConverter.
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            ShapeOutline v = value as ShapeOutline;

            if (destinationType == typeof(string))
            {
                return(v.LineStyle);
            }
            return(base.ConvertTo(context, culture, value, destinationType));
        }