Пример #1
0
        /// <summary>
        /// Initializes a new instance of the RadialMenu class.
        /// </summary>
        public RadialMenu()
        {
            _MenuContainer = new RadialMenuContainer();
            _MenuContainer.RadialMenu = this;
            _MenuContainer.Opened += new EventHandler(RadialMenuOpened);
            _MenuContainer.Closed += new EventHandler(RadialMenuClosed);

            this.SetStyle(
                ControlStyles.UserPaint |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.Opaque |
                ControlStyles.ResizeRedraw |
                DisplayHelp.DoubleBufferFlag |
                ControlStyles.SupportsTransparentBackColor, true);
            _MenuContainer.SetOwner(this);
        }
Пример #2
0
 /// <summary>
 /// Copies the RadialMenuItem specific properties to new instance of the item.
 /// </summary>
 /// <param name="copy">New ProgressBarItem instance.</param>
 internal void InternalCopyToItem(RadialMenuContainer copy)
 {
     CopyToItem(copy);
 }
Пример #3
0
 /// <summary>
 /// Returns copy of the item.
 /// </summary>
 public override BaseItem Copy()
 {
     RadialMenuContainer copy = new RadialMenuContainer();
     this.CopyToItem(copy);
     return copy;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the RadialMenuPopupProxy class.
 /// </summary>
 /// <param name="parentRadialMenu"></param>
 public RadialMenuPopupProxy(RadialMenuContainer parentRadialMenu)
 {
     _ParentRadialMenu = parentRadialMenu;
 }
Пример #5
0
 /// <summary>
 /// Called when DisplayItem property has changed.
 /// </summary>
 /// <param name="oldValue">Old property value</param>
 /// <param name="newValue">New property value</param>
 protected virtual void OnDisplayItemChanged(RadialMenuContainer oldValue, RadialMenuContainer newValue)
 {
     if (oldValue != null)
         oldValue.ContainerControl = null;
     if (newValue != null)
     {
         newValue.ContainerControl = this;
     }
     this.Invalidate();
     //OnPropertyChanged(new PropertyChangedEventArgs("DisplayItem"));
 }