Exemplo n.º 1
0
        // Determines whether the specified object is equal to the current object.
        public override bool Equals(System.Object obj)
        {
            ListViewCustomSampleItemDescription descObj = obj as ListViewCustomSampleItemDescription;

            if (descObj == null)
            {
                return(false);
            }
            if (((descObj.Icon == null) && (Icon != null)) || ((descObj.Icon != null) && (Icon == null)))
            {
                return(false);
            }
            return(Name == descObj.Name && Progress == descObj.Progress && Icon.Equals(descObj.Icon));
        }
 // Token: 0x060045DD RID: 17885 RVA: 0x0017C424 File Offset: 0x0017A824
 public void SetData(ListViewCustomSampleItemDescription item)
 {
     if (item == null)
     {
         this.Icon.sprite       = null;
         this.Text.text         = string.Empty;
         this.Progressbar.Value = 0;
     }
     else
     {
         this.Icon.sprite       = item.Icon;
         this.Text.text         = item.Name;
         this.Progressbar.Value = item.Progress;
     }
     this.Icon.SetNativeSize();
     this.Icon.color = ((!(this.Icon.sprite == null)) ? Color.white : new Color(0f, 0f, 0f, 0f));
 }
        // Displaying item data
        public void SetData(ListViewCustomSampleItemDescription item)
        {
            if (item == null)
            {
                Icon.sprite       = null;
                Text.text         = string.Empty;
                Progressbar.Value = 0;
            }
            else
            {
                Icon.sprite       = item.Icon;
                Text.text         = item.Name;
                Progressbar.Value = item.Progress;
            }

            Icon.SetNativeSize();
            //set transparent color if no icon
            Icon.color = (Icon.sprite == null) ? Color.clear : Color.white;
        }
        // Token: 0x060045D2 RID: 17874 RVA: 0x0017A0C4 File Offset: 0x001784C4
        public override bool Equals(object obj)
        {
            ListViewCustomSampleItemDescription listViewCustomSampleItemDescription = obj as ListViewCustomSampleItemDescription;

            return(listViewCustomSampleItemDescription != null && (!(listViewCustomSampleItemDescription.Icon == null) || !(this.Icon != null)) && (!(listViewCustomSampleItemDescription.Icon != null) || !(this.Icon == null)) && (this.Name == listViewCustomSampleItemDescription.Name && this.Progress == listViewCustomSampleItemDescription.Progress) && this.Icon.Equals(listViewCustomSampleItemDescription.Icon));
        }