Пример #1
0
        //Get Liked Videos in Database
        public void LikedVideos()
        {
            try
            {
                Classes.LikedVideosList.Clear();

                var LikedVideos = SQL_Commander.Get_LikedVideos_Credentials();
                if (Classes.LikedVideosList != null)
                {
                    foreach (var Video in LikedVideos)
                    {
                        Classes.LikedVideos Liked = new Classes.LikedVideos();

                        Liked.SV_Type_video = "Liked";
                        if (Settings.DarkTheme)
                        {
                            Liked.SV_BackgroundColor = "#bcbcbc";
                            Liked.SV_TextColor       = "#ffff";
                        }
                        else
                        {
                            Liked.SV_TextColor       = "#444";
                            Liked.SV_BackgroundColor = "#ffff";
                        }
                        //Data video
                        Liked.dv_id                 = Video.dv_id;
                        Liked.dv_video_id           = Video.dv_video_id;
                        Liked.dv_user_id            = Video.dv_user_id;
                        Liked.dv_title              = Video.dv_title;
                        Liked.dv_description        = Video.dv_description;
                        Liked.dv_Long_title         = Video.dv_Long_title;
                        Liked.dv_Long_description   = Video.dv_Long_description;
                        Liked.dv_thumbnail          = Video.dv_thumbnail;
                        Liked.dv_video_location     = Video.dv_video_location;
                        Liked.dv_youtube            = Video.dv_youtube;
                        Liked.dv_vimeo              = Video.dv_vimeo;
                        Liked.dv_daily              = Video.dv_daily;
                        Liked.dv_time               = Video.dv_time;
                        Liked.dv_time_date          = Video.dv_time_date;
                        Liked.dv_active             = Video.dv_active;
                        Liked.dv_tags               = Video.dv_tags;
                        Liked.dv_duration           = Video.dv_duration;
                        Liked.dv_size               = Video.dv_size;
                        Liked.dv_category_id        = Video.dv_category_id;
                        Liked.dv_views              = Video.dv_views;
                        Liked.dv_featured           = Video.dv_featured;
                        Liked.dv_registered         = Video.dv_registered;
                        Liked.dv_org_thumbnail      = Video.dv_org_thumbnail;
                        Liked.dv_video_type         = Video.dv_video_type;
                        Liked.dv_video_id_          = Video.dv_video_id_;
                        Liked.dv_source             = Video.dv_source;
                        Liked.dv_url                = Video.dv_url;
                        Liked.dv_edit_description   = Video.dv_edit_description;
                        Liked.dv_markup_description = Video.dv_markup_description;
                        Liked.dv_is_liked           = Video.dv_is_liked;
                        Liked.dv_is_disliked        = Video.dv_is_disliked;
                        Liked.dv_is_owner           = Video.dv_is_owner;
                        Liked.dv_time_alpha         = Video.dv_time_alpha;
                        Liked.dv_time_ago           = Video.dv_time_ago;
                        Liked.dv_category_name      = Video.dv_category_name;

                        //Owner
                        Liked.Owner_id         = Video.Owner_id;
                        Liked.Owner_username   = Video.Owner_username;
                        Liked.Owner_email      = Video.Owner_email;
                        Liked.Owner_first_name = Video.Owner_first_name;
                        Liked.Owner_last_name  = Video.Owner_last_name;
                        Liked.Owner_gender     = Video.Owner_gender;
                        Liked.Owner_language   = Video.Owner_language;
                        Liked.Owner_avatar     = Video.Owner_avatar;
                        Liked.Owner_cover      = Video.Owner_cover;
                        Liked.Owner_about      = Video.Owner_about;
                        Liked.Owner_google     = Video.Owner_google;
                        Liked.Owner_facebook   = Video.Owner_facebook;
                        Liked.Owner_twitter    = Video.Owner_twitter;
                        Liked.Owner_verified   = Video.Owner_verified;
                        Liked.Owner_is_pro     = Video.Owner_is_pro;
                        Liked.Owner_url        = Video.Owner_url;

                        Classes.LikedVideosList.Add(Liked);
                    }
                    LikedVideosListView.EndRefresh();
                    LikedVideosListView.IsVisible   = true;
                    EmptyPage.IsVisible             = false;
                    LikedVideosListView.ItemsSource = Classes.LikedVideosList;
                }
                else
                {
                    LikedVideosListView.EndRefresh();
                    EmptyPage.IsVisible           = true;
                    LikedVideosListView.IsVisible = false;
                }
            }
            catch (Exception ex)
            {
                LikedVideosListView.EndRefresh();
                var exception = ex.ToString();
                LikedVideosListView.IsVisible = false;
                EmptyPage.IsVisible           = true;
            }
        }