Пример #1
0
        public virtual void Refresh()
        {
            if (TotalOption.IsSet(SupportOption.Group) && !Option.IsSet(SupportOption.Group) && Items.TryGetValue(Data, out var nodeItem))
            {
                nodeItem.isVisible = false;
            }

            if (TotalOption.IsSet(SupportOption.Individually))
            {
                foreach (var segmentData in Data.SegmentEndDatas)
                {
                    if (Items.TryGetValue(segmentData, out var segmentEndItem))
                    {
                        if (!Option.IsSet(SupportOption.Individually))
                        {
                            segmentEndItem.isVisible = false;
                        }
                        else
                        {
                            segmentEndItem.isEnabled = IsEnableGetter?.Invoke(segmentData) != false;
                        }
                    }
                }
            }
        }
Пример #2
0
        private void PlaceItems()
        {
            if (TotalOption.IsSet(SupportOption.Group))
            {
                Items[Data] = AddItem(Data);
            }

            if (TotalOption.IsSet(SupportOption.Individually))
            {
                foreach (var segmentData in Data.SegmentEndDatas)
                {
                    Items[segmentData] = AddItem(segmentData);
                }
            }

            Content.Refresh();
            Refresh();
        }