Ejemplo n.º 1
0
 private void RefreshFavorite(IContentGroup favorite)
 {
     if (favorite == null)
     {
         return;
     }
     favorite.Refresh();
 }
Ejemplo n.º 2
0
        private void updateRightSidePanel2(IContentGroup group)
        {
            var isOnAir = ClientFramework.Client.Default.IsOnAir(group);

            rspRightSidePane2.tbtnHomeSharing.IsEnabled = ClientFramework.Client.Default.HomeSharingEnabled;
            rspRightSidePane2.tbtnHomeSharing.IsChecked = isOnAir;

            rspRightSidePane2.tbtnCloudSharing.IsChecked = (group as BunnyLabelContentGroup).ShareEnabled;

            rspRightSidePane2.tbxShareLink.Text = (lblContentLocation.DataContext as BunnyLabelContentGroup).ShareURL;
        }
Ejemplo n.º 3
0
        public bool IsOnAir(IContentGroup group)
        {
            using (var conn = BunnyDB.CreateConnection())
            {
                conn.Open();
                using (var cmd = conn.CreateCommand())
                {
                    cmd.CommandText = "select on_air from [Labels] where label_id = @label";
                    cmd.Parameters.Add(new SQLiteParameter("@label", new Guid(group.ID)));
                    var on_air = cmd.ExecuteScalar();

                    return(on_air != null && (bool)on_air);
                }
            }
        }
Ejemplo n.º 4
0
        private void SetContentTypeCount(IContentGroup group)
        {
            lblContentTypeCount.Content = string.Format("{0} photos {1} videos",
                                                        group.Contents.Count(item =>
            {
                var content = item as IContent;
                if (content == null)
                {
                    return(false);
                }

                return(content.Type == ContentType.Photo);
            }),
                                                        group.Contents.Count(item =>
            {
                var content = item as IContent;
                if (content == null)
                {
                    return(false);
                }

                return(content.Type == ContentType.Video);
            }));
        }