Exemplo n.º 1
0
        public TouchProgressBar(
            TouchColor colorBackground,
            TouchColor colorProgress,
            float currentProgress,
            bool enableTouch,
            TouchOrientation orientation
            )
        {
            Visible       = true;
            VisibleWindow = false;

            this.colorBackground = colorBackground;
            this.colorProgress   = colorProgress;
            _currentProgress     = currentProgress;
            this.enableTouch     = enableTouch;
            this.orientation     = orientation;
            timerId = 0;
            clicked = false;

            if (this.orientation == TouchOrientation.Vertical)
            {
                SetSizeRequest(30, 200);
            }
            else
            {
                SetSizeRequest(200, 30);
            }

            ExposeEvent        += OnExpose;
            ButtonPressEvent   += OnProgressBarPress;
            ButtonReleaseEvent += OnProgressBarRelease;
        }
Exemplo n.º 2
0
 public TouchText(string text)
 {
     this.text         = text;
     font              = new MyFont();
     alignment         = TouchAlignment.Left;
     orientation       = TouchOrientation.Horizontal;
     textWrap          = TouchTextWrap.WordWrap;
     unitOfMeasurement = UnitsOfMeasurement.None;
 }
Exemplo n.º 3
0
        public TouchSelectorSwitch(int id, int selectionCount, int currentSelectedIndex, TouchOrientation orientation)
        {
            Visible       = true;
            VisibleWindow = false;

            this.id             = id;
            this.selectionCount = selectionCount;
            currentSelected     = currentSelectedIndex;
            this.orientation    = orientation;
            sliderSize          = MySliderSize.Large;

            backgoundTextColorOptions = new TouchColor[this.selectionCount];
            for (int i = 0; i < backgoundTextColorOptions.Length; ++i)
            {
                backgoundTextColorOptions[i] = new TouchColor("white");
            }

            selectedTextColorOptions = new TouchColor[this.selectionCount];
            for (int i = 0; i < backgoundTextColorOptions.Length; ++i)
            {
                selectedTextColorOptions[i] = new TouchColor("white");
            }

            sliderColorOptions = new TouchColor[this.selectionCount];
            for (int i = 0; i < sliderColorOptions.Length; ++i)
            {
                sliderColorOptions[i] = new TouchColor("grey2");
            }

            textOptions = new string[this.selectionCount];
            for (int i = 0; i < textOptions.Length; ++i)
            {
                textOptions[i] = string.Empty;
            }

            clicked    = false;
            clickTimer = 0;
            click1     = 0;
            click2     = 0;

            if (this.orientation == TouchOrientation.Horizontal)
            {
                SetSizeRequest(80, 30);
            }
            else
            {
                SetSizeRequest(30, 80);
            }

            ExposeEvent        += OnExpose;
            ButtonPressEvent   += OnSelectorPress;
            ButtonReleaseEvent += OnSelectorRelease;
        }
        public TouchLayeredProgressBar(
            TouchColor colorBackground,
            TouchColor colorProgress,
            float currentProgress,
            bool enableTouch,
            TouchOrientation orientation,
            TouchColor colorProgressSecondary,
            float currentProgressSecondary,
            bool drawPrimaryWhenEqual)
            : base(
                colorBackground,
                colorProgress,
                currentProgress,
                enableTouch,
                orientation)
        {
            this.colorProgressSecondary   = colorProgressSecondary;
            this.currentProgressSecondary = currentProgressSecondary;
            this.drawPrimaryWhenEqual     = drawPrimaryWhenEqual;

            ExposeEvent -= OnExpose;
            ExposeEvent += OnExposeSecondary;
        }
Exemplo n.º 5
0
 public TouchProgressBar(TouchOrientation orientation)
     : this(new TouchColor("grey4"), new TouchColor("pri"), 0f, false, orientation)
 {
 }