Beispiel #1
0
        public TreasureGeneratorPage()
        {
            _SelectionView = new GradientView();
            _WebView       = new UIWebView();
            _EmailButton   = new GradientButton();
            _EmailButton.SetText("Email");
            _EmailButton.SetImage(UIExtensions.GetSmallIcon("mail"), UIControlState.Normal);
            _EmailButton.ImageEdgeInsets = new UIEdgeInsets(0, 0, 0, 15);
            _EmailButton.TouchUpInside  += EmailButtonClicked;

            Add(_SelectionView);
            Add(_WebView);
            Add(_EmailButton);



            _LevelTab = new GradientButton();
            _LevelTab.SetText("Level");
            CMStyles.StyleTab(_LevelTab, true);
            _SelectionView.StyleBasicPanel();
            _SelectionView.Gradient     = new GradientHelper(CMUIColors.SecondaryColorADark);
            _SelectionView.CornerRadius = 0f;
            _LevelTab.TouchUpInside    += LevelTabClicked;

            _ItemsTab = new GradientButton();
            _ItemsTab.SetText("Items");
            CMStyles.StyleTab(_ItemsTab, false);
            _ItemsTab.TouchUpInside += ItemsTabClicked;


            _SelectionView.Add(_LevelTab);
            _SelectionView.Add(_ItemsTab);

            _LevelView = new GradientView();

            _ItemsView = new GradientView();

            foreach (var v in new GradientView[] { _LevelView, _ItemsView })
            {
                v.StyleBasicPanel();
                v.Gradient = new GradientHelper(CMUIColors.SecondaryColorADarker);
            }

            _ItemsView.Hidden = true;

            _SelectionView.Add(_LevelView);
            _SelectionView.Add(_ItemsView);

            _GenerateButton = new GradientButton();
            _GenerateButton.SetText("Generate");
            _GenerateButton.SetSmallIcon("treasure");
            _SelectionView.Add(_GenerateButton);
            _GenerateButton.TouchUpInside += GenerateButtonClicked;


            //create level items
            _LevelButton = new GradientButton();
            _LevelButton.SetText("Level 1");
            _LevelButton.Tag = 1;
            _LevelView.Add(_LevelButton);
            _LevelPopover = new ButtonStringPopover(_LevelButton);
            _LevelPopover.SetButtonText = true;
            _LevelPopover.ItemClicked  += HandleLevelPopoverItemClicked;

            for (int i = 1; i <= 20; i++)
            {
                _LevelPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = "Level " + i, Tag = i
                });
            }

            _CoinButton = new GradientButton();
            _CoinButton.SetText("Normal Coins");
            _LevelView.Add(_CoinButton);
            _CoinPopover = new ButtonStringPopover(_CoinButton);
            AddLevelPopoverItems(_CoinPopover, "Coins");
            _CoinButton.Tag = 1;

            _GoodsButton = new GradientButton();
            _GoodsButton.SetText("Normal Goods");
            _LevelView.Add(_GoodsButton);
            _GoodsPopover = new ButtonStringPopover(_GoodsButton);
            AddLevelPopoverItems(_GoodsPopover, "Goods");
            _GoodsButton.Tag = 1;

            _ItemsButton = new GradientButton();
            _ItemsButton.SetText("Normal Items");
            _ItemsPopover = new ButtonStringPopover(_ItemsButton);
            _LevelView.Add(_ItemsButton);
            _ItemsButton.Tag = 1;
            AddLevelPopoverItems(_ItemsPopover, "Items");

            //create item items
            _CountButton = new GradientButton();
            _CountButton.SetText("1 Item");
            _CountButton.Tag = 1;

            _ItemsView.Add(_CountButton);
            _CountPopover = new ButtonStringPopover(_CountButton);
            for (int i = 1; i < 61; i++)
            {
                string text = i + (i == 1?" Item":" Items");
                _CountPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = text, Tag = i
                });
            }
            _CountPopover.ItemClicked  += HandleLevelPopoverItemClicked;
            _CountPopover.SetButtonText = true;

            _ChartLevelButton = new GradientButton();
            _ChartLevelButton.SetText("Minor");
            _ChartLevelButton.Tag = 0;
            _ItemsView.Add(_ChartLevelButton);
            _ChartLevelPopover = new ButtonStringPopover(_ChartLevelButton);
            _ChartLevelPopover.SetButtonText = true;
            _ChartLevelPopover.ItemClicked  += HandleItemLevelClicked;;
            _ChartLevelPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = "Minor", Tag = 0
            });
            _ChartLevelPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = "Medium", Tag = 1
            });
            _ChartLevelPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = "Major", Tag = 2
            });

            foreach (var t in new TreasureGenerator.RandomItemType [] {
                TreasureGenerator.RandomItemType.MagicalArmor,
                TreasureGenerator.RandomItemType.MagicalWeapon,
                TreasureGenerator.RandomItemType.Potion,
                TreasureGenerator.RandomItemType.Wand,
                TreasureGenerator.RandomItemType.Ring,
                TreasureGenerator.RandomItemType.Rod,
                TreasureGenerator.RandomItemType.Scroll,
                TreasureGenerator.RandomItemType.Staff,
                TreasureGenerator.RandomItemType.MinorWondrous,
            })
            {
                var b = new GradientButton();
                b.SetText(TreasureGenerator.RandomItemString(t));
                b.Tag = (int)t;
                b.MakeCheckButtonStyle(true);
                b.Data           = true;
                b.TouchUpInside += CheckButtonChecked;
                _ItemsView.Add(b);
                _ItemCheckButtons.Add(b);

                if (t == TreasureGenerator.RandomItemType.Rod)
                {
                    _RodButton         = b;
                    _RodButton.Enabled = false;
                }
                else if (t == TreasureGenerator.RandomItemType.Staff)
                {
                    _StaffButton         = b;
                    _StaffButton.Enabled = false;
                }
            }

            _SelectAllButton = new GradientButton();
            _SelectAllButton.SetText("Select All");
            _ItemsView.Add(_SelectAllButton);
            _SelectAllButton.TouchUpInside += SelectButtonClicked;
            _SelectAllButton.Data           = true;

            _UnselectAllButton = new GradientButton();
            _UnselectAllButton.SetText("Unselect All");
            _ItemsView.Add(_UnselectAllButton);
            _UnselectAllButton.TouchUpInside += SelectButtonClicked;
            _UnselectAllButton.Data           = false;
        }
Beispiel #2
0
        private void BuildFilters()
        {
            float locX    = 0;
            float locY    = 5;
            float bHeight = 30;
            float marginX = 10;

            GradientButton b;


            //type filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 100, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText(AllTypesText);
            typeFilterPopover = new ButtonStringPopover(b);
            typeFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllTypesText, Tag = null
            });

            foreach (String s in Feat.FeatTypes)
            {
                typeFilterPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = s, Tag = s
                });
            }
            typeFilterPopover.SetButtonText = true;
            typeFilterPopover.ItemClicked  += HandleTypeFilterPopoverItemClicked;;
            typeFilterButton = b;

            FilterView.AddSubview(b);

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("New");
            b.TouchUpInside += NewButtonClicked;

            FilterView.AddSubview(b);

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)(b.Frame.Width + marginX);
            b.SetText("Customize");
            b.TouchUpInside += CustomizeButtonClicked;
            FilterView.AddSubview(b);


            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("Edit");
            b.TouchUpInside += EditButtonClicked;
            FilterView.AddSubview(b);

            editButton = b;

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("Delete");
            b.TouchUpInside += DeleteButtonClicked;
            FilterView.AddSubview(b);

            deleteButton = b;
        }
Beispiel #3
0
 public ViewDataSource(ButtonStringPopover state)
 {
     this.state = state;
 }
Beispiel #4
0
 public ViewDelegate(ButtonStringPopover state)
 {
     this.state = state;
 }
        private void BuildFilters()
        {
            float locX    = 0;
            float locY    = 5;
            float bHeight = 30;
            float marginX = 10;

            GradientButton b;


            //set filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 100, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText(AllSetText);
            setFilterPopover = new ButtonStringPopover(b);
            setFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllSetText, Tag = null
            });
            setFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = "Monsters", Tag = false
            });
            setFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = "NPCs", Tag = true
            });
            setFilterPopover.SetButtonText = true;
            setFilterPopover.ItemClicked  += HandleSetFilterPopoverItemClicked;
            setFilterButton = b;

            FilterView.AddSubview(b);

            //type filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 150, bHeight);
            locX   += (float)b.Frame.Width + marginX;

            b.SetText(AllTypeText);
            typePopover = new ButtonStringPopover(b);

            typePopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllTypeText
            });
            foreach (String type in Monster.CreatureTypeNames)
            {
                typePopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = type.Capitalize(), Tag = type
                });
            }
            typePopover.SetButtonText = true;
            typePopover.ItemClicked  += HandleTypePopoverItemClicked;
            typeFilterButton          = b;

            FilterView.AddSubview(b);


            //CR filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 100, bHeight);
            locX   += (float)b.Frame.Width + marginX;

            b.SetText(AllCRText);
            crFilterPopover = new ButtonStringPopover(b);

            crFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllCRText
            });
            foreach (KeyValuePair <double, string> cr in LoadCRs())
            {
                crFilterPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = cr.Value, Tag = cr.Value
                });
            }
            crFilterPopover.SetButtonText = true;
            crFilterPopover.ItemClicked  += HandleCrFilterPopoverItemClicked;
            crFilterButton = b;

            FilterView.AddSubview(b);
        }
Beispiel #6
0
        public ToolbarView()
        {
            BackgroundColor = new UIColor(1, 0, 0, 0);

            List <String> names = new List <String>()
            {
                "Combat", "Monsters", "Feats", "Spells", "Rules", "Treasure"
            };
            List <String> images = new List <String>()
            {
                "sword", "monster", "star", "scroll", "book", "treasure"
            };

            float pos         = 0;
            float buttonWidth = 110;
            float buttonGap   = -1;
            int   i           = 0;

            foreach (string s in names)
            {
                GradientButton b = new GradientButton();
                b.Frame = (new CGRect(pos, 0, buttonWidth, 50));
                b.SetImage(UIExtensions.GetSmallIcon(images[i]), UIControlState.Normal);

                b.Border      = 1;
                b.CornerRadii = new float[] { 4, 16, 0, 0 };

                b.SetTitle(s, UIControlState.Normal);
                UIEdgeInsets si = b.ImageEdgeInsets;
                si.Right         += 10;
                b.ImageEdgeInsets = si;

                pos += buttonWidth + buttonGap;
                buttons.Add(b);
                b.Tag            = i;
                b.TouchUpInside += HandleBTouchUpInside;
                i++;


                AddSubview(b);
            }

            clickedButton          = buttons[0];
            clickedButton.Gradient = new GradientHelper(CMUIColors.PrimaryColorDarker, CMUIColors.PrimaryColorMedium);

            _SettingsButton = new GradientButton();
            _SettingsButton.SetImage(UIImage.FromFile("Images/settings.png"), UIControlState.Normal);
            //_SettingsButton.Border = 0;
            //_SettingsButton.BackgroundColor = UIColor.Clear;
            //_SettingsButton.Gradient = new GradientHelper(0x00000000.UIColor());
            _SettingsButton.CornerRadius   = 0;
            _SettingsButton.TouchUpInside += SettingsButtonClicked;
            _SettingsButton.Frame          = new CGRect(Bounds.Width - 64, (Bounds.Height - 48.0f) / 2.0f, 48f, 48f);

            AddSubview(_SettingsButton);

            settingsPopover = new ButtonStringPopover(_SettingsButton);
            var pi = new ButtonStringPopoverItem()
            {
                Text = "Import"
            };

            settingsPopover.Items.Add(pi);
            pi = new ButtonStringPopoverItem {
                Text = "Export"
            };
            settingsPopover.Items.Add(pi);
            settingsPopover.Items.Add(new ButtonStringPopoverItem());
            serverItem = new ButtonStringPopoverItem {
                Text = "Run Local Service"
            };
            SetLocalServiceIcon();
            settingsPopover.Items.Add(serverItem);
            pi = new ButtonStringPopoverItem {
                Text = "Local Service Port"
            };
            settingsPopover.Items.Add(pi);
            pi = new ButtonStringPopoverItem {
                Text = "Local Service Passcode"
            };
            settingsPopover.Items.Add(pi);
            settingsPopover.ItemClicked += (sender, eee) =>
            {
                switch (eee.Index)
                {
                case 0:

                    Import();

                    break;

                case 1:

                    Export();

                    break;

                case 2:
                    LocalServiceClicked();
                    break;

                case 4:
                    LocalServicePortClicked();
                    break;

                case 5:
                    LocalServicePasscodeClicked();
                    break;
                }
            };


            _AboutButton = new GradientButton();
            _AboutButton.SetImage(UIImage.FromFile("Images/External/info.png"), UIControlState.Normal);
            // _AboutButton.Border = 0;
            //_AboutButton.BackgroundColor = UIColor.Clear;
            //_AboutButton.Gradient = new GradientHelper(0x00000000.UIColor());
            _AboutButton.CornerRadius   = 0;
            _AboutButton.TouchUpInside += AboutButtonClicked;
            _AboutButton.Frame          = new CGRect(Bounds.Width - 23, (Bounds.Height - 48.0f) / 2.0f, 48f, 48f);

            Add(_AboutButton);
            BackgroundColor = UIColor.Black;

            MobileSettings.Instance.PropertyChanged += MobileSettingsPropertyChanged;
        }
Beispiel #7
0
        private void BuildFilters()
        {
            float locX    = 0;
            float locY    = 5;
            float bHeight = 30;
            float marginX = 10;

            GradientButton b;


            //class filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 100, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText(AllClassesText);
            classFilterPopover = new ButtonStringPopover(b);
            classFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllClassesText, Tag = null
            });
            List <String> classList = new List <String>()
            {
                "Alchemist", "Antipaladin", "Bard", "Cleric", "Druid",
                "Inquisitor", "Magus", "Oracle", "Paladin", "Ranger", "Sorcerer", "Summoner", "Witch", "Wizard"
            };

            foreach (String s in classList)
            {
                classFilterPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = s, Tag = s
                });
            }

            classFilterPopover.SetButtonText = true;
            classFilterPopover.ItemClicked  += HandleClassFilterPopoverItemClicked;
            classFilterButton = b;

            FilterView.AddSubview(b);


            //level filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 80, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText(AllLevelsText);
            levelFilterPopover = new ButtonStringPopover(b);
            levelFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllLevelsText, Tag = null
            });

            for (int i = 0; i <= 9; i++)
            {
                levelFilterPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = i.PastTense() + " Level", Tag = i
                });
            }

            levelFilterPopover.SetButtonText = true;
            levelFilterPopover.ItemClicked  += HandleLevelFilterPopoverItemClicked;
            levelFilterButton = b;

            FilterView.AddSubview(b);


            //school filter
            b = new GradientButton();
            StyleFilterButton(b);
            b.Frame = new CGRect(locX, locY, 100, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText(AllSchoolsText);
            schoolFilterPopover = new ButtonStringPopover(b);
            schoolFilterPopover.Items.Add(new ButtonStringPopoverItem()
            {
                Text = AllSchoolsText, Tag = null
            });
            foreach (string school in Spell.Schools)
            {
                schoolFilterPopover.Items.Add(new ButtonStringPopoverItem()
                {
                    Text = school, Tag = school
                });
            }
            schoolFilterPopover.SetButtonText = true;
            schoolFilterPopover.ItemClicked  += HandleSchoolFilterPopoverItemClicked;
            schoolFilterButton = b;

            FilterView.AddSubview(b);

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("New");
            b.TouchUpInside += NewButtonClicked;

            FilterView.AddSubview(b);

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("Customize");
            b.TouchUpInside += CustomizeButtonClicked;
            FilterView.AddSubview(b);


            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("Edit");
            b.TouchUpInside += EditButtonClicked;
            FilterView.AddSubview(b);

            editButton = b;

            b = new GradientButton();
            StyleDBButton(b);
            b.Frame = new CGRect(locX, locY, 90, bHeight);
            locX   += (float)b.Frame.Width + marginX;
            b.SetText("Delete");
            b.TouchUpInside += DeleteButtonClicked;
            FilterView.AddSubview(b);

            deleteButton = b;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _AreaViews = new List <GradientView>()
            {
                BaseView, ModView, DescriptionView, SkillsView
            };
            foreach (GradientView v in _AreaViews)
            {
                StylePanel(v);
            }



            ButtonPropertyManager pm;

            pm = new ButtonPropertyManager(BaseAtkButton, DialogParent, CurrentMonster, "BaseAtk")
            {
                Title = "Base Attack Bonus"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(CMBButton, DialogParent, CurrentMonster, "CMB_Numeric")
            {
                Title = "CMD"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(CMDButton, DialogParent, CurrentMonster, "CMD_Numeric")
            {
                Title = "CMB"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(RacialModsButton, DialogParent, CurrentMonster, "RacialMods");
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(AuraButton, DialogParent, CurrentMonster, "Aura");
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(SQButton, DialogParent, CurrentMonster, "SQ")
            {
                Multiline = true, Title = "Special Qualities"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(LanguagesButton, DialogParent, CurrentMonster, "Languages")
            {
                Multiline = true
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(GearButton, DialogParent, CurrentMonster, "Gear")
            {
                Multiline = true
            };
            _Managers.Add(pm);

            CMStyles.TextFieldStyle(SkillDetailButton);
            SkillDetailButton.TouchUpInside += HandleSkillDetailClicked;

            _SkillDetailPopover = new ButtonStringPopover(SkillDetailSelectButton);
            _SkillDetailPopover.WillShowPopover += HandleWillShowDetailPopover;
            _SkillDetailPopover.ItemClicked     += HandleSkillDetailItemClicked;


            SkillDetailSelectButton.SetImage(UIExtensions.GetSmallIcon("prev"), UIControlState.Normal);

            foreach (GradientButton b in from x in _Managers select x.Button)
            {
                CMStyles.TextFieldStyle(b, 15f);
            }

            AvailableSkillsTable.DataSource = new AvailableViewDataSource(this);
            AvailableSkillsTable.Delegate   = new AvailableViewDelegate(this);
            AvailableSkillsTable.RowHeight  = 24;

            KnownSkillsTable.DataSource = new KnownViewDataSource(this);
            KnownSkillsTable.Delegate   = new KnownViewDelegate(this);
            KnownSkillsTable.RowHeight  = 24;

            UpdateSelectableSkills();

            AddSkillButton.TouchUpInside += AddSkillButtonClicked;
        }
Beispiel #9
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                DataListViewCell cell = (DataListViewCell)tableView.DequeueReusableCell("CombatListViewCell");

                if (cell == null)
                {
                    cell = new DataListViewCell(UITableViewCellStyle.Default, "CombatListViewCell");
                }

                Character ch = state.CombatState.CombatList[indexPath.Row];

                ch.PropertyChanged += state.HandleChPropertyChanged;
                ch.Monster.ActiveConditions.CollectionChanged += delegate
                {
                    state.UpdateCharacter(ch);
                };



                state.UpdateCell(ch, cell);

                float accHeight = 30f;


                UIView buttonView = new UIView(new CGRect(0, 0, 79, accHeight));

                float          xPos = 0;
                GradientButton b    = new GradientButton();

                if (ch.IsReadying || ch.IsDelaying)
                {
                    UIImageView view = new UIImageView();
                    view.Image = ch.IsReadying?state._ReadyingImage:state._DelayingImage;
                    view.Frame = new CGRect(new CGPoint(xPos, (accHeight - 16f) / 2.0f), new CGSize(16, 16));
                    buttonView.Add(view);
                    xPos += 18;
                }

                if (ch.HasFollowers)
                {
                    UIImageView view = new UIImageView();
                    view.Image = state._LinkImage;
                    view.Frame = new CGRect(new CGPoint(xPos, (accHeight - 16f) / 2.0f), new CGSize(16, 16));
                    buttonView.Add(view);
                    xPos += 18;
                }


                b.SetTitle(ch.CurrentInitiative.ToString(), UIControlState.Normal);
                b.CornerRadius   = 0;
                b.Frame          = new CGRect(xPos, 0, 40, accHeight);
                b.TouchUpInside += state.InitButtonTouchUpInside;
                b.Data           = ch;
                buttonView.AddSubview(b);

                xPos += (float)(b.Frame.Width - 1);

                b = new GradientButton();
                b.SetImage(UIExtensions.GetSmallIcon("lightning"), UIControlState.Normal);
                b.CornerRadius = 0;
                b.Frame        = new CGRect(xPos, 0, 40, accHeight);

                buttonView.AddSubview(b);
                b.Data = ch;

                xPos += (float)(b.Frame.Width - 1);

                buttonView.SetWidth(xPos);


                ButtonStringPopover actionsPopover = new ButtonStringPopover(b);

                actionsPopover.WillShowPopover += state.WillShowActionsPopover;
                actionsPopover.Data             = ch;
                actionsPopover.ItemClicked     += HandleActionsPopoverItemClicked;



                cell.AccessoryView = buttonView;


                return(cell);
            }