コード例 #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"));
 }