コード例 #1
0
 // Function Video
 public void Add(Get_User_Data_Object.Joined_Groups groups)
 {
     try
     {
         var check = mUserGroupsList.FirstOrDefault(a => a.group_id == groups.group_id);
         if (check == null)
         {
             mUserGroupsList.Add(groups);
             NotifyItemInserted(mUserGroupsList.IndexOf(mUserGroupsList.Last()));
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
コード例 #2
0
        public void Initialize(MyGroupsAdapterViewHolder holder, Get_User_Data_Object.Joined_Groups item)
        {
            try
            {
                var AvatarSplit     = item.avatar.Split('/').Last();
                var getImage_Avatar = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskGroup, AvatarSplit);
                if (getImage_Avatar != "File Dont Exists")
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", item.avatar);
                        holder.Image.Tag = "loaded";
                    }
                }
                else
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskGroup, item.avatar);
                        ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", item.avatar);
                        holder.Image.Tag = "loaded";
                    }
                }

                var CoverSplit     = item.cover.Split('/').Last();
                var getImage_Cover = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskGroup, CoverSplit);
                if (getImage_Cover == "File Dont Exists")
                {
                    IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskGroup, item.cover);
                }

                string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(item.name));
                holder.Nmae.Text = IMethods.Fun_String.SubStringCutOf(name, 20);
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }