Ejemplo n.º 1
0
        private void _AddTrashBox(RssTargetInfo targetInfo)
        {
            TrashBox trashBox = targetInfo.TrashBox;

            _trashBoxes.Add(trashBox);

            TreeViewImgItem targetNode = new TreeViewImgItem(TRASH_NODE_TARGET);

            targetNode.Text          = targetInfo.Title;
            targetNode.SelectedImage = (targetInfo.IsZeptDist) ? _zeptairIcon : _feedIcon;
            targetNode.IsExpanded    = true;

            ArrayList channels = new ArrayList();

            foreach (InfoItem infoItem in trashBox.InfoItems)
            {
                if (!channels.Contains(infoItem.Channel))
                {
                    channels.Add(infoItem.Channel);
                }
            }

            Hashtable channelHash = new Hashtable();

            foreach (string channel in channels)
            {
                TreeViewImgItem channelNode = new TreeViewImgItem(TRASH_NODE_CHANNEL);
                channelNode.Text          = channel;
                channelNode.SelectedImage = _channelIcon;
                channelNode.IsExpanded    = false;

                channelHash[channel] = channelNode;
                targetNode.Items.Add(channelNode);
            }

            foreach (InfoItem infoItem in trashBox.InfoItems)
            {
                TreeViewImgItem itemNode = new TreeViewImgItem(TRASH_NODE_ITEM);
                itemNode.Text           = infoItem.Title;
                itemNode.SelectedImage  = _itemIcon;
                itemNode.AdditionalInfo = infoItem;

                ((TreeViewImgItem)channelHash[infoItem.Channel]).Items.Add(itemNode);
            }
            trvTrash.Items.Add(targetNode);
        }
Ejemplo n.º 2
0
 protected internal void spawnTrashBox()
 {
     _trashBoxInst = Instantiate(_trashBoxPref);
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     trashBox    = FindObjectOfType <TrashBox>();
     audioSource = this.gameObject.GetComponent <AudioSource>();
 }