diff --git a/Tech/ArpUtil.cs b/Tech/ArpUtil.cs
index ce44949..643f72f 100644
--- a/Tech/ArpUtil.cs
+++ b/Tech/ArpUtil.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public class ArpUtil
{
diff --git a/Tech/Form1.Designer.cs b/Tech/Form1.Designer.cs
index 46ddbf1..1144f1c 100644
--- a/Tech/Form1.Designer.cs
+++ b/Tech/Form1.Designer.cs
@@ -1,4 +1,4 @@
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
partial class Form1
{
@@ -41,6 +41,7 @@
this.closeBtn = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -165,6 +166,7 @@
this.pictureBox4.TabIndex = 4;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click);
+ this.pictureBox4.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox4_MouseMove);
//
// pictureBox3
//
@@ -180,6 +182,8 @@
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
+ this.pictureBox3.MouseLeave += new System.EventHandler(this.pictureBox3_MouseLeave);
+ this.pictureBox3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox3_MouseMove);
//
// closeBtn
//
@@ -246,6 +250,8 @@
this.ResumeLayout(false);
}
+ private System.Windows.Forms.ColorDialog colorDialog1;
+
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
diff --git a/Tech/Form1.cs b/Tech/Form1.cs
index 3f5f919..0c2a8ff 100644
--- a/Tech/Form1.cs
+++ b/Tech/Form1.cs
@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public partial class Form1 : Form
{
@@ -32,7 +32,8 @@ namespace PlumByteUI_Learn
private void button4_Click(object sender, EventArgs e)
{
- DialogResult dialogResult = MessageBox.Show(@"确定要退出吗?", @"确定退出?", MessageBoxButtons.OKCancel,MessageBoxIcon.Question);
+ DialogResult dialogResult =
+ MessageBox.Show(@"确定要退出吗?", @"确定退出?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dialogResult.Equals(DialogResult.OK))
{
System.Environment.Exit(0);
@@ -48,6 +49,7 @@ namespace PlumByteUI_Learn
{
container.Dispose();
}
+
this.panelContainer.Controls.Clear();
this.panelContainer.Controls.Add(playerView);
}
@@ -59,7 +61,8 @@ namespace PlumByteUI_Learn
private void pictureBox2_Click(object sender, EventArgs e)
{
- DialogResult dialogResult = MessageBox.Show(@"确定要退出吗?", @"确定退出?", MessageBoxButtons.OKCancel,MessageBoxIcon.Question);
+ DialogResult dialogResult =
+ MessageBox.Show(@"确定要退出吗?", @"确定退出?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dialogResult.Equals(DialogResult.OK))
{
System.Environment.Exit(0);
@@ -69,7 +72,6 @@ namespace PlumByteUI_Learn
private void pictureBox2_MouseHover(object sender, EventArgs e)
{
-
}
private void closeBtn_MouseHover(object sender, EventArgs e)
@@ -81,14 +83,17 @@ namespace PlumByteUI_Learn
{
closeBtn.BackColor = Color.FromArgb(0, 110, 255);
}
-
+
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
+
[DllImport("user32.dll")]
private static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+
private const int WM_SYSCOMMAND = 0x0112;
private const int SC_MOVE = 0xF010;
private const int HTCAPTION = 0x0002;
+
private void TopPanel_MouseDown(object sender, MouseEventArgs e)
{
ReleaseCapture();
@@ -97,7 +102,9 @@ namespace PlumByteUI_Learn
private void pictureBox3_Click(object sender, EventArgs e)
{
- this.WindowState = this.WindowState == FormWindowState.Maximized ? FormWindowState.Normal : FormWindowState.Maximized;
+ this.WindowState = this.WindowState == FormWindowState.Maximized
+ ? FormWindowState.Normal
+ : FormWindowState.Maximized;
this.panelContainer.Refresh();
}
@@ -110,5 +117,27 @@ namespace PlumByteUI_Learn
{
closeBtn.BackColor = Color.Crimson;
}
+
+ private void pictureBox3_MouseMove(object sender, MouseEventArgs e)
+ {
+ pictureBox3.BackColor = Color.FromArgb(0, 98, 229);
+ }
+
+
+ private void pictureBox4_MouseMove(object sender, MouseEventArgs e)
+ {
+ pictureBox4.BackColor = Color.FromArgb(0, 98, 229);
+ }
+
+ private void pictureBox3_MouseLeave(object sender, EventArgs e)
+ {
+ pictureBox3.BackColor = Color.FromArgb(0, 110, 255);
+ }
+
+
+ private void pictureBox4_MouseLeave(object sender, EventArgs e)
+ {
+ pictureBox4.BackColor = Color.FromArgb(0, 110, 255);;
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Tech/Form1.resx b/Tech/Form1.resx
index 73ad3be..5334a62 100644
--- a/Tech/Form1.resx
+++ b/Tech/Form1.resx
@@ -292,4 +292,7 @@
/wGqMOZppubid2iNIooNoDKTEnJhrttDSBAEQRAEQRAEQRD8ZE6n33Fuhf9TKD6wAAAAAElFTkSuQmCC
+
+ 17, 17
+
\ No newline at end of file
diff --git a/Tech/GetIPNetTable.cs b/Tech/GetIPNetTable.cs
index fb26166..3fdc9ba 100644
--- a/Tech/GetIPNetTable.cs
+++ b/Tech/GetIPNetTable.cs
@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Net;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public class GetIPNetTable
{
diff --git a/Tech/MultiPlayerView.Designer.cs b/Tech/MultiPlayerView.Designer.cs
index 7bf4bc1..a16e51f 100644
--- a/Tech/MultiPlayerView.Designer.cs
+++ b/Tech/MultiPlayerView.Designer.cs
@@ -1,6 +1,6 @@
using System.ComponentModel;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
partial class MultiPlayerView
{
diff --git a/Tech/MultiPlayerView.cs b/Tech/MultiPlayerView.cs
index b3c84a3..f5d114c 100644
--- a/Tech/MultiPlayerView.cs
+++ b/Tech/MultiPlayerView.cs
@@ -1,6 +1,6 @@
using System.Windows.Forms;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public partial class MultiPlayerView : UserControl
{
diff --git a/Tech/PlayerView.Designer.cs b/Tech/PlayerView.Designer.cs
index 1f92a6d..226388f 100644
--- a/Tech/PlayerView.Designer.cs
+++ b/Tech/PlayerView.Designer.cs
@@ -1,6 +1,6 @@
using System.ComponentModel;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
partial class PlayerView
{
@@ -33,6 +33,9 @@ namespace PlumByteUI_Learn
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlayerView));
this.panel1 = new System.Windows.Forms.Panel();
+ this.button9 = new System.Windows.Forms.Button();
+ this.button8 = new System.Windows.Forms.Button();
+ this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
@@ -40,12 +43,11 @@ namespace PlumByteUI_Learn
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
+ this.videoView = new LibVLCSharp.WinForms.VideoView();
this.vlcControl = new Vlc.DotNet.Forms.VlcControl();
- this.button7 = new System.Windows.Forms.Button();
- this.button8 = new System.Windows.Forms.Button();
- this.button9 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.videoView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.vlcControl)).BeginInit();
this.SuspendLayout();
//
@@ -67,20 +69,75 @@ namespace PlumByteUI_Learn
this.panel1.Size = new System.Drawing.Size(1000, 60);
this.panel1.TabIndex = 1;
//
+ // button9
+ //
+ this.button9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button9.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button9.FlatAppearance.BorderSize = 0;
+ this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.button9.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.button9.ForeColor = System.Drawing.Color.White;
+ this.button9.Image = ((System.Drawing.Image)(resources.GetObject("button9.Image")));
+ this.button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.button9.Location = new System.Drawing.Point(117, 0);
+ this.button9.Name = "button9";
+ this.button9.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.button9.Size = new System.Drawing.Size(39, 60);
+ this.button9.TabIndex = 8;
+ this.button9.Text = "4号";
+ this.button9.UseVisualStyleBackColor = false;
+ //
+ // button8
+ //
+ this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button8.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button8.FlatAppearance.BorderSize = 0;
+ this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.button8.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.button8.ForeColor = System.Drawing.Color.White;
+ this.button8.Image = ((System.Drawing.Image)(resources.GetObject("button8.Image")));
+ this.button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.button8.Location = new System.Drawing.Point(78, 0);
+ this.button8.Name = "button8";
+ this.button8.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.button8.Size = new System.Drawing.Size(39, 60);
+ this.button8.TabIndex = 7;
+ this.button8.Text = "3号";
+ this.button8.UseVisualStyleBackColor = false;
+ //
+ // button7
+ //
+ this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button7.Dock = System.Windows.Forms.DockStyle.Left;
+ this.button7.FlatAppearance.BorderSize = 0;
+ this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.button7.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.button7.ForeColor = System.Drawing.Color.White;
+ this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
+ this.button7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.button7.Location = new System.Drawing.Point(39, 0);
+ this.button7.Name = "button7";
+ this.button7.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.button7.Size = new System.Drawing.Size(39, 60);
+ this.button7.TabIndex = 6;
+ this.button7.Text = "2号";
+ this.button7.UseVisualStyleBackColor = false;
+ this.button7.Click += new System.EventHandler(this.button7_Click);
+ //
// button6
//
- this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.button6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button6.Dock = System.Windows.Forms.DockStyle.Left;
this.button6.FlatAppearance.BorderSize = 0;
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button6.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button6.ForeColor = System.Drawing.Color.White;
this.button6.Image = ((System.Drawing.Image)(resources.GetObject("button6.Image")));
this.button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button6.Location = new System.Drawing.Point(12, 14);
+ this.button6.Location = new System.Drawing.Point(0, 0);
this.button6.Name = "button6";
this.button6.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.button6.Size = new System.Drawing.Size(39, 40);
+ this.button6.Size = new System.Drawing.Size(39, 60);
this.button6.TabIndex = 5;
this.button6.Text = "1号";
this.button6.UseVisualStyleBackColor = false;
@@ -88,17 +145,17 @@ namespace PlumByteUI_Learn
//
// button5
//
- this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.button5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button5.Dock = System.Windows.Forms.DockStyle.Right;
this.button5.FlatAppearance.BorderSize = 0;
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button5.ForeColor = System.Drawing.Color.White;
this.button5.Image = ((System.Drawing.Image)(resources.GetObject("button5.Image")));
this.button5.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button5.Location = new System.Drawing.Point(773, 3);
+ this.button5.Location = new System.Drawing.Point(888, 0);
this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(50, 57);
+ this.button5.Size = new System.Drawing.Size(50, 60);
this.button5.TabIndex = 4;
this.button5.Text = "单画面";
this.button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
@@ -107,17 +164,17 @@ namespace PlumByteUI_Learn
//
// button4
//
- this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.button4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
+ this.button4.Dock = System.Windows.Forms.DockStyle.Right;
this.button4.FlatAppearance.BorderSize = 0;
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button4.ForeColor = System.Drawing.Color.White;
this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
this.button4.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button4.Location = new System.Drawing.Point(823, 3);
+ this.button4.Location = new System.Drawing.Point(938, 0);
this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(62, 57);
+ this.button4.Size = new System.Drawing.Size(62, 60);
this.button4.TabIndex = 3;
this.button4.Text = "复合画面";
this.button4.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
@@ -126,7 +183,7 @@ namespace PlumByteUI_Learn
//
// button3
//
- this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
+ this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
this.button3.FlatAppearance.BorderSize = 0;
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -144,7 +201,7 @@ namespace PlumByteUI_Learn
//
// button2
//
- this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
+ this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
this.button2.FlatAppearance.BorderSize = 0;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -162,7 +219,7 @@ namespace PlumByteUI_Learn
//
// button1
//
- this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -183,19 +240,31 @@ namespace PlumByteUI_Learn
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel2.Controls.Add(this.videoView);
this.panel2.Controls.Add(this.vlcControl);
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1000, 610);
this.panel2.TabIndex = 2;
//
+ // videoView
+ //
+ this.videoView.BackColor = System.Drawing.Color.Black;
+ this.videoView.Dock = System.Windows.Forms.DockStyle.Left;
+ this.videoView.Location = new System.Drawing.Point(0, 0);
+ this.videoView.MediaPlayer = null;
+ this.videoView.Name = "videoView";
+ this.videoView.Size = new System.Drawing.Size(500, 610);
+ this.videoView.TabIndex = 1;
+ this.videoView.Text = "videoView1";
+ //
// vlcControl
//
this.vlcControl.BackColor = System.Drawing.Color.WhiteSmoke;
- this.vlcControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.vlcControl.Location = new System.Drawing.Point(0, 0);
+ this.vlcControl.Dock = System.Windows.Forms.DockStyle.Right;
+ this.vlcControl.Location = new System.Drawing.Point(500, 0);
this.vlcControl.Name = "vlcControl";
- this.vlcControl.Size = new System.Drawing.Size(1000, 610);
+ this.vlcControl.Size = new System.Drawing.Size(500, 610);
this.vlcControl.Spu = -1;
this.vlcControl.TabIndex = 0;
this.vlcControl.Text = "vlcControl1";
@@ -203,60 +272,6 @@ namespace PlumByteUI_Learn
this.vlcControl.VlcMediaplayerOptions = null;
this.vlcControl.VlcLibDirectoryNeeded += new System.EventHandler(this.vlcControl_VlcLibDirectoryNeeded);
//
- // button7
- //
- this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
- this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
- this.button7.FlatAppearance.BorderSize = 0;
- this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button7.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button7.ForeColor = System.Drawing.Color.White;
- this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
- this.button7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button7.Location = new System.Drawing.Point(57, 14);
- this.button7.Name = "button7";
- this.button7.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.button7.Size = new System.Drawing.Size(39, 40);
- this.button7.TabIndex = 6;
- this.button7.Text = "2号";
- this.button7.UseVisualStyleBackColor = false;
- //
- // button8
- //
- this.button8.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
- this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
- this.button8.FlatAppearance.BorderSize = 0;
- this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button8.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button8.ForeColor = System.Drawing.Color.White;
- this.button8.Image = ((System.Drawing.Image)(resources.GetObject("button8.Image")));
- this.button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button8.Location = new System.Drawing.Point(102, 14);
- this.button8.Name = "button8";
- this.button8.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.button8.Size = new System.Drawing.Size(39, 40);
- this.button8.TabIndex = 7;
- this.button8.Text = "3号";
- this.button8.UseVisualStyleBackColor = false;
- //
- // button9
- //
- this.button9.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
- this.button9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(57)))), ((int)(((byte)(75)))));
- this.button9.FlatAppearance.BorderSize = 0;
- this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button9.Font = new System.Drawing.Font("宋体", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button9.ForeColor = System.Drawing.Color.White;
- this.button9.Image = ((System.Drawing.Image)(resources.GetObject("button9.Image")));
- this.button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button9.Location = new System.Drawing.Point(147, 14);
- this.button9.Name = "button9";
- this.button9.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.button9.Size = new System.Drawing.Size(39, 40);
- this.button9.TabIndex = 8;
- this.button9.Text = "4号";
- this.button9.UseVisualStyleBackColor = false;
- //
// PlayerView
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@@ -267,10 +282,13 @@ namespace PlumByteUI_Learn
this.Load += new System.EventHandler(this.PlayerView_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.videoView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.vlcControl)).EndInit();
this.ResumeLayout(false);
}
+ private LibVLCSharp.WinForms.VideoView videoView;
+
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
diff --git a/Tech/PlayerView.cs b/Tech/PlayerView.cs
index 5d2adfa..1e077b5 100644
--- a/Tech/PlayerView.cs
+++ b/Tech/PlayerView.cs
@@ -2,9 +2,10 @@
using System.IO;
using System.Reflection;
using System.Windows.Forms;
+using LibVLCSharp.Shared;
using Vlc.DotNet.Forms;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public partial class PlayerView : UserControl
{
@@ -106,13 +107,26 @@ namespace PlumByteUI_Learn
{
string[] options = { ":network-caching=10", ":rtsp-tcp"};// { ":network-caching=100", ":rtsp -tcp", ":no-audio" }; // --avcodec-hw={any,d3d11va,dxva2,none}
var videoUri = new Uri(@"rtsp://127.0.0.1:8554/rains");
+ vlcControl.Audio.IsMute = false;
vlcControl.Play(videoUri, options);
Console.WriteLine("播放rtsp视频");
+
}
private void vlcControl_Click_1(object sender, EventArgs e)
{
throw new System.NotImplementedException();
}
+
+ private void button7_Click(object sender, EventArgs e)
+ {
+ string[] options = { ":network-caching=10", ":rtsp-tcp"};// { ":network-caching=100", ":rtsp -tcp", ":no-audio" }; // --avcodec-hw={any,d3d11va,dxva2,none}
+ var videoUri = new Uri(@"rtsp://127.0.0.1:8554/rains2");
+ var libVlc = new LibVLC(enableDebugLogs: true);
+ var media = new Media(libVlc,videoUri,options);
+ var mediaPlayer = new MediaPlayer(media);
+ videoView.MediaPlayer = mediaPlayer;
+ videoView.MediaPlayer.Play();
+ }
}
}
\ No newline at end of file
diff --git a/Tech/Program.cs b/Tech/Program.cs
index 1479817..26acc46 100644
--- a/Tech/Program.cs
+++ b/Tech/Program.cs
@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows.Forms;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
static class Program
{
diff --git a/Tech/Properties/Resources.Designer.cs b/Tech/Properties/Resources.Designer.cs
index 78cf241..102203e 100644
--- a/Tech/Properties/Resources.Designer.cs
+++ b/Tech/Properties/Resources.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace PlumByteUI_Learn.Properties
+namespace Tech_Demo.Properties
{
@@ -44,7 +44,7 @@ namespace PlumByteUI_Learn.Properties
{
if ((resourceMan == null))
{
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PlumByteUI_Learn.Properties.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tech_Demo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/Tech/Properties/Settings.Designer.cs b/Tech/Properties/Settings.Designer.cs
index a80eab5..9a50eb5 100644
--- a/Tech/Properties/Settings.Designer.cs
+++ b/Tech/Properties/Settings.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace PlumByteUI_Learn.Properties
+namespace Tech_Demo.Properties
{
diff --git a/Tech/Tech.csproj b/Tech/Tech.csproj
index 3c3abe1..c35f179 100644
--- a/Tech/Tech.csproj
+++ b/Tech/Tech.csproj
@@ -6,7 +6,7 @@
AnyCPU
{ACFE594E-F51C-4B73-9661-0144FF9E33A3}
WinExe
- PlumByteUI_Learn
+ Tech_Demo
Tech
v4.7.2
512
@@ -33,8 +33,31 @@
4
+
+ ..\packages\LibVLCSharp.3.6.7\lib\net471\LibVLCSharp.dll
+
+
+ bin\Debug\LibVLCSharp.WinForms.dll
+
+
+ ..\packages\LibVLCSharp.WinForms.3.6.7\lib\net40\LibVLCSharp.WinForms.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
diff --git a/Tech/Tech.csproj.DotSettings b/Tech/Tech.csproj.DotSettings
index a6b0ef8..af85e25 100644
--- a/Tech/Tech.csproj.DotSettings
+++ b/Tech/Tech.csproj.DotSettings
@@ -1,2 +1,2 @@
- D:\develop\RiderProjects\UI-Design-in-C\PlumByteUI-Learn\packages\Vlc.DotNet.Forms.3.1.0\lib\net45\Vlc.DotNet.Forms.dll|
\ No newline at end of file
+ D:\develop\RiderProjects\UI-Design-in-C\PlumByteUI-Learn\packages\Vlc.DotNet.Forms.3.1.0\lib\net45\Vlc.DotNet.Forms.dll|Vlc.DotNet.Forms.VlcControl*D:\develop\RiderProjects\UI-Design-in-C\PlumByteUI-Learn\packages\LibVLCSharp.WinForms.3.6.7\lib\net40\LibVLCSharp.WinForms.dll|LibVLCSharp.WinForms.VideoView
\ No newline at end of file
diff --git a/Tech/UCOverview.Designer.cs b/Tech/UCOverview.Designer.cs
index ef986c6..ceb5dab 100644
--- a/Tech/UCOverview.Designer.cs
+++ b/Tech/UCOverview.Designer.cs
@@ -1,4 +1,4 @@
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
partial class UCOverview
{
diff --git a/Tech/UCOverview.cs b/Tech/UCOverview.cs
index 73e9650..3d467f1 100644
--- a/Tech/UCOverview.cs
+++ b/Tech/UCOverview.cs
@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-namespace PlumByteUI_Learn
+namespace Tech_Demo
{
public partial class UCOverview : UserControl
{
diff --git a/Tech/packages.config b/Tech/packages.config
index b19e24a..a8a95d2 100644
--- a/Tech/packages.config
+++ b/Tech/packages.config
@@ -1,5 +1,11 @@
+
+
+
+
+
+