コード例 #1
0
        protected override List <ToolButton> GetButtons()
        {
            string selectAllText = GetSelectAllText();

            if (selectAllText.IsEmptyOrNull())
            {
                return(null);
            }

            var self = this;

            return(new List <ToolButton>
            {
                GridSelectAllButtonHelper.Define <TItem>
                (
                    getGrid: () => self,
                    getId: x => x.Id,
                    getSelected: x => x.IsSelected,
                    setSelected: (x, v) => {
                    if (x.IsSelected != v)
                    {
                        x.IsSelected = v;
                        ItemSelectedChanged(x);
                    }
                },
                    onClick: () => UpdateFlags()
                )
            });
        }
コード例 #2
0
        protected override List <ToolButton> GetButtons()
        {
            string selectAllText = GetSelectAllText();

            if (selectAllText.IsEmptyOrNull())
            {
                return(null);
            }

            var self = this;

            return(new List <ToolButton>
            {
                GridSelectAllButtonHelper.Define <CheckTreeItem>(
                    () => self,
                    x => x.Id,
                    x => x.IsSelected,
                    (x, v) => x.IsSelected = v
                    )
            });
        }