Beispiel #1
0
 public DropItemSource(List <IAutoDropItem> _ItemsList, SupportViewDrop _ConfigStyle, int _HeightOfRow, IDropItemSelected dropItemSelected)
 {
     ItemsList         = _ItemsList;
     ConfigStyle       = _ConfigStyle;
     HeightOfRow       = _HeightOfRow;
     IDropItemSelected = dropItemSelected;
 }
Beispiel #2
0
 public DropItemAdapterAsync(Context context, List <IAutoDropItem> storeDataLst, SupportViewDrop _ConfigStyle, IDropItemSelected dropItemSelected) : base(context, 0)
 {
     originalData      = storeDataLst;
     items             = storeDataLst;
     mContext          = context;
     ConfigStyle       = _ConfigStyle;
     IDropItemSelected = dropItemSelected;
 }
Beispiel #3
0
 public DropItemSource(List <IAutoDropItem> _ItemsList, SupportViewDrop _ConfigStyle, int _HeightOfRow, IDropItemSelected dropItemSelected, bool _IsShowCheckbox)
 {
     ItemsList         = _ItemsList;
     ConfigStyle       = _ConfigStyle;
     HeightOfRow       = _HeightOfRow;
     IDropItemSelected = dropItemSelected;
     IsShowCheckbox    = _IsShowCheckbox;
 }
Beispiel #4
0
        public void BindDataToCell(IAutoDropItem dropItem, Action action, SupportViewDrop _ConfigStyle, bool _ShowCheckBox = false)
        {
            try
            {
                txtTitle.Text                = dropItem.IF_GetTitle();
                txtDescription.Text          = dropItem.IF_GetDescription();
                txtSeperator.BackgroundColor = _ConfigStyle.SeperatorColor.ToUIColor();
                NsHeightSeperator.Constant   = _ConfigStyle.SeperatorHeight;
                imgIcon.Image                = UIImage.FromBundle(dropItem.IF_GetIcon()).ImageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal);
                txtTitle.TextColor           = _ConfigStyle.TextColor.ToUIColor();
                txtDescription.TextColor     = _ConfigStyle.DescriptionTextColor.ToUIColor();

                if (_ShowCheckBox)
                {
                    NSSpaceBetWeen.Constant   = 5;
                    NSSizeOfCheckbox.Constant = 25;
                    cbxCheckBox.Checked       = dropItem.IF_GetChecked();
                    cbxCheckBox.Hidden        = false;
                }
                else
                {
                    NSSpaceBetWeen.Constant   = 0;
                    NSSizeOfCheckbox.Constant = 0;
                    cbxCheckBox.Hidden        = true;
                }

                if (ActionClick == null)
                {
                    ActionClick             = action;
                    bttClick.TouchUpInside += (sender, e) =>
                    {
                        ActionClick();
                    };
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }