示例#1
0
        /// <summary>
        /// 根据当前焦点获取Bar条
        /// </summary>
        /// <returns></returns>
        public VScrollBar getFBar()
        {
            var          focus = LoacationHelper.GetFocusedControl();
            TTVScrollBar sb    = null;

            if (focus != null)
            {
                foreach (Control gbox in PubulicData.GCFN("appan").Controls)
                {
                    if (gbox.Name == focus.Name)
                    {
                        sb = (TTVScrollBar)PubulicData.GCFN("AppSB");
                    }
                }
                foreach (Control gbox in PubulicData.GCFN("weban").Controls)
                {
                    if (gbox.Name == focus.Name)
                    {
                        sb = (TTVScrollBar)PubulicData.GCFN("WebSB");
                    }
                }
                foreach (Control gbox in PubulicData.GCFN("hfan").Controls)
                {
                    if (gbox.Name == focus.Name)
                    {
                        sb = (TTVScrollBar)PubulicData.GCFN("HfSB");
                    }
                }
            }
            return(sb);
        }
示例#2
0
 public void setCss(Control.ControlCollection cs)
 {
     if (cs == null || cs.Count < 1)
     {
         return;
     }
     foreach (Control item in cs)
     {
         if (item is TTPanel)
         {
             //TTPanel pl = item as TTPanel;
             //pl.Paint += Pl_Paint;
         }
         if (item is TTGroupBox)
         {
             //TTGroupBox gb = item as TTGroupBox;
             //gb.Paint += Pl_Paint;
         }
         if (!(item is TTTextBox) && !(item is TTVScrollBar))
         {
             item.BackColor = Color.Transparent;
         }
         if (item is TTVScrollBar)
         {
             TTVScrollBar vb = item as TTVScrollBar;
             vb.ValueChanged += myScroll;
             vb.SmallChange   = 10;
             vb.Width         = 1;
         }
         if (item is TTTextBox)
         {
             //TTTextBox tb = item as TTTextBox;
         }
         if (item is TTButton)
         {
             var bt = item as TTButton;
             setButtonColor(bt);
             if (bt.Parent is Form)
             {
                 setButtonImage(bt);
             }
         }
         setCss(item.Controls);
     }
 }
示例#3
0
        /// <summary>
        /// 根据鼠标位置获取Bar条
        /// </summary>
        /// <returns></returns>
        public VScrollBar getPBar()
        {
            Point        Mp = LoacationHelper.GetPoint();
            TTVScrollBar sb = null;

            if (Mp.X > 519)
            {
                sb = (TTVScrollBar)PubulicData.GCFN("HfSB");
            }
            else if (Mp.X > 208)
            {
                sb = (TTVScrollBar)PubulicData.GCFN("AppSB");
            }
            else
            {
                sb = (TTVScrollBar)PubulicData.GCFN("WebSB");
            }
            //if (sb != null) {
            //    sb.Focus();
            //}
            return(sb);
        }