Пример #1
0
        public void Reset()
        {
            switch (_currentProgressBarDirection)
            {
            case ProgressBarDirection.LoadingRight:
                _currentProgressBarDirection = ProgressBarDirection.LoadingDown;
                _barRectangle.Height         = 0;
                _barRectangle.Width          = _widthWhenComplete;

                break;

            case ProgressBarDirection.LoadingLeft:
                _currentProgressBarDirection = ProgressBarDirection.LoadingUp;
                _barRectangle.Height         = _heightWhenComplete;
                _barRectangle.Width          = _widthWhenComplete;

                break;

            case ProgressBarDirection.LoadingUp:
                _currentProgressBarDirection = ProgressBarDirection.LoadingRight;
                _barRectangle.Height         = _heightWhenComplete;
                _barRectangle.Width          = _widthWhenComplete;

                break;

            case ProgressBarDirection.LoadingDown:
                _currentProgressBarDirection = ProgressBarDirection.LoadingLeft;
                _barRectangle.Height         = _heightWhenComplete;
                _barRectangle.Width          = _widthWhenComplete;

                break;
            }
        }
Пример #2
0
 public ProgressBar(
     Rectangle positionAndSize,
     Color color,
     float maxValue)
 {
     _barRectangle       = positionAndSize;
     _widthWhenComplete  = positionAndSize.Width;
     _heightWhenComplete = positionAndSize.Height;
     _currentValue       = 0;
     Color = color;
     _currentProgressBarDirection = ProgressBarDirection.LoadingUp;
     MaxValue = maxValue;
 }
Пример #3
0
 /// <summary>
 /// Constructor for Extended Bar
 /// </summary>
 /// <param name="m_Edge">The m edge.</param>
 /// <param name="m_EdgeColor">Color of the m edge.</param>
 /// <param name="m_EdgeLightColor">Color of the m edge light.</param>
 /// <param name="m_EdgeWidth">Width of the m edge.</param>
 /// <param name="m_FloodStyle">The m flood style.</param>
 /// <param name="m_float_BarFlood">The m float bar flood.</param>
 /// <param name="m_int_BarOffset">The m int bar offset.</param>
 /// <param name="m_int_DashWidth">Width of the m int dash.</param>
 /// <param name="m_int_DashSpace">The m int dash space.</param>
 /// <param name="m_Style">The m style.</param>
 /// <param name="m_Color1">The m color1.</param>
 /// <param name="m_Color2">The m color2.</param>
 /// <param name="m_color_Back">The m color back.</param>
 /// <param name="m_int_Step">The m int step.</param>
 /// <param name="m_bool_Shadow">if set to <c>true</c> [m bool shadow].</param>
 /// <param name="m_int_ShadowOffset">The m int shadow offset.</param>
 /// <param name="m_bool_Antialias">if set to <c>true</c> [m bool antialias].</param>
 /// <param name="m_color_Shadow">The m color shadow.</param>
 /// <param name="m_color_Caption">The m color caption.</param>
 /// <param name="m_CaptionMode">The m caption mode.</param>
 /// <param name="m_str_Caption">The m string caption.</param>
 /// <param name="m_bool_ChangeByMouse">if set to <c>true</c> [m bool change by mouse].</param>
 /// <param name="m_bool_Invert">if set to <c>true</c> [m bool invert].</param>
 /// <param name="m_Direction">The m direction.</param>
 /// <param name="m_int_Minimum">The m int minimum.</param>
 /// <param name="ExtendedProgress_interval">The extended progress interval.</param>
 public ProgressInput(
     //ProgressType progressType,
     //ProgressBar solidBars,
     ProgressBarEdge m_Edge,
     Color m_EdgeColor,
     Color m_EdgeLightColor,
     int m_EdgeWidth,
     ProgressFloodStyle m_FloodStyle,
     float m_float_BarFlood,
     int m_int_BarOffset,
     int m_int_DashWidth,
     int m_int_DashSpace,
     ProgressStyle m_Style,
     Color m_Color1,
     Color m_Color2,
     Color m_color_Back,
     int m_int_Step,
     bool m_bool_Shadow,
     int m_int_ShadowOffset,
     bool m_bool_Antialias,
     Color m_color_Shadow,
     Color m_color_Caption,
     ProgressCaptionMode m_CaptionMode,
     String m_str_Caption,
     bool m_bool_ChangeByMouse,
     bool m_bool_Invert,
     ProgressBarDirection m_Direction,
     int m_int_Minimum,
     int ExtendedProgress_interval
     ) : this(
         //ProgressType.Bar,
         //CircularProgress.SupremeCircle,
         ProgressBar.RPExtendedProgress,
         //ProgressIndicator.CircularIndeterminate,
         SmoothingMode.HighQuality,
         TextRenderingHint.AntiAlias,
         PeaceAnimatorEasing.BounceEaseIn,
         transparencyEasingType.BounceEaseIn,
         ZeroitThematicProgress.HatchBrushType.ForwardDiagonal,
         false,
         false,
         false,
         false,
         false,
         "%",
         Color.FromArgb(254, 84, 84),
         Color.DeepPink,
         0,
         100,
         5000,
         10,
         10,
         270)
 {
     //this.progressType = progressType;
     //this.solidBars = solidBars;
     this.m_Edge                    = m_Edge;
     this.m_EdgeColor               = m_EdgeColor;
     this.m_EdgeLightColor          = m_EdgeLightColor;
     this.m_EdgeWidth               = m_EdgeWidth;
     this.m_FloodStyle              = m_FloodStyle;
     this.m_float_BarFlood          = m_float_BarFlood;
     this.m_int_BarOffset           = m_int_BarOffset;
     this.m_int_DashWidth           = m_int_DashWidth;
     this.m_int_DashSpace           = m_int_DashSpace;
     this.m_Style                   = m_Style;
     this.m_Color1                  = m_Color1;
     this.m_Color2                  = m_Color2;
     this.m_color_Back              = m_color_Back;
     this.m_int_Step                = m_int_Step;
     this.m_bool_Shadow             = m_bool_Shadow;
     this.m_int_ShadowOffset        = m_int_ShadowOffset;
     this.m_bool_Antialias          = m_bool_Antialias;
     this.m_color_Shadow            = m_color_Shadow;
     this.m_color_Caption           = m_color_Caption;
     this.m_CaptionMode             = m_CaptionMode;
     this.m_str_Caption             = m_str_Caption;
     this.m_bool_ChangeByMouse      = m_bool_ChangeByMouse;
     this.m_bool_Invert             = m_bool_Invert;
     this.m_Direction               = m_Direction;
     this.m_int_Minimum             = m_int_Minimum;
     this.ExtendedProgress_interval = ExtendedProgress_interval;
 }