コード例 #1
0
        void tmp_init()
        {
            for (int i = 0; i < _numberofElements; i++)
            {
                GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * i, 0, _width, _height));
                vscroll.Index = i;
                if (i % 2 == 0)
                {
                    vscroll.MainImage = UIImage.FromFile("MLResources/backbt.png");
                }
                else
                {
                    vscroll.MainImage = UIImage.FromFile("MLResources/fondo1.png");
                }
                VerticalContainer vc = new VerticalContainer();
                //VerticalIndexContainer vc = new VerticalIndexContainer();
                vscroll.SetContent(vc, vc.getHeight());
                _scroll.Add(vscroll);
                _scroll.ContentSize = new CGSize((i + 1) * _width, _height);

                //if (i > 0)
                ///	vscroll.SetHorizontalOffset (_width/2);
                vscroll.GTVerticalScrollSelected += (s, id) => {
                };
                vscroll.GTVerticalScrollReleased += (s, id) => {};
                vscroll.GTVerticalScrollTapped   += (s, id) => {};

                _scrollList.Add(vscroll);
            }
        }
コード例 #2
0
 void initContent()
 {
     for (int i = 0; i < 8; i++)
     {
         VerticalContainer vc = new VerticalContainer();
         contentScroll.AddVerticalContainer(vc, i);
     }
 }
コード例 #3
0
        public void  InitContentReader(int idx)
        {
            var source = pagelistsource [idx];

            for (int i = 0; i < source.Count; i++)
            {
                VerticalContainer vc = new VerticalContainer();
                //contentScroll.AddVerticalContainer (vc, i, source[i].Cover);
            }
        }
コード例 #4
0
        public void AddVerticalContainer(VerticalContainer vc, int idx)        //,  UIImage cover)
        {
            GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * idx, 0, _width, _height));

            vscroll.Index     = idx;
            vscroll.MainImage = UIImage.FromFile("MLResources/default_img.png");
            //set content
            vscroll.SetContent(vc, vc.getHeight());
            _scroll.Add(vscroll);
            _scroll.ContentSize = new CGSize((idx + 1) * _width, _height);

            ScrollList.Add(vscroll);
            _numberofElements = ScrollList.Count;
        }
コード例 #5
0
        public void AddVerticalContainer(VerticalContainer vc, int idx)
        {
            GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * idx, 0, _width, _height));

            vscroll.Index = idx;
            if (idx % 2 == 0)
            {
                vscroll.MainImage = UIImage.FromFile("assets/imgtest.jpg");
            }
            else
            {
                vscroll.MainImage = UIImage.FromFile("assets/luna.jpg");
            }
            //set content
            vscroll.SetContent(vc, vc.getHeight());
            _scroll.Add(vscroll);
            _scroll.ContentSize = new CGSize((idx + 1) * _width, _height);

            ScrollList.Add(vscroll);
        }