Exemplo n.º 1
0
        public UIElement CreateListPanel(TwitterList list)
        {
            var s = new StackPanel();
            var si = new StackPanel();
            s.Orientation = Orientation.Horizontal;
            Image img = new Image { Width = 36, Height = 36 };
            BitmapImage bi = new BitmapImage(new Uri(list.User.ProfileImageUrlHttps));
            img.Source = bi;
            s.Children.Add(img);

            var ti = new TextBlock { FontSize = 20 };
            ti.Text = (list.Mode == "private" ? "*" : "") + list.Name;
            ti.TextWrapping = TextWrapping.Wrap;
            var de = new TextBlock { Foreground = Brushes.Gray };
            de.Text = list.Description;
            de.TextWrapping = TextWrapping.Wrap;
            var cn = new TextBlock();
            cn.Text = list.MemberCount.ToString() + "人が追加されています";
            si.Children.Add(ti);
            si.Children.Add(cn);
            si.Children.Add(de);
            s.Children.Add(si);
            s.Tag = list;
            return s;
        }
Exemplo n.º 2
0
 public TwitterListExtended(TwitterList lst)
 {
     Type theType = typeof(TwitterList);
     System.Reflection.PropertyInfo[] properties = theType.GetProperties();
     foreach (System.Reflection.PropertyInfo property in properties)
     {
         System.Reflection.MethodInfo getMethod =
             property.GetGetMethod();
         System.Reflection.MethodInfo setMethod =
             property.GetSetMethod();
         object val = getMethod.Invoke(lst, null);
         object[] param = new object[] { val };
         setMethod.Invoke(this, param);
     }
 }
Exemplo n.º 3
0
        private dynamic ToExpando(TwitterList list)
        {
            dynamic x = new ExpandoObject();
            x.Description = list.Description;
            x.FullName = list.FullName;
            x.Id = list.Id;
            x.MemberCount = list.MemberCount;
            x.Mode = list.Mode;
            x.Rawsource = list.RawSource;
            x.Slug = list.Slug;
            x.SubscriberCount = list.SubscriberCount;
            x.Uri = list.Uri;

            return x;
        }
Exemplo n.º 4
0
        public UIElement CreateListPanel(TwitterList list, bool ic)
        {
            var s = new StackPanel();
            var si = new StackPanel();
            s.Orientation = Orientation.Horizontal;
            var ch = new CheckBox();
            ch.Margin = new Thickness(16);
            ch.IsChecked = ic;
            ch.Tag = ic;
            s.Children.Add(ch);

            var ti = new TextBlock { FontSize = 20 };
            ti.Text = (list.Mode == "private" ? "*" : "") + list.Name;
            ti.TextWrapping = TextWrapping.Wrap;
            var de = new TextBlock { Foreground = Brushes.Gray };
            de.Text = list.Description;
            de.TextWrapping = TextWrapping.Wrap;
            si.Children.Add(ti);
            si.Children.Add(de);
            s.Children.Add(si);
            s.Tag = list;
            return s;
        }