Example #1
0
        void imageView_Click(object sender, EventArgs e)
        {
            BorderedImageView ctx = (sender as BorderedImageView);

            if (ctx == null)
            {
                return;
            }

            foreach (var item in _imageList.Values)
            {
                if (item.Index == ctx.Index)
                {
                    item.Border = true;
                }
                else
                {
                    item.Border = false;
                }

                item.Invalidate();
            }

            _pptController.SetSlide(ctx.Index);
        }
Example #2
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            LayoutInflater inflator = _pptController.GetSystemService(Context.LayoutInflaterService)
                                      as LayoutInflater;

            View rowView = inflator.Inflate(_resourceId, parent, false);
            BorderedImageView imageView = rowView.FindViewById <BorderedImageView>(Resource.Id.bottomRowImage);

            imageView.SetImageBitmap(_pptController.SlideList[position].Image);

            imageView.Index = position;
            imageView.SetOnTouchListener(this);

            if (_imageList.ContainsKey(position) == true)
            {
                imageView.Border = _imageList[position].Border;
            }

            if (_first == true && position == 0)
            {
                _first              = false;
                _oldSelected        = imageView;
                _oldSelected.Border = true;
            }

            _imageList[position] = imageView;

            return(rowView);
        }
Example #3
0
        internal void SetCurrentImage(int newSlide)
        {
            BorderedImageView current = GetItem(newSlide) as BorderedImageView;

            if (current == null)
            {
                return;
            }

            imageView_Click(current, EventArgs.Empty);
        }
Example #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.PPTController);

            _imageView       = FindViewById <BorderedImageView>(Resource.Id.panoramaImage);
            _txtMemo         = FindViewById <TextView>(Resource.Id.txtMemo);
            _bottomSlideList = FindViewById <BottomHorizontalListView>(Resource.Id.bottomSlideList);

            _ip   = Intent.GetStringExtra("ip");
            _port = Intent.GetStringExtra("port");

            //string document = Intent.GetStringExtra("document");
            string document = App.DocumentText;

            if (string.IsNullOrEmpty(document) == true)
            {
                Intent i = new Intent(this, typeof(MainActivity));

                i.PutExtra("ip", _ip);
                i.PutExtra("port", _port);

                StartActivity(i);
            }

            _pptDocument = Newtonsoft.Json.JsonConvert.DeserializeObject <PPTDocument>(document);

            if (_pptDocument != null)
            {
                LoadDocument();
            }

            StartShow(this.SlideList[0].AnimationCount);
            SetSlide(0);

            _bottomSlideList.Adapter = new BottomItemAdapter(this, Resource.Layout.bottomRow);
            _imageView.SetOnTouchListener(this);
        }
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            LayoutInflater inflator = _pptController.GetSystemService(Context.LayoutInflaterService)
                as LayoutInflater;

            View rowView = inflator.Inflate(_resourceId, parent, false);
            BorderedImageView imageView = rowView.FindViewById<BorderedImageView>(Resource.Id.bottomRowImage);
            imageView.SetImageBitmap(_pptController.SlideList[position].Image);

            imageView.Index = position;
            imageView.SetOnTouchListener(this);

            if (_imageList.ContainsKey(position) == true)
            {
                imageView.Border = _imageList[position].Border;
            }

            if (_first == true && position == 0)
            {
                _first = false;
                _oldSelected = imageView;
                _oldSelected.Border = true;
            }

            _imageList[position] = imageView;

            return rowView;
        }
Example #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.PPTController);

            _imageView = FindViewById<BorderedImageView>(Resource.Id.panoramaImage);
            _txtMemo = FindViewById<TextView>(Resource.Id.txtMemo);
            _bottomSlideList = FindViewById<BottomHorizontalListView>(Resource.Id.bottomSlideList);

            _ip = Intent.GetStringExtra("ip");
            _port = Intent.GetStringExtra("port");

            //string document = Intent.GetStringExtra("document");
            string document = App.DocumentText;
            if (string.IsNullOrEmpty(document) == true)
            {
                Intent i = new Intent(this, typeof(MainActivity));

                i.PutExtra("ip", _ip);
                i.PutExtra("port", _port);

                StartActivity(i);
            }

            _pptDocument = Newtonsoft.Json.JsonConvert.DeserializeObject<PPTDocument>(document);

            if (_pptDocument != null)
            {
                LoadDocument();
            }

            StartShow(this.SlideList[0].AnimationCount);
            SetSlide(0);

            _bottomSlideList.Adapter = new BottomItemAdapter(this, Resource.Layout.bottomRow);
            _imageView.SetOnTouchListener(this);
        }