Ejemplo n.º 1
0
            public RichTableSource(RichListController controller)
            {
                _controller = controller;

                if (_controller.SmartImageDownload)
                {
                    _controller._downloadedImages = new Dictionary <NSIndexPath, bool>();
                }
            }
Ejemplo n.º 2
0
            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                if (_controller._isReloading)
                {
                    return;
                }

                if (_controller.EnablePaging && _controller.HasMorePages && _controller._items [indexPath.Section].Item2.Count == indexPath.Row)
                {
                    StartAnimating();
                    _controller.PagingAction();
                    return;
                }

                if (_controller.CollapseEnabled && indexPath.Row == 0)
                {
                    var row = _controller._collapseRows [indexPath.Section];
                    if (row.Action != null)
                    {
                        row.Action();
                    }
                    else if (row.NavController != null)
                    {
                        var newController = row.NavController();

                        if (newController != null)
                        {
                            RichListController.PushAction(_controller, newController);
                        }
                    }
                    else
                    {
                        var cell = ((CollapseCell)tableView.CellAt(indexPath));
                        cell.ToggleCollapse();
                    }
                    return;
                }

                var item = GetItem(indexPath);

                if (item == null)
                {
                    return;
                }

                if (tableView.Editing)
                {
                    item.RowSelectedInEdit(tableView);
                }
                else
                {
                    item.RowSelected(tableView);
                }
            }
Ejemplo n.º 3
0
        public CollapseCell(RichListController controller, UITableView tableView, NSIndexPath indexPath)
            : base(UITableViewCellStyle.Default, "collapsecell")
        {
            _controller = controller;
            _tableView = tableView;
            TextLabel.Font = controller._headingFont;
            SelectionStyle = UITableViewCellSelectionStyle.None;

            detailsLabel = new UILabel();
            detailsLabel.Layer.CornerRadius = 4f;
            detailsLabel.TextAlignment = UITextAlignment.Center;
            detailsLabel.TextColor = UIColor.White;
            detailsLabel.Font = UIFont.BoldSystemFontOfSize (13);
            detailsLabel.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            AccessoryView = detailsLabel;

            imageButton = UIButton.FromType (UIButtonType.Custom);
            Add (imageButton);

            imageButton.TouchDown += delegate {
                ToggleCollapse();
            };

            BackgroundView = new UIView (Frame);
        }
Ejemplo n.º 4
0
        public RichTableSource(RichListController controller)
        {
            _controller = controller;

                if (_controller.SmartImageDownload)
                    _controller._downloadedImages = new Dictionary<NSIndexPath, bool>();
        }