示例#1
0
    private void Scorll_Change()
    {
//		Log.debug (list.scrollPane.posY.ToString () + "|" + list.scrollPane.contentHeight.ToString ());
//		try{
        float      yy    = list.scrollPane.posY;
        float      hh    = list.scrollPane.contentHeight;
        float      listH = list.viewHeight; //391
        int        begin = -1;              // = (int)Math.Round (yy / hh);
        int        end   = 0;
        GObject    o;
        float      oh   = 0;
        List <int> show = new List <int>();

        for (int i = 0; i < ld.Count; i++)
        {
            o = list.GetChild(i + "");                  //_isRed
            if (o != null)
            {
                show.Add(i);
            }
//				o = list.GetChildAt (i);
//				o = list.GetChildAt (i);
//				if (o == null)
//					break;
//				if (o.y < yy)
//					continue;
//				else
//				{
//					if (begin == -1)
//						begin = i;
//					oh = o.y - yy;
//				}
//				oh += o.height + list.lineGap;
//				if (oh >= listH)
//				{
//					end = i;
//					break;
//				}
        }
        begin = show.Count > 0 ? show [0] : -1;
        end   = show.Count > 0 ? show [show.Count - 1] : 0;
        chatModel.GetRedCountIndexAll(begin, end);
        RED_CHATUPDATE(null);
//		}catch(Exception exc){
//
//		}
    }