Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZeroitUltimatePieChartSmartTagActionList"/> class.
        /// </summary>
        /// <param name="component">A component related to the <see cref="T:System.ComponentModel.Design.DesignerActionList" />.</param>
        public ZeroitUltimatePieChartSmartTagActionList(IComponent component) : base(component)
        {
            this.colUserControl = component as ZeroitUltimatePieChart;

            // Cache a reference to DesignerActionUIService, so the
            // DesigneractionList can be refreshed.
            this.designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
        }
        /// <summary>
        /// Sets the owning control.
        /// </summary>
        /// <param name="control">The control that contains this item.</param>
        /// <exception cref="InvalidOperationException">A pie chart item cannot belong to two different controls.</exception>
        internal void SetOwner(ZeroitUltimatePieChart control)
        {
            if (owner != control && owner != null && control != null)
            {
                throw new InvalidOperationException("A pie chart item cannot belong to two different controls.");
            }

            UpdateWeight(-this.Weight);
            this.owner = control;
            UpdateWeight(this.Weight);
        }
Beispiel #3
0
            /// <summary>
            /// Constructs a new DrawingMetrics.
            /// </summary>
            /// <param name="control">The control this object is associated with.</param>
            /// <param name="item">The item this object is associated with.</param>
            /// <param name="drawingBounds">The drawing bounds.</param>
            /// <param name="startAngle">The start angle of this pie slice, in radians.</param>
            /// <param name="sweepAngle">The sweep angle of this pie slice, in radians.</param>
            public DrawingMetrics(ZeroitUltimatePieChart control, PieChartItem item, Rectangle drawingBounds, float startAngle, float sweepAngle)
            {
                this.control       = control;
                this.item          = item;
                this.drawingBounds = drawingBounds;
                this.startAngle    = (float)(startAngle % (2 * Math.PI));
                this.sweepAngle    = sweepAngle;

                ConstructGraphics();
                ConstructPaths();
                ConstructRegions();
            }
Beispiel #4
0
            /// <summary>
            /// Constructs a new instance.
            /// </summary>
            /// <param name="container">The ZeroitUltimatePieChart that this collection is associated with.</param>


            internal ItemCollection(ZeroitUltimatePieChart container)
            {
                this.container = container;
                this.items     = new List <PieChartItem>();
            }
Beispiel #5
0
 /// <summary>
 /// Constructs a new instance of PieChartItemStyle.
 /// </summary>
 /// <param name="container">The control that contains the style.</param>
 internal PieChartItemStyle(ZeroitUltimatePieChart container)
 {
     this.container = container;
 }