예제 #1
0
        public TabItem AddTabProfilePage(AuthorProfile auth)
        {
            int count = _tabItems.Count;

            counter++;
            temp++;
            // create new tab item
            TabItem tab = new TabItem();

            tab.Header         = string.Format(auth.getName());
            tab.Name           = string.Format("tab{0}", counter);
            tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate;

            tab.Background  = new SolidColorBrush(Color.FromRgb(230, 234, 238));
            tab.BorderBrush = Brushes.LightGray;
            tab.MinWidth    = 100;
            tab.Width       = 150;
            tab.MaxWidth    = 150;



            StackPanel g = new StackPanel();

            g            = auth.authorProfile;
            auth.Content = null;
            tab.Content  = g;
            _tabItems.Insert(count - 1, tab);

            return(tab);
        }
예제 #2
0
        public void showStats()
        {
            AuthorProfile auth = new AuthorProfile();
            Author        aut  = (Author)this.type;

            auth.setInstitute(aut.getinstitute());
            auth.setName(type.getname());
            auth.setCitations(type.getnumPapers());
            auth.setHIndex(type.gethIndex());
            auth.setTotal(resultList.getCount().ToString());
            auth.setCitesPaper(String.Format("{0:F3}", (((double)type.getnumPapers() / resultList.getCount()))));
            auth.setIIndex(type.getiIndex());
            auth.setInterests(System.Net.WebUtility.HtmlDecode(aut.getresArea()));
            auth.setPicture(this.statsUrl);

            mw.tabDynamic.DataContext = null;
            TabItem tab = mw.AddTabProfilePage(auth);

            mw.tabDynamic.DataContext = mw._tabItems;

            // select newly added tab item
            mw.tabDynamic.SelectedItem = tab;
        }
예제 #3
0
        public void showStats()
        {
            AuthorProfile auth = new AuthorProfile();
            Author aut = (Author)this.type;
            auth.setInstitute(aut.getinstitute());
            auth.setName(type.getname());
            auth.setCitations(type.getnumPapers());
            auth.setHIndex(type.gethIndex());
            auth.setTotal(resultList.getCount().ToString());
            auth.setCitesPaper(String.Format("{0:F3}",(((double)type.getnumPapers() / resultList.getCount()))));
            auth.setIIndex(type.getiIndex());
            auth.setInterests(System.Net.WebUtility.HtmlDecode(aut.getresArea()));
            auth.setPicture(this.statsUrl);

            mw.tabDynamic.DataContext = null;
            TabItem tab = mw.AddTabProfilePage(auth);
            mw.tabDynamic.DataContext = mw._tabItems;

            // select newly added tab item
            mw.tabDynamic.SelectedItem = tab;
        }