Beispiel #1
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.separator       = this.CreateSeparatorElement();
     this.separator.Class = "WaitingIndicatorSeparator";
     this.Children.Add((RadElement)this.separator);
 }
Beispiel #2
0
        protected RectangleF SetDashInitialPosition(
            WaitingBarSeparatorElement element,
            RectangleF clientRect)
        {
            int num = element.StepWidth + element.SeparatorWidth;

            return(new RectangleF(new PointF(clientRect.X - (float)num, clientRect.Y - 1f), new SizeF(clientRect.Width + (float)num, clientRect.Height + 1f)));
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            separator       = new WaitingBarSeparatorElement();
            separator.Class = "WaitingIndicatorSeparator";
            this.Children.Add(separator);
        }
Beispiel #4
0
        protected RectangleF SetDashInitialPosition(
            WaitingBarSeparatorElement element,
            RectangleF clientRect)
        {
            int num = element.StepWidth + element.SeparatorWidth;

            if (this.IsVertical())
            {
                return(new RectangleF(new PointF(clientRect.X - 1f, clientRect.Y - (float)num), new SizeF(clientRect.Width + 1f, clientRect.Height + (float)(num * 2))));
            }
            return(new RectangleF(new PointF(clientRect.X - (float)num, clientRect.Y - 1f), new SizeF(clientRect.Width + (float)(num * 2), clientRect.Height + 1f)));
        }
Beispiel #5
0
        protected RectangleF SetDashInitialPosition(WaitingBarSeparatorElement element, RectangleF clientRect)
        {
            const int i          = 1;
            int       step       = element.StepWidth + element.SeparatorWidth;
            bool      isVertical = IsVertical();

            if (isVertical)
            {
                return(new RectangleF(new PointF(clientRect.X - i, clientRect.Y - step), new SizeF(clientRect.Width + i, clientRect.Height + step * 2)));
            }
            return(new RectangleF(new PointF(clientRect.X - step, clientRect.Y - i), new SizeF(clientRect.Width + step * 2, clientRect.Height + i)));
        }
Beispiel #6
0
        protected RectangleF GetDashElementFinalSize(WaitingBarSeparatorElement element, RectangleF clientRect)
        {
            if (!element.Dash)
            {
                return(RectangleF.Empty);
            }

            int   step = (element.StepWidth + element.SeparatorWidth) * 2;
            float dx = clientRect.X, dy = clientRect.Y;
            float width = clientRect.Width, height = clientRect.Height;

            if (offset >= step / 2)
            {
                offset = 0;
                return(SetDashInitialPosition(element, clientRect));
            }

            if ((this.WaitingDirection == ProgressOrientation.Right && !this.RightToLeft) || (this.WaitingDirection == ProgressOrientation.Left && this.RightToLeft))
            {
                dx    += offset - step;
                width += step;
                dy--;
                height++;
            }

            if ((this.WaitingDirection == ProgressOrientation.Left && !this.RightToLeft) || (this.WaitingDirection == ProgressOrientation.Right && this.RightToLeft))
            {
                dx    -= offset + step / 2;
                width += step;
                dy--;
                height++;
            }

            if (this.WaitingDirection == ProgressOrientation.Top)
            {
                dy     -= offset + step / 2;
                height += step;
                dx--;
                width++;
            }

            if (this.WaitingDirection == ProgressOrientation.Bottom)
            {
                dy     += offset - step;
                height += step;
                dx--;
                width++;
            }

            return(new RectangleF(new PointF(dx, dy), new SizeF(width, height)));
        }
Beispiel #7
0
        protected RectangleF GetDashElementFinalSize(
            WaitingBarSeparatorElement element,
            RectangleF clientRect)
        {
            if (!element.Dash)
            {
                return(RectangleF.Empty);
            }
            int   num    = (element.StepWidth + element.SeparatorWidth) * 2;
            float x      = clientRect.X;
            float y      = clientRect.Y;
            float width  = clientRect.Width;
            float height = clientRect.Height;

            if ((double)this.offset >= (double)(num / 2))
            {
                this.offset = 0.0f;
                return(this.SetDashInitialPosition(element, clientRect));
            }
            if (this.WaitingDirection == ProgressOrientation.Right && !this.RightToLeft || this.WaitingDirection == ProgressOrientation.Left && this.RightToLeft)
            {
                x     += this.offset - (float)num;
                width += (float)num;
                --y;
                ++height;
            }
            if (this.WaitingDirection == ProgressOrientation.Left && !this.RightToLeft || this.WaitingDirection == ProgressOrientation.Right && this.RightToLeft)
            {
                x     -= this.offset + (float)(num / 2);
                width += (float)num;
                --y;
                ++height;
            }
            if (this.WaitingDirection == ProgressOrientation.Top)
            {
                y      -= this.offset + (float)(num / 2);
                height += (float)num;
                --x;
                ++width;
            }
            if (this.WaitingDirection == ProgressOrientation.Bottom)
            {
                y      += this.offset - (float)num;
                height += (float)num;
                --x;
                ++width;
            }
            return(new RectangleF(new PointF(x, y), new SizeF(width, height)));
        }
Beispiel #8
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.separatorElement       = new WaitingBarSeparatorElement();
     this.SeparatorElement.Class = "WaitingBarSeparator";
     this.Children.Add((RadElement)this.SeparatorElement);
     this.textElement        = new WaitingBarTextElement();
     this.textElement.ZIndex = 1;
     this.Children.Add((RadElement)this.TextElement);
     this.indicators = new WaitingBarIndicatorCollection();
     this.CreateIndicators();
     foreach (RadElement waitingIndicator in (Collection <BaseWaitingBarIndicatorElement>) this.WaitingIndicators)
     {
         this.Children.Add(waitingIndicator);
     }
 }
Beispiel #9
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            separatorElement = new WaitingBarSeparatorElement();
            textElement      = new WaitingBarTextElement();
            indicators       = new WaitingIndicatorCollection();

            Indicators[0].SetDefaultValueOverride(RadElement.VisibilityProperty, ElementVisibility.Visible);
            Indicators[1].SetDefaultValueOverride(RadElement.VisibilityProperty, ElementVisibility.Collapsed);
            separatorElement.Class = "WaitingBarSeparator";

            this.Children.Add(separatorElement);
            this.Children.Add(textElement);
            this.Children.Add(Indicators[0]);
            this.Children.Add(Indicators[1]);
        }