public void initializationVLC() { Form A = new Form(); A.Size = new Size(720, 480); A.Text = (CurrentlyStream).ToString(); A.Name = (CurrentlyStream).ToString(); A.Icon = new Icon("./DDTV.ico"); FSize.Add(new Size(720, 480)); FM.Add(A); PictureBox p = new PictureBox();//实例化一个照片框 p.BackColor = Color.Black; FM[0].Controls.Add(p);//添加到当前窗口集合中 p.Size = new Size(A.Width - WindowTopLeft.X - 20, A.Height - WindowTopLeft.Y - 42); p.Location = WindowTopLeft; PBOX.Add(p); RInfo.Add(new RoomInfo { Name = "初始化", RoomNumber = "-1", steam = "初始化", Ty = false }); VLCPlayer vlcPlayer = new VLCPlayer(); VLC.Add(vlcPlayer); A.ResizeEnd += A_ResizeEnd; }
/// <summary> /// 创建播放列表,新建一个播放窗口 /// </summary> /// <param name="标题"></param> public void NewLiveWindow(string 标题) { streamNumber++; liveIndex.Items.Remove("添加一个新监控"); liveIndex.Items.Add((streamNumber - 1).ToString()); //选择直播.Items.Add("添加一个新监控"); CurrentlyStream = streamNumber; int TS1 = CurrentlyStream; int TS2 = TS1 - 1; liveIndex.Text = (TS2).ToString(); { Form A = new Form(); A.Size = playWindowDefaultSize; //A.Text = "DDTV-" + (当前选择的直播流).ToString() + " 当前直播的节目是:" + 标题; A.Icon = new Icon("./DDTV.ico"); A.Show(); A.Name = (CurrentlyStream).ToString(); A.KeyPreview = true; A.ResizeEnd += A_ResizeEnd; A.Activated += A_Activated; A.FormClosing += A_FormClosing; A.Move += A_Move; A.MouseWheel += A_MouseWheel; A.KeyDown += A_KeyDown; A.MouseMove += A_MouseMove; FM.Add(A); FSize.Add(playWindowDefaultSize); PictureBox p = new PictureBox(); //实例化一个照片框 p.BackColor = Color.Black; FM[CurrentlyStream].Controls.Add(p); //添加到当前窗口集合中 p.Size = new Size(A.Width - WindowTopLeft.X - 20, A.Height - WindowTopLeft.Y - 42); p.Location = WindowTopLeft; PBOX.Add(p); VLCPlayer vlcPlayer = new VLCPlayer(); VLC.Add(vlcPlayer); TopInfo.Checked = false; } }
/// <summary> /// 创建播放列表,新建一个播放窗口 /// </summary> /// <param name="标题"></param> public void 新建一个直播监听(string 标题) { 直播流的数量++; 择直播.Items.Remove("添加一个新监控"); 择直播.Items.Add((直播流的数量 - 1).ToString()); //选择直播.Items.Add("添加一个新监控"); 当前选择的直播流 = 直播流的数量; int TS1 = 当前选择的直播流; int TS2 = TS1 - 1; 择直播.Text = (TS2).ToString(); { Form A = new Form(); A.Size = 播放窗体默认大小; //A.Text = "DDTV-" + (当前选择的直播流).ToString() + " 当前直播的节目是:" + 标题; A.Icon = new Icon("./DDTV.ico"); A.Show(); A.Name = (当前选择的直播流).ToString(); A.ResizeEnd += A_ResizeEnd; A.Activated += A_Activated; A.FormClosing += A_FormClosing; A.Move += A_Move; A.MouseWheel += A_MouseWheel;; FM.Add(A); FSize.Add(播放窗体默认大小); PictureBox p = new PictureBox(); //实例化一个照片框 p.BackColor = Color.Black; FM[当前选择的直播流].Controls.Add(p); //添加到当前窗口集合中 p.Size = new Size(A.Width - 界面左上角坐标.X - 20, A.Height - 界面左上角坐标.Y - 42); p.Location = 界面左上角坐标; PBOX.Add(p); VLCPlayer vlcPlayer = new VLCPlayer(); VLC.Add(vlcPlayer); } }