Example #1
0
        //Get WatchLater Videos in Database
        public void WatchLater()
        {
            try
            {
                Classes.WatchLaterVideosList.Clear();

                var WatchLater = SQL_Commander.Get_WatchLaterVideos_Credentials();
                if (Classes.WatchLaterVideosList != null)
                {
                    foreach (var Video in WatchLater)
                    {
                        Classes.WatchLaterVideos watch = new Classes.WatchLaterVideos();

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

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

                        Classes.WatchLaterVideosList.Add(watch);
                    }
                    WatchLaterListView.EndRefresh();
                    WatchLaterListView.IsVisible   = true;
                    EmptyPage.IsVisible            = false;
                    WatchLaterListView.ItemsSource = Classes.WatchLaterVideosList;
                }
                else
                {
                    WatchLaterListView.EndRefresh();
                    EmptyPage.IsVisible          = true;
                    WatchLaterListView.IsVisible = false;
                }
            }
            catch (Exception ex)
            {
                WatchLaterListView.EndRefresh();
                var exception = ex.ToString();
                WatchLaterListView.IsVisible = false;
                EmptyPage.IsVisible          = true;
            }
        }