//Get History Videos in Database public void HistoryVideos() { try { Classes.HistoryVideosList.Clear(); var HistoryVideos = SQL_Commander.Get_HistoryVideos_Credentials(); if (Classes.HistoryVideosList != null) { Classes.HistoryList = HistoryVideos; int x = 0; foreach (var Video in HistoryVideos) { if (x < 16) { Classes.HistoryVideos History = new Classes.HistoryVideos(); History.SV_Type_video = "History"; if (Settings.DarkTheme) { History.SV_BackgroundColor = "#bcbcbc"; History.SV_TextColor = "#ffff"; } else { History.SV_TextColor = "#444"; History.SV_BackgroundColor = "#ffff"; } //Data video History.dv_id = Video.dv_id; History.dv_video_id = Video.dv_video_id; History.dv_user_id = Video.dv_user_id; History.dv_title = Video.dv_title; History.dv_description = Video.dv_description; History.dv_Long_title = Video.dv_Long_title; History.dv_Long_description = Video.dv_Long_description; History.dv_thumbnail = Video.dv_thumbnail; History.dv_video_location = Video.dv_video_location; History.dv_youtube = Video.dv_youtube; History.dv_vimeo = Video.dv_vimeo; History.dv_daily = Video.dv_daily; History.dv_time = Video.dv_time; History.dv_time_date = Video.dv_time_date; History.dv_active = Video.dv_active; History.dv_tags = Video.dv_tags; History.dv_duration = Video.dv_duration; History.dv_size = Video.dv_size; History.dv_category_id = Video.dv_category_id; History.dv_views = Video.dv_views; History.dv_featured = Video.dv_featured; History.dv_registered = Video.dv_registered; History.dv_org_thumbnail = Video.dv_org_thumbnail; History.dv_video_type = Video.dv_video_type; History.dv_video_id_ = Video.dv_video_id_; History.dv_source = Video.dv_source; History.dv_url = Video.dv_url; History.dv_edit_description = Video.dv_edit_description; History.dv_markup_description = Video.dv_markup_description; History.dv_is_liked = Video.dv_is_liked; History.dv_is_disliked = Video.dv_is_disliked; History.dv_is_owner = Video.dv_is_owner; History.dv_time_alpha = Video.dv_time_alpha; History.dv_time_ago = Video.dv_time_ago; History.dv_category_name = Video.dv_category_name; //Owner History.Owner_id = Video.Owner_id; History.Owner_username = Video.Owner_username; History.Owner_email = Video.Owner_email; History.Owner_first_name = Video.Owner_first_name; History.Owner_last_name = Video.Owner_last_name; History.Owner_gender = Video.Owner_gender; History.Owner_language = Video.Owner_language; History.Owner_avatar = Video.Owner_avatar; History.Owner_cover = Video.Owner_cover; History.Owner_about = Video.Owner_about; History.Owner_google = Video.Owner_google; History.Owner_facebook = Video.Owner_facebook; History.Owner_twitter = Video.Owner_twitter; History.Owner_verified = Video.Owner_verified; History.Owner_is_pro = Video.Owner_is_pro; History.Owner_url = Video.Owner_url; Classes.HistoryVideosList.Add(History); x++; } } HistoryVideosListView.EndRefresh(); HistoryVideosListView.IsVisible = true; EmptyPage.IsVisible = false; HistoryVideosListView.ItemsSource = Classes.HistoryVideosList; } else { HistoryVideosListView.EndRefresh(); EmptyPage.IsVisible = true; HistoryVideosListView.IsVisible = false; } } catch (Exception ex) { HistoryVideosListView.EndRefresh(); var exception = ex.ToString(); HistoryVideosListView.IsVisible = false; EmptyPage.IsVisible = true; } }