private void process_downloads()
        {
            if (download_queue.Count > 0)
            {
                Plugin             plugin = download_queue.First();
                Plugin_Update_Item itm    = list.Get_Children().First(o => ((Plugin_Update_Item)o).plugin_hash == plugin.Hash) as Plugin_Update_Item;
                if (itm == null)
                {
                    SLog.Info("Unable to find plugin_update_item for plugin {0}({1})", plugin.data.NAME, plugin.Hash);
                    return;
                }
                else
                {
                    SLog.Info("Found plugin_update_item for plugin {0}({1})", plugin.data.NAME, plugin.Hash);
                }

                uiProgressBar prog = null;
                if (itm != null)
                {
                    prog = itm.progress_bar;
                }

                StartCoroutine(plugin.force_download(prog, (string file) =>
                {
                    download_queue.RemoveAt(0);
                    process_downloads();
                }));
            }
            else
            {
                this.Hide();
                Loader.Restart_App();
            }
        }
 private void Mark_all_onChange(uiCheckbox c, bool was_clicked)
 {
     foreach (uiControl child in list.Get_Children())
     {
         Plugin_Update_Item itm = child as Plugin_Update_Item;
         itm.isChecked = c.isChecked;
     }
 }
        private void Btn_start_onClicked(uiControl c)
        {
            foreach (uiControl child in list.Get_Children())
            {
                Plugin_Update_Item itm = child as Plugin_Update_Item;
                if (itm.isChecked)
                {
                    Plugin plugin = Plugin.Get_Plugin(itm.plugin_hash);
                    download_queue.Add(plugin);
                }
            }

            process_downloads();
        }
        private void List_onLayout(uiControl c)
        {
            // Arrange all children into a cascading list
            Plugin_Update_Item last = null;

            foreach (uiControl child in list.Get_Children())
            {
                Plugin_Update_Item itm = child as Plugin_Update_Item;
                if (last == null)
                {
                    itm.alignTop();
                }
                else
                {
                    itm.moveBelow(last);
                }

                itm.FloodX();
                itm.isChecked = true;
                last          = itm;
            }
        }