123456789101112131415161718192021222324252627282930313233343536 |
- using FastReport.DevComponents.DotNetBar;
- using System;
- using System.Windows.Forms;
- namespace FastReport.Controls
- {
- internal class TextAngleButtonItem : ButtonItem
- {
- private ControlContainerItem host;
- private AngleControl control;
- public int Angle
- {
- get => control.Angle;
- set => control.Angle = value;
- }
- public event EventHandler AngleChanged;
- public TextAngleButtonItem()
- {
- AutoExpandOnClick = true;
- PopupType = ePopupType.ToolBar;
- control = new AngleControl();
- control.AngleChanged += (s, e) => AngleChanged?.Invoke(this, e);
- host = new ControlContainerItem();
- host.Control = control;
- SubItems.Add(host);
- this.PopupOpen += (s, e) =>
- {
- control.UpdateDpiDependencies(ContainerControl as Control);
- };
- }
- }
- }
|