예제 #1
0
 public bool Remove(T item)
 {
     if (((IList <T>)list).Remove(item))
     {
         OnRemoved.Invoke(item);
         return(true);
     }
     return(false);
 }
예제 #2
0
        public void ShowProgress(float progress)
        {
            if (!IsDownloading)
            {
                if (IfDownloading != null)
                {
                    IfDownloading.Invoke(false);
                }

                return;
            }

            var rProgress = progress / 100; //relative progress

            if (LoaderImage)
            {
                if (!LoaderImage.IsActive())
                {
                    LoaderImage.Activate();
                    DownloadIcon.Deactivate();

                    if (OnDownloadStarts != null)
                    {
                        OnDownloadStarts.Invoke();
                    }

                    if (IfDownloading != null)
                    {
                        IfDownloading.Invoke(true);
                    }
                }

                LoaderImage.fillAmount = rProgress;
                if (Downloading != null)
                {
                    Downloading.Invoke(rProgress);
                }
            }

            _alreadyClicked = true;
        }
예제 #3
0
 public void Add(T item)
 {
     ((IList <T>)list).Add(item);
     OnAdded.Invoke(item);
 }