Exemplo n.º 1
0
        public SlideBar(float minV, float maxV, float value, ETypeOrientation type)
        {
            this.minV = minV;
            MaxV_ = maxV;
            Type = type;
            Value = value;

            if (Type == ETypeOrientation.Horizontal)
            {
                Slider_ = new SlideBarSlider(ETypeOrientation.Horizontal);
                HorizontalStyle = EElementStyle.Stretch;
                VerticalStyle = EElementStyle.Fit;
                Size.width = 10;
                Size.height = 20;
                Slider_.Size.width = (uint)Math.Max((Size.width - 4) * 0.1f, 4);
                Slider_.Size.height = 16;
                Slider_.Position.X = (int)(((Size.width - 4) - Slider_.Size.width) * Value + 2);
                Slider_.Position.Y = 2;
                Slider_.SetSlideBar(this);
            }
            else
            {
                Slider_ = new SlideBarSlider(ETypeOrientation.Vertical);
                HorizontalStyle = EElementStyle.Fit;
                VerticalStyle = EElementStyle.Stretch;
                Size.width = 20;
                Size.height = 10;
                Slider_.Size.width = 16;
                Slider_.Size.height = (uint)Math.Max((Size.height - 4) * 0.1f, 4);
                Slider_.Position.X = 2;
                Slider_.Position.Y = (int)(((Size.height - 4) - Slider_.Size.height) * Value + 2);
                Slider_.SetSlideBar(this);
            }
        }
Exemplo n.º 2
0
        public SlideBar(float minV, float maxV, float value, ETypeOrientation type)
        {
            this.minV = minV;
            MaxV_     = maxV;
            Type      = type;
            Value     = value;

            if (Type == ETypeOrientation.Horizontal)
            {
                Slider_             = new SlideBarSlider(ETypeOrientation.Horizontal);
                HorizontalStyle     = EElementStyle.Stretch;
                VerticalStyle       = EElementStyle.Fit;
                Size.width          = 10;
                Size.height         = 20;
                Slider_.Size.width  = (uint)Math.Max((Size.width - 4) * 0.1f, 4);
                Slider_.Size.height = 16;
                Slider_.Position.X  = (int)(((Size.width - 4) - Slider_.Size.width) * Value + 2);
                Slider_.Position.Y  = 2;
                Slider_.SetSlideBar(this);
            }
            else
            {
                Slider_             = new SlideBarSlider(ETypeOrientation.Vertical);
                HorizontalStyle     = EElementStyle.Fit;
                VerticalStyle       = EElementStyle.Stretch;
                Size.width          = 20;
                Size.height         = 10;
                Slider_.Size.width  = 16;
                Slider_.Size.height = (uint)Math.Max((Size.height - 4) * 0.1f, 4);
                Slider_.Position.X  = 2;
                Slider_.Position.Y  = (int)(((Size.height - 4) - Slider_.Size.height) * Value + 2);
                Slider_.SetSlideBar(this);
            }
        }
Exemplo n.º 3
0
        public ProgressBar(float min, float max, float value, ETypeOrientation orientation)
        {
            this.min = min;
            this.max = max;
            Type     = orientation;
            Size     = GetPreferedSize();
            Value    = value;

            if (orientation == ETypeOrientation.Horizontal)
            {
                HorizontalStyle = EElementStyle.Stretch;
                VerticalStyle   = EElementStyle.Fit;
            }
            else
            {
                HorizontalStyle = EElementStyle.Fit;
                VerticalStyle   = EElementStyle.Stretch;
            }
            Pack();
        }
Exemplo n.º 4
0
        public ProgressBar(float min, float max, float value, ETypeOrientation orientation)
        {
            this.min = min;
            this.max = max;
            Type = orientation;
            Size = GetPreferedSize();
            Value = value;

            if (orientation == ETypeOrientation.Horizontal)
            {
                HorizontalStyle = EElementStyle.Stretch;
                VerticalStyle = EElementStyle.Fit;
            }
            else
            {
                HorizontalStyle = EElementStyle.Fit;
                VerticalStyle = EElementStyle.Stretch;
            }
            Pack();
        }
Exemplo n.º 5
0
 public ProgressBar(float min, float max, ETypeOrientation orientation)
     : this(min, max, 0, orientation)
 {
 }
Exemplo n.º 6
0
 public ProgressBar(ETypeOrientation orientation)
     : this(0, 100f, orientation)
 {
 }
Exemplo n.º 7
0
 public ProgressBar(float min, float max, ETypeOrientation orientation)
     : this(min, max, 0, orientation)
 {
 }
Exemplo n.º 8
0
 public ProgressBar(ETypeOrientation orientation)
     : this(0, 100f, orientation)
 {
 }
Exemplo n.º 9
0
 public SlideBar(float minV, float maxV, ETypeOrientation type)
     : this(minV, maxV, 0, type)
 {
 }
Exemplo n.º 10
0
 public SlideBar(ETypeOrientation type)
     : this(0, 100f, type)
 {
 }
Exemplo n.º 11
0
 public SlideBarSlider(ETypeOrientation type)
 {
     Type = type;
 }
Exemplo n.º 12
0
 public SlideBar(float minV, float maxV, ETypeOrientation type)
     : this(minV, maxV, 0, type)
 {
 }
Exemplo n.º 13
0
 public SlideBar(ETypeOrientation type)
     : this(0, 100f, type)
 {
 }
Exemplo n.º 14
0
 public SlideBarSlider(ETypeOrientation type)
 {
     Type = type;
 }