static void Resize(RawRectangleF m) { if (margin.Left == m.Left) { if (margin.Right == m.Right) { if (margin.Top == m.Top) { if (margin.Bottom == m.Bottom) { return; } } } } margin = m; float w = m.Right - m.Left; float h = m.Bottom - m.Top; videolist.Size = new Size2F(140, h); videolist.ItemWidth = 136; videolist.ItemHeight = 100; DataModA.ReSize(videolist.ItemTemplate, new Size2F(136, 100)); videolist.Location = new Vector2(m.Right - 140, m.Top); m.Right -= 140; ReSizeInfoPanel(m); }
public static void GetPageList(ref char[] c_buff, List <DX.BindingMod> lic) { int s = FindCharArray(ref c_buff, ref Key_mod_playlist, 0); if (s < 0) { return; } s = FindCharArray(ref c_buff, ref Key_list_itemA, s); int e = FindCharArray(ref c_buff, ref Key_ul_e, s); int c; while (s > 0) { DataModA ic = new DataModA(); c = FindCharArray(ref c_buff, ref Key_href, s); char[] href = FindCharArrayA(ref c_buff, '\"', '\"', ref c); int a = FindCharArray(ref href, ref Key_vidA, 0); if (a > 0) { ic.vid = new string(CopyCharArry(ref href, a, href.Length - a)); } else { goto label0; } //ic.href = "http://v.qq.com" + new string(href); c = FindCharArray(ref c_buff, ref Key_src, c); char[] t = FindCharArrayA(ref c_buff, '\"', '\"', ref c); if (FindCharArray(ref t, ref Key_http, 0) > -1) { ic.src = new string(t); } else { ic.src = "http:" + new string(t); } c = FindCharArray(ref c_buff, ref Key_alt, c); ic.Title = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref c)); lic.Add(ic); label0 :; s = FindCharArray(ref c_buff, ref Key_list_itemA, c); if (s > e) { break; } } }
public static void GetCoverList(ref char[] c_buff, List <DX.BindingMod> lic, int start, int ec) { int e = FindCharArray(ref c_buff, ref Key_listinfoE, start); if (e < 0) { e = c_buff.Length; } int s = start; s = FindCharArray(ref c_buff, ref Key_data, s); s = FindCharArray(ref c_buff, ref Key_vidB, s, e); int index = ec; int count = 0; while (s > 0) { DataModA ic = new DataModA(); ic.vid = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref s)); s = FindCharArray(ref c_buff, ref Key_titleA, s); s++; ic.Title = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref s)); s = FindCharArray(ref c_buff, ref Key_preview, s); if (s < 0) { break; } char[] t = FindCharArrayA(ref c_buff, '\"', '\"', ref s); if (FindCharArray(ref t, ref Key_http, 0) > -1) { ic.src = new string(t); } else { ic.src = "http:" + new string(t); } if (count >= index) { lic.Add(ic); } s = FindCharArray(ref c_buff, ref Key_vidB, s, e); count++; } }
static void CreatePage(SwapChain p, RawRectangleF m) { if (panel == null) { panel = new UIViewPort(); } parent = p; lep = new List <FilterOption>(); videolist = new StackPanel(); videolist.ItemTemplate = DataModA.CreateDataMod(); videolist.BorderColor = new RawColor4(0f, 0f, 0f, 1); videolist.ItemClick = videolist.SelectChanged = (v) => { var sp = v as StackPanel; int c = sp.SelectedIndex; PlayControl((sp.Data[c] as DataModA).vid); }; CreateInfoPanel(); Resize(m); lock (p.DX_Child) p.DX_Child.Add(videolist); }
public static void GetListInfo(ref char[] c_buff, List <DX.BindingMod> data, int s) { int t = FindCharArray(ref c_buff, ref Key_listinfo, s); if (t < 0) { return; } int e = FindCharArray(ref c_buff, ref Key_listinfoE, t); t = FindCharArray(ref c_buff, ref Key_data, t); t = FindCharArray(ref c_buff, ref Key_vidB, t, e); while (t > 0) { DataModA ei = new DataModA(); ei.vid = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_duration, t); t++; ei.src = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_titleA, t); t++; ei.Title = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_preview, t); char[] c = FindCharArrayA(ref c_buff, '\"', '\"', ref t); if (c[0] != 'h') { ei.src = "http:" + new string(c); } else { ei.src = new string(c); } t = FindCharArray(ref c_buff, ref Key_vidB, t, e); data.Add(ei); } }
public static ImageContext Des_PlayPage(char[] c_buff, List <FilterOption> lep, List <DX.BindingMod> lid) { c_buff = DeleteChar(ref c_buff, '\\'); ImageContext ic = new ImageContext(); int s = FindCharArray(ref c_buff, ref Key_mod_video_info, 0); if (s < 0) { return(ic); } int e = FindCharArray(ref c_buff, ref Key_section_e, s); int t = FindCharArray(ref c_buff, ref Key_video_tit, s); string str = ""; if (t > 0) { ic.title = new string(FindCharArrayA(ref c_buff, '>', '<', ref t)) + "\r\n"; s = t; } t = FindCharArray(ref c_buff, ref Key_video_types, s); if (t > 0) { str += new string(FindCharArrayA(ref c_buff, '>', '<', ref t)) + "\r\n"; s = t; } for (int i = 0; i < 3; i++) { t = FindCharArray(ref c_buff, ref Key_intro_line, s); if (t > 0) { str += new string(FindCharArrayA(ref c_buff, '>', '<', ref t)) + "\r\n"; s = t; } else { break; } } ic.detail = str; t = FindCharArray(ref c_buff, ref Key_mod_sideslip_episodes, s); if (t > 0) { FilterOption ep = new FilterOption(); e = FindCharArray(ref c_buff, ref Key_section_e, t); int c = 1; while (t > 0) { t = FindCharArray(ref c_buff, ref Key_li, s, e); if (t < 0) { break; } t = FindCharArray(ref c_buff, ref Key_vidA, t); ep.Code = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); int le = FindCharArray(ref c_buff, ref Key_a_e, t); t = FindCharArray(ref c_buff, ref Key_i, t, le); if (t > 0) { ep.Content = c.ToString() + new string(FindCharArrayA(ref c_buff, '>', '<', ref t)); } else { ep.Content = c.ToString(); } c++; s = le; lep.Add(ep); } } t = FindCharArray(ref c_buff, ref Key_video, s); if (t > 0) { t = FindCharArray(ref c_buff, ref Key_vidB, t); ic.vid = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_pic, t); t = FindCharArray(ref c_buff, ':', t); ic.src = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); s = t; } t = FindCharArray(ref c_buff, ref Key_clips, s); if (t > 0) { DataModA ida = new DataModA(); e = FindCharArray(ref c_buff, ref Key_m_e, t); while (t > 0) { t = FindCharArray(ref c_buff, ref Key_vidB, s, e); if (t < 0) { break; } if (e - s < 200) { break; } ida.vid = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_titleA, t); t++; ida.Title = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); t = FindCharArray(ref c_buff, ref Key_pic, t); t = FindCharArray(ref c_buff, ':', t); ida.src = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref t)); int le = FindCharArray(ref c_buff, '}', t); s = le; le = FindCharArray(ref c_buff, ref Key_duration, t, s); if (le > 0) { le++; //ida.href = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref le)); } //else ida.href = null; lid.Add(ida); } } return(ic); }