예제 #1
0
 public PreviewLineSetupControl(PreviewBaseShape shape) : base(shape)
 {
     InitializeComponent();
     ForeColor = ThemeColorTable.ForeColor;
     BackColor = ThemeColorTable.BackgroundColor;
     ThemeUpdateControls.UpdateControls(this);
     ThemePropertyGridRenderer.PropertyGridRender(propertyGrid);
     propertyGrid.SelectedObject = Shape;
     Shape.OnPropertiesChanged  += OnPropertiesChanged;
 }
        public PreviewCustomPropSetupControl(PreviewBaseShape shape) : base(shape)
        {
            InitializeComponent();
            ForeColor = ThemeColorTable.ForeColor;
            BackColor = ThemeColorTable.BackgroundColor;

            ThemeUpdateControls.UpdateControls(this);
            ThemePropertyGridRenderer.PropertyGridRender(propertyGrid);

            buttonHelp.BackColor = Color.Transparent;
            buttonHelp.FlatStyle = FlatStyle.Flat;

            propertyGrid.SelectedObject = Shape;
            Shape.OnPropertiesChanged  += OnPropertiesChanged;
        }
예제 #3
0
        public PreviewShapeBaseSetupControl(PreviewBaseShape shape) : base(shape)
        {
            InitializeComponent();
            Title = $"{shape.TypeName} Properties";
            int iconSize = (int)(16 * ScalingTools.GetScaleFactor());

            buttonHelp.Image = Tools.GetIcon(Resources.help, iconSize);
            ThemeUpdateControls.UpdateControls(this);
            ThemePropertyGridRenderer.PropertyGridRender(propertyGrid);
            propertyGrid.SelectedObject = Shape;
            Shape.OnPropertiesChanged  += OnPropertiesChanged;
            if (ScalingTools.GetScaleFactor() >= 2)
            {
                propertyGrid.LargeButtons = true;
            }
        }