Ejemplo n.º 1
0
        public void ActivateItem(AddonItem item, bool value)
        {
            foreach (Control control in Controls)
            {
                if (control is AddonItem)
                {
                    AddonItem controlItem = ((AddonItem)control);
                    if (controlItem.IsActive())
                    {
                        controlItem.Activate(false);
                    }
                }
            }

            foreach (Control control in Controls)
            {
                if (control is AddonItem)
                {
                    AddonItem controlItem = ((AddonItem)control);
                    if (control == item)
                    {
                        controlItem.Activate(value);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void AddItem(string title, string description, string tags, int visibility, PublishedFileId_t fileID, string lastChangeDate)
        {
            AddonItem item = new AddonItem(title, description, tags, visibility, fileID, lastChangeDate);

            item.Parent = this;
            item.Bounds = new Rectangle(2, 2 + (60 * GetItemNumber()), Width - 2, 60);
            item.SetupItem();
        }
Ejemplo n.º 3
0
        public void StartUploading(PublishedFileId_t fileID, UGCUpdateHandle_t handle)
        {
            AddonItem pItem = null;

            foreach (Control control in Controls)
            {
                if (control is AddonItem)
                {
                    if (((AddonItem)control).GetItemFileID() == fileID)
                    {
                        pItem = ((AddonItem)control);
                        break;
                    }
                }
            }

            if (pItem != null)
            {
                pItem.StartUploading(handle);
            }
        }
Ejemplo n.º 4
0
        public void UpdateItem(PublishedFileId_t fileID, string title, string description, string tags, int visibility, string lastChangeDate)
        {
            AddonItem pItem = null;

            foreach (Control control in Controls)
            {
                if (control is AddonItem)
                {
                    if (((AddonItem)control).GetItemFileID() == fileID)
                    {
                        pItem = ((AddonItem)control);
                        break;
                    }
                }
            }

            if (pItem != null)
            {
                pItem.UpdateItem(title, description, tags, visibility, lastChangeDate);
            }
        }