Example #1
0
 public void SetTips(ScVxPageTips tips)
 {
     ps.SetTips(tips);
 }
Example #2
0
        private void ScVxTipsProgressBar_SizeChanged(object sender, SizeF oldSize)
        {
            //
            float tipsRowHeight = Height * tipsRowHeightRatio;
            float barRowHeight  = Height * barRowHeightRatio;

            RectangleF rect = new RectangleF(0, 0, Width, Height);

            mainTable = new Table(rect, 3, 1);

            Margin margin = new Margin(0, 5, 0, 5);

            mainTable.SetCellMargin(0, 0, margin);
            mainTable.SetCellMargin(2, 0, margin);

            TableLine tableLine = new TableLine(LineDir.HORIZONTAL);

            tableLine.lineComputeMode = LineComputeMode.ABSOLUTE;

            tableLine.computeParam = tipsRowHeight;
            mainTable.SetLineArea(0, tableLine);

            tableLine.computeParam = barRowHeight;
            mainTable.SetLineArea(1, tableLine);

            tableLine.computeParam = Height - tipsRowHeight - barRowHeight;
            mainTable.SetLineArea(2, tableLine);

            mainTable.ComputeLinesArea(LineDir.HORIZONTAL);


            RectangleF tipsRowRect = mainTable.GetCellContentRect(0, 0);
            RectangleF barRowRect  = mainTable.GetCellContentRect(1, 0);
            RectangleF numRowRect  = mainTable.GetCellContentRect(2, 0);

            progressBar.BarHeight = barHeight;
            progressBar.Height    = barRowHeight;
            progressBar.Location  = new PointF(barRowRect.X, barRowRect.Y);


            //
            RectangleF[]        progressNodeRects = progressBar.progressNodeRects;
            List <ScVxPageTips> tipsList          = new List <ScVxPageTips>();
            List <RectangleF>   numRectList       = new List <RectangleF>();
            ScVxPageTips        tips;
            RectangleF          r;
            float x;

            string[] nodeNames = progressBar.progressNodeNames;



            for (int i = 0; i < progressNodeRects.Count(); i++)
            {
                r = progressNodeRects[i];
                x = r.X + r.Width / 2 - tipsWidth / 2;

                tips                = new ScVxPageTips();
                tips.txt            = nodeNames[i];
                tips.triWidthScale  = 4f;
                tips.triHeightScale = 5f;
                tips.bgColor        = Color.Black;
                tips.txtColor       = Color.White;
                tips.isDisplaySide  = true;
                tips.alpha          = 0;

                tips.Width    = tipsWidth;
                tips.Height   = tipsRowRect.Height;
                tips.Location = new PointF(x, tipsRowRect.Y);


                Add(tips);
                tipsList.Add(tips);

                //
                x = r.X + r.Width / 2 - r.Width;
                RectangleF r2 = new RectangleF(x, numRowRect.Y, r.Width * 2, numRowRect.Height);
                numRectList.Add(r2);
            }

            tipsSet          = tipsList.ToArray();
            progressNumRects = numRectList.ToArray();

            //
        }
Example #3
0
 public void SetTips(ScVxPageTips tips)
 {
     this.tips = tips;
 }
Example #4
0
 public void SetPageSelectorTips(ScVxPageTips tips)
 {
     pageSelector.SetTips(tips);
 }