Exemple #1
0
 static void SetNav(int index)
 {
     if (loading)
     {
         return;
     }
     loading = true;
     if (sp != null)
     {
         if (sp.Data != null)
         {
             if (index < 6)
             {
                 ReSizeItemMod(0);
             }
             else
             {
                 ReSizeItemMod(1);
             }
         }
     }
     nav_index = index;
     if (index >= 0)
     {
         WebClass.TaskGet(nav_data[nav_index].href + GetFilter(), AnalyzeEx);
     }
 }
Exemple #2
0
 static void back_click(object o, object e)
 {
     if (start > 0)
     {
         start--;
         nb.pagecount.Text = start.ToString();
         WebClass.TaskGet(GetAdress(), AnalyzeEx);
     }
 }
Exemple #3
0
 static void SetNav(int index)
 {
     nav_index = index;
     filter    = "";
     start     = 0;
     if (index >= 0)
     {
         WebClass.TaskGet(GetAdress(), AnalyzeEx);
     }
 }
Exemple #4
0
        static void GetHotComment(string sid)
        {
            if (loadH)
            {
                return;
            }
            loadH = true;
            string url = "https://coral.qq.com/article/" + cid + "/hotcomment?reqnum=20&commentid=" + sid;

            WebClass.TaskGet(url, AnalyHotComment, "http://v.qq.com/txyp/coralComment_yp_1.0.htm");
        }
Exemple #5
0
        static void GetComment(string sid)
        {
            if (loadC)
            {
                return;
            }
            loadC = true;
            string url = "http://coral.qq.com/article/" + cid + "/comment?otype=xml&reqnum=20&commentid=" + sid;

            WebClass.TaskGet(url, AnalyComment, "http://v.qq.com/txyp/coralComment_yp_1.0.htm");
        }
Exemple #6
0
        static void GetUpComment(string sid)
        {
            if (loadU)
            {
                return;
            }
            loadU = true;
            string url = "https://video.coral.qq.com/filmreviewr/c/upcomment/" + pid + "reqnum=10";

            if (sid != null)
            {
                url += "&commentid=" + sid;
            }
            WebClass.TaskGet(url, AnalyUpComment, "http://v.qq.com/txyp/coralComment_yp_1.0.htm");
        }
Exemple #7
0
        static void LoadComment(string vid)
        {
            if (vid == null)
            {
                return;
            }
            char[] c = site.ToCharArray();
            int    t = FallFindCharArray(ref c, '/', c.Length - 1);

            t--;
            pid   = new string(FindCharArrayA(ref c, '/', '.', ref t)) + "?";
            loadC = false;
            string cc = "http://ncgi.video.qq.com/fcgi-bin/video_comment_id?otype=json&op=3&vid=" + vid;

            WebClass.TaskGet(cc, TaskCid, "http://v.qq.com/x/cover/k8m3u2xb0nk9eee/t0327opjakl.html");
        }
Exemple #8
0
        static void Tool_KeyDown(object o, KeyRoutedEventArgs e)
        {
            if (nb.pagecount.Text.Length >= 3)
            {
                e.Handled = true;
                return;
            }
            if (e.Key == VirtualKey.Enter)
            {
                start = Convert.ToInt32(nb.pagecount.Text);
                WebClass.TaskGet(GetAdress(), AnalyzeEx);
                return;
            }
            int c = (int)e.Key;

            if (c < 48 || c > 57)
            {
                e.Handled = true;
            }
        }
Exemple #9
0
 static void forward_click(object o, object e)
 {
     start++;
     nb.pagecount.Text = start.ToString();
     WebClass.TaskGet(GetAdress(), AnalyzeEx);
 }
Exemple #10
0
        static void CreateNavBar()
        {
            if (nb.can != null)
            {
                nb.can.Visibility = Visibility.Visible;
                return;
            }
            nb = new NavBar();
            fp = new Canvas();
#if phone
            fp.Background = Component.bk_brush;
#endif
            Canvas can = new Canvas();
            nb.can = can;
            parent.Children.Add(can);
            parent.Children.Add(fp);
            nb.order        = new ListBoxH();
            nb.order.Margin = new Thickness(0, 40, 0, 0);
            nb.order.GetListBox.Foreground = Component.filter_brush;
            ListBox lb = nb.order.GetListBox;
            lb.SelectionChanged += (o, e) => {
                order_index = nb.order.GetListBox.SelectedIndex;
                WebClass.TaskGet(GetAdress(), AnalyzeEx);
            };
            lb.Items.Add(order_4[Component.language]);
            lb.Items.Add(order_5[Component.language]);
            lb.Items.Add(order_6[Component.language]);

            nb.button = new TextBlock[5];
            TextBlock b;
            for (int i = 0; i < 5; i++)
            {
                b                 = new TextBlock();
                nb.button[i]      = b;
                b.Margin          = new Thickness(but_dx[i], 8, 0, 0);
                b.Text            = nav_content[i][Component.language];
                b.Foreground      = Component.nav_brush;
                b.PointerPressed += reh[i];
                can.Children.Add(b);
            }
            nb.pagecount          = new TextBox();
            nb.pagecount.Margin   = new Thickness(110, 0, 0, 0);
            nb.pagecount.Text     = "0";
            nb.pagecount.KeyDown += Tool_KeyDown;
            nb.nav                   = new ListBox();
            nb.nav.Margin            = new Thickness(0, 90, 0, 0);
            nb.nav.Visibility        = Visibility.Collapsed;
            nb.nav.Background        = Component.bk_brush;
            nb.nav.Foreground        = Component.nav_brush;
            nb.pagecount.Foreground  = Component.font_brush;
            nb.nav.SelectionChanged += (o, e) => {
                nb.filter_change = true;
                SetNav(nb.nav.SelectedIndex);
                nb.pagecount.Text = "0";
#if phone
                nb.nav.Visibility = Visibility.Collapsed;
#endif
            };
            can.Children.Add(nb.order);
            can.Children.Add(nb.pagecount);
            can.Children.Add(nb.nav);
            buff_fim         = new FilterItemMod[8];
            nb.filter_change = true;
        }
Exemple #11
0
        public static void Create(Canvas p, Thickness m)
        {
            if (sv != null)
            {
                sv.Show();
                ReSize(m);
                return;
            }
            task1 = load1 = false;
            WebClass.TaskGet("http://m.v.qq.com/index.html", (o) => {
                data1 = o;
                if (task1)
                {
                    ParseData.AnalyzeData(o.ToCharArray(), ref sv.area);
                    sv.Refresh();
                }
                else
                {
                    load1 = true;
                }
            });
            margin = m;
            sv     = new Scroll_ex();
#if desktop
            sv.maxcolumn = 5;
#else
            sv.maxcolumn = 4;
            sv.Lock      = MainEx.LockPivot;
            sv.UnLock    = MainEx.UnLockPivot;
#endif
            sv.UsingCustomTitle = true;
            sv.ForceUpdateOnce  = true;
            sv.area             = new Area_m[nav_all.Length];
            sv.ItemClick        = (o) => {
                if (o != null)
                {
                    VideoPage.SetAdress(o as string);
                    PageManageEx.CreateNewPage(PageTag.videopage);
                }
            };
            sv.PageClick = (o) => {
                PageAddress t = (PageAddress)o;
                if (t != PageAddress.None)
                {
                    PartialNav.LoadPage(t);
                    PageManageEx.CreateNewPage(PageTag.partial);
                }
            };
            for (int i = 0; i < nav_all.Length; i++)
            {
                int c = nav_all[i].count;
                sv.area[i].page  = nav_all[i].page;
                sv.area[i].title = nav_all[i].title;
                sv.area[i].count = c;
                sv.area[i].data  = new ItemData_m[c];
            }
            sv.ReSize(m);
            sv.SetParent(p);
            task1 = true;
            if (load1)
            {
                ParseData.AnalyzeData(data1.ToCharArray(), ref sv.area);
                sv.Refresh();
                load1 = false;
            }
        }