Commit f71c8b62 by 陶然

部分方法实现

parent 6d9aad51
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
this.btnSwitch = new System.Windows.Forms.Button(); this.btnSwitch = new System.Windows.Forms.Button();
this.cbxResolution = new System.Windows.Forms.ComboBox(); this.cbxResolution = new System.Windows.Forms.ComboBox();
this.plVsp = new System.Windows.Forms.Panel(); this.plVsp = new System.Windows.Forms.Panel();
this.vspCamView = new Kivii.Sample.ImageUploader.Controls.VideoSourcePlayer();
this.plRight = new System.Windows.Forms.Panel(); this.plRight = new System.Windows.Forms.Panel();
this.gbPhotoList = new System.Windows.Forms.GroupBox(); this.gbPhotoList = new System.Windows.Forms.GroupBox();
this.flpPhotosTaken = new System.Windows.Forms.FlowLayoutPanel(); this.flpPhotosTaken = new System.Windows.Forms.FlowLayoutPanel();
...@@ -68,6 +67,7 @@ ...@@ -68,6 +67,7 @@
this.gbOperating = new System.Windows.Forms.GroupBox(); this.gbOperating = new System.Windows.Forms.GroupBox();
this.btnDelete = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button();
this.btnShot = new System.Windows.Forms.Button(); this.btnShot = new System.Windows.Forms.Button();
this.vspCamView = new Kivii.Sample.ImageUploader.Controls.VideoSourcePlayer();
this.plLeft.SuspendLayout(); this.plLeft.SuspendLayout();
this.gbSample.SuspendLayout(); this.gbSample.SuspendLayout();
this.gbLogin.SuspendLayout(); this.gbLogin.SuspendLayout();
...@@ -89,8 +89,9 @@ ...@@ -89,8 +89,9 @@
this.plLeft.Controls.Add(this.gbCamView); this.plLeft.Controls.Add(this.gbCamView);
this.plLeft.Dock = System.Windows.Forms.DockStyle.Left; this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.plLeft.Location = new System.Drawing.Point(0, 0); this.plLeft.Location = new System.Drawing.Point(0, 0);
this.plLeft.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.plLeft.Name = "plLeft"; this.plLeft.Name = "plLeft";
this.plLeft.Size = new System.Drawing.Size(287, 681); this.plLeft.Size = new System.Drawing.Size(430, 1022);
this.plLeft.TabIndex = 0; this.plLeft.TabIndex = 0;
// //
// gbSample // gbSample
...@@ -108,9 +109,11 @@ ...@@ -108,9 +109,11 @@
this.gbSample.Controls.Add(this.btnReportId); this.gbSample.Controls.Add(this.btnReportId);
this.gbSample.Controls.Add(this.tbxReportId); this.gbSample.Controls.Add(this.tbxReportId);
this.gbSample.Dock = System.Windows.Forms.DockStyle.Fill; this.gbSample.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbSample.Location = new System.Drawing.Point(0, 287); this.gbSample.Location = new System.Drawing.Point(0, 430);
this.gbSample.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbSample.Name = "gbSample"; this.gbSample.Name = "gbSample";
this.gbSample.Size = new System.Drawing.Size(287, 182); this.gbSample.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbSample.Size = new System.Drawing.Size(430, 274);
this.gbSample.TabIndex = 3; this.gbSample.TabIndex = 3;
this.gbSample.TabStop = false; this.gbSample.TabStop = false;
this.gbSample.Text = "查询样品"; this.gbSample.Text = "查询样品";
...@@ -119,9 +122,10 @@ ...@@ -119,9 +122,10 @@
// //
this.lbCurrentSampleQuantity.AutoSize = true; this.lbCurrentSampleQuantity.AutoSize = true;
this.lbCurrentSampleQuantity.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbCurrentSampleQuantity.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentSampleQuantity.Location = new System.Drawing.Point(56, 157); this.lbCurrentSampleQuantity.Location = new System.Drawing.Point(84, 236);
this.lbCurrentSampleQuantity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbCurrentSampleQuantity.Name = "lbCurrentSampleQuantity"; this.lbCurrentSampleQuantity.Name = "lbCurrentSampleQuantity";
this.lbCurrentSampleQuantity.Size = new System.Drawing.Size(97, 16); this.lbCurrentSampleQuantity.Size = new System.Drawing.Size(140, 24);
this.lbCurrentSampleQuantity.TabIndex = 18; this.lbCurrentSampleQuantity.TabIndex = 18;
this.lbCurrentSampleQuantity.Text = "__________"; this.lbCurrentSampleQuantity.Text = "__________";
// //
...@@ -129,9 +133,10 @@ ...@@ -129,9 +133,10 @@
// //
this.lbSampleQuantity.AutoSize = true; this.lbSampleQuantity.AutoSize = true;
this.lbSampleQuantity.Font = new System.Drawing.Font("宋体", 9F); this.lbSampleQuantity.Font = new System.Drawing.Font("宋体", 9F);
this.lbSampleQuantity.Location = new System.Drawing.Point(3, 161); this.lbSampleQuantity.Location = new System.Drawing.Point(4, 242);
this.lbSampleQuantity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbSampleQuantity.Name = "lbSampleQuantity"; this.lbSampleQuantity.Name = "lbSampleQuantity";
this.lbSampleQuantity.Size = new System.Drawing.Size(59, 12); this.lbSampleQuantity.Size = new System.Drawing.Size(89, 18);
this.lbSampleQuantity.TabIndex = 17; this.lbSampleQuantity.TabIndex = 17;
this.lbSampleQuantity.Text = "样品数量:"; this.lbSampleQuantity.Text = "样品数量:";
// //
...@@ -139,9 +144,10 @@ ...@@ -139,9 +144,10 @@
// //
this.lbCurrentBrand.AutoSize = true; this.lbCurrentBrand.AutoSize = true;
this.lbCurrentBrand.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbCurrentBrand.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentBrand.Location = new System.Drawing.Point(56, 132); this.lbCurrentBrand.Location = new System.Drawing.Point(84, 198);
this.lbCurrentBrand.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbCurrentBrand.Name = "lbCurrentBrand"; this.lbCurrentBrand.Name = "lbCurrentBrand";
this.lbCurrentBrand.Size = new System.Drawing.Size(97, 16); this.lbCurrentBrand.Size = new System.Drawing.Size(140, 24);
this.lbCurrentBrand.TabIndex = 16; this.lbCurrentBrand.TabIndex = 16;
this.lbCurrentBrand.Text = "__________"; this.lbCurrentBrand.Text = "__________";
// //
...@@ -149,9 +155,10 @@ ...@@ -149,9 +155,10 @@
// //
this.lbBrand.AutoSize = true; this.lbBrand.AutoSize = true;
this.lbBrand.Font = new System.Drawing.Font("宋体", 9F); this.lbBrand.Font = new System.Drawing.Font("宋体", 9F);
this.lbBrand.Location = new System.Drawing.Point(3, 136); this.lbBrand.Location = new System.Drawing.Point(4, 204);
this.lbBrand.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbBrand.Name = "lbBrand"; this.lbBrand.Name = "lbBrand";
this.lbBrand.Size = new System.Drawing.Size(47, 12); this.lbBrand.Size = new System.Drawing.Size(71, 18);
this.lbBrand.TabIndex = 15; this.lbBrand.TabIndex = 15;
this.lbBrand.Text = "商 标:"; this.lbBrand.Text = "商 标:";
// //
...@@ -159,9 +166,10 @@ ...@@ -159,9 +166,10 @@
// //
this.lbCurrentBatchNumber.AutoSize = true; this.lbCurrentBatchNumber.AutoSize = true;
this.lbCurrentBatchNumber.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbCurrentBatchNumber.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentBatchNumber.Location = new System.Drawing.Point(56, 108); this.lbCurrentBatchNumber.Location = new System.Drawing.Point(84, 162);
this.lbCurrentBatchNumber.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbCurrentBatchNumber.Name = "lbCurrentBatchNumber"; this.lbCurrentBatchNumber.Name = "lbCurrentBatchNumber";
this.lbCurrentBatchNumber.Size = new System.Drawing.Size(97, 16); this.lbCurrentBatchNumber.Size = new System.Drawing.Size(140, 24);
this.lbCurrentBatchNumber.TabIndex = 14; this.lbCurrentBatchNumber.TabIndex = 14;
this.lbCurrentBatchNumber.Text = "__________"; this.lbCurrentBatchNumber.Text = "__________";
// //
...@@ -169,9 +177,10 @@ ...@@ -169,9 +177,10 @@
// //
this.lbBatchNumber.AutoSize = true; this.lbBatchNumber.AutoSize = true;
this.lbBatchNumber.Font = new System.Drawing.Font("宋体", 9F); this.lbBatchNumber.Font = new System.Drawing.Font("宋体", 9F);
this.lbBatchNumber.Location = new System.Drawing.Point(3, 112); this.lbBatchNumber.Location = new System.Drawing.Point(4, 168);
this.lbBatchNumber.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbBatchNumber.Name = "lbBatchNumber"; this.lbBatchNumber.Name = "lbBatchNumber";
this.lbBatchNumber.Size = new System.Drawing.Size(59, 12); this.lbBatchNumber.Size = new System.Drawing.Size(89, 18);
this.lbBatchNumber.TabIndex = 13; this.lbBatchNumber.TabIndex = 13;
this.lbBatchNumber.Text = "批号货号:"; this.lbBatchNumber.Text = "批号货号:";
// //
...@@ -179,9 +188,10 @@ ...@@ -179,9 +188,10 @@
// //
this.lbCurrentSampleName.AutoSize = true; this.lbCurrentSampleName.AutoSize = true;
this.lbCurrentSampleName.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbCurrentSampleName.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentSampleName.Location = new System.Drawing.Point(56, 82); this.lbCurrentSampleName.Location = new System.Drawing.Point(84, 123);
this.lbCurrentSampleName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbCurrentSampleName.Name = "lbCurrentSampleName"; this.lbCurrentSampleName.Name = "lbCurrentSampleName";
this.lbCurrentSampleName.Size = new System.Drawing.Size(97, 16); this.lbCurrentSampleName.Size = new System.Drawing.Size(140, 24);
this.lbCurrentSampleName.TabIndex = 12; this.lbCurrentSampleName.TabIndex = 12;
this.lbCurrentSampleName.Text = "__________"; this.lbCurrentSampleName.Text = "__________";
// //
...@@ -189,9 +199,10 @@ ...@@ -189,9 +199,10 @@
// //
this.lbSampleName.AutoSize = true; this.lbSampleName.AutoSize = true;
this.lbSampleName.Font = new System.Drawing.Font("宋体", 9F); this.lbSampleName.Font = new System.Drawing.Font("宋体", 9F);
this.lbSampleName.Location = new System.Drawing.Point(3, 86); this.lbSampleName.Location = new System.Drawing.Point(4, 129);
this.lbSampleName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbSampleName.Name = "lbSampleName"; this.lbSampleName.Name = "lbSampleName";
this.lbSampleName.Size = new System.Drawing.Size(59, 12); this.lbSampleName.Size = new System.Drawing.Size(89, 18);
this.lbSampleName.TabIndex = 11; this.lbSampleName.TabIndex = 11;
this.lbSampleName.Text = "样品名称:"; this.lbSampleName.Text = "样品名称:";
// //
...@@ -199,9 +210,10 @@ ...@@ -199,9 +210,10 @@
// //
this.lbCurrentReportId.AutoSize = true; this.lbCurrentReportId.AutoSize = true;
this.lbCurrentReportId.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbCurrentReportId.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentReportId.Location = new System.Drawing.Point(56, 58); this.lbCurrentReportId.Location = new System.Drawing.Point(84, 87);
this.lbCurrentReportId.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbCurrentReportId.Name = "lbCurrentReportId"; this.lbCurrentReportId.Name = "lbCurrentReportId";
this.lbCurrentReportId.Size = new System.Drawing.Size(97, 16); this.lbCurrentReportId.Size = new System.Drawing.Size(140, 24);
this.lbCurrentReportId.TabIndex = 10; this.lbCurrentReportId.TabIndex = 10;
this.lbCurrentReportId.Text = "__________"; this.lbCurrentReportId.Text = "__________";
// //
...@@ -209,9 +221,10 @@ ...@@ -209,9 +221,10 @@
// //
this.lbReportId.AutoSize = true; this.lbReportId.AutoSize = true;
this.lbReportId.Font = new System.Drawing.Font("宋体", 9F); this.lbReportId.Font = new System.Drawing.Font("宋体", 9F);
this.lbReportId.Location = new System.Drawing.Point(3, 62); this.lbReportId.Location = new System.Drawing.Point(4, 93);
this.lbReportId.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbReportId.Name = "lbReportId"; this.lbReportId.Name = "lbReportId";
this.lbReportId.Size = new System.Drawing.Size(47, 12); this.lbReportId.Size = new System.Drawing.Size(71, 18);
this.lbReportId.TabIndex = 9; this.lbReportId.TabIndex = 9;
this.lbReportId.Text = "报告号:"; this.lbReportId.Text = "报告号:";
// //
...@@ -219,9 +232,10 @@ ...@@ -219,9 +232,10 @@
// //
this.btnReportId.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnReportId.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnReportId.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReportId.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReportId.Location = new System.Drawing.Point(201, 21); this.btnReportId.Location = new System.Drawing.Point(302, 32);
this.btnReportId.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnReportId.Name = "btnReportId"; this.btnReportId.Name = "btnReportId";
this.btnReportId.Size = new System.Drawing.Size(83, 35); this.btnReportId.Size = new System.Drawing.Size(124, 52);
this.btnReportId.TabIndex = 8; this.btnReportId.TabIndex = 8;
this.btnReportId.Text = "查询报告"; this.btnReportId.Text = "查询报告";
this.btnReportId.UseVisualStyleBackColor = false; this.btnReportId.UseVisualStyleBackColor = false;
...@@ -229,10 +243,11 @@ ...@@ -229,10 +243,11 @@
// tbxReportId // tbxReportId
// //
this.tbxReportId.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tbxReportId.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbxReportId.Location = new System.Drawing.Point(3, 20); this.tbxReportId.Location = new System.Drawing.Point(4, 30);
this.tbxReportId.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbxReportId.Multiline = true; this.tbxReportId.Multiline = true;
this.tbxReportId.Name = "tbxReportId"; this.tbxReportId.Name = "tbxReportId";
this.tbxReportId.Size = new System.Drawing.Size(193, 35); this.tbxReportId.Size = new System.Drawing.Size(288, 50);
this.tbxReportId.TabIndex = 7; this.tbxReportId.TabIndex = 7;
// //
// gbLogin // gbLogin
...@@ -246,9 +261,11 @@ ...@@ -246,9 +261,11 @@
this.gbLogin.Controls.Add(this.tbxServiceUrl); this.gbLogin.Controls.Add(this.tbxServiceUrl);
this.gbLogin.Controls.Add(this.lblUrl); this.gbLogin.Controls.Add(this.lblUrl);
this.gbLogin.Dock = System.Windows.Forms.DockStyle.Bottom; this.gbLogin.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbLogin.Location = new System.Drawing.Point(0, 469); this.gbLogin.Location = new System.Drawing.Point(0, 704);
this.gbLogin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbLogin.Name = "gbLogin"; this.gbLogin.Name = "gbLogin";
this.gbLogin.Size = new System.Drawing.Size(287, 212); this.gbLogin.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbLogin.Size = new System.Drawing.Size(430, 318);
this.gbLogin.TabIndex = 2; this.gbLogin.TabIndex = 2;
this.gbLogin.TabStop = false; this.gbLogin.TabStop = false;
this.gbLogin.Text = "系统登录"; this.gbLogin.Text = "系统登录";
...@@ -258,9 +275,10 @@ ...@@ -258,9 +275,10 @@
this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush; this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush;
this.btnLogout.Font = new System.Drawing.Font("宋体", 15F); this.btnLogout.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogout.ForeColor = System.Drawing.Color.Crimson; this.btnLogout.ForeColor = System.Drawing.Color.Crimson;
this.btnLogout.Location = new System.Drawing.Point(190, 166); this.btnLogout.Location = new System.Drawing.Point(285, 249);
this.btnLogout.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnLogout.Name = "btnLogout"; this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(91, 40); this.btnLogout.Size = new System.Drawing.Size(136, 60);
this.btnLogout.TabIndex = 31; this.btnLogout.TabIndex = 31;
this.btnLogout.Text = "退 出"; this.btnLogout.Text = "退 出";
this.btnLogout.UseVisualStyleBackColor = false; this.btnLogout.UseVisualStyleBackColor = false;
...@@ -271,9 +289,10 @@ ...@@ -271,9 +289,10 @@
this.btnLogin.BackColor = System.Drawing.Color.MintCream; this.btnLogin.BackColor = System.Drawing.Color.MintCream;
this.btnLogin.Font = new System.Drawing.Font("宋体", 15F); this.btnLogin.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen; this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen;
this.btnLogin.Location = new System.Drawing.Point(5, 166); this.btnLogin.Location = new System.Drawing.Point(8, 249);
this.btnLogin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnLogin.Name = "btnLogin"; this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(179, 40); this.btnLogin.Size = new System.Drawing.Size(268, 60);
this.btnLogin.TabIndex = 30; this.btnLogin.TabIndex = 30;
this.btnLogin.Text = "登 录"; this.btnLogin.Text = "登 录";
this.btnLogin.UseVisualStyleBackColor = false; this.btnLogin.UseVisualStyleBackColor = false;
...@@ -282,37 +301,41 @@ ...@@ -282,37 +301,41 @@
// tbxPassword // tbxPassword
// //
this.tbxPassword.Font = new System.Drawing.Font("宋体", 12F); this.tbxPassword.Font = new System.Drawing.Font("宋体", 12F);
this.tbxPassword.Location = new System.Drawing.Point(3, 132); this.tbxPassword.Location = new System.Drawing.Point(4, 198);
this.tbxPassword.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbxPassword.Name = "tbxPassword"; this.tbxPassword.Name = "tbxPassword";
this.tbxPassword.PasswordChar = '*'; this.tbxPassword.PasswordChar = '*';
this.tbxPassword.Size = new System.Drawing.Size(278, 26); this.tbxPassword.Size = new System.Drawing.Size(415, 35);
this.tbxPassword.TabIndex = 29; this.tbxPassword.TabIndex = 29;
// //
// lblPassword // lblPassword
// //
this.lblPassword.AutoSize = true; this.lblPassword.AutoSize = true;
this.lblPassword.Font = new System.Drawing.Font("宋体", 12F); this.lblPassword.Font = new System.Drawing.Font("宋体", 12F);
this.lblPassword.Location = new System.Drawing.Point(2, 113); this.lblPassword.Location = new System.Drawing.Point(3, 170);
this.lblPassword.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPassword.Name = "lblPassword"; this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(63, 16); this.lblPassword.Size = new System.Drawing.Size(94, 24);
this.lblPassword.TabIndex = 28; this.lblPassword.TabIndex = 28;
this.lblPassword.Text = "密 码:"; this.lblPassword.Text = "密 码:";
// //
// tbxUserName // tbxUserName
// //
this.tbxUserName.Font = new System.Drawing.Font("宋体", 12F); this.tbxUserName.Font = new System.Drawing.Font("宋体", 12F);
this.tbxUserName.Location = new System.Drawing.Point(3, 84); this.tbxUserName.Location = new System.Drawing.Point(4, 126);
this.tbxUserName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbxUserName.Name = "tbxUserName"; this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(278, 26); this.tbxUserName.Size = new System.Drawing.Size(415, 35);
this.tbxUserName.TabIndex = 27; this.tbxUserName.TabIndex = 27;
// //
// lblUser // lblUser
// //
this.lblUser.AutoSize = true; this.lblUser.AutoSize = true;
this.lblUser.Font = new System.Drawing.Font("宋体", 12F); this.lblUser.Font = new System.Drawing.Font("宋体", 12F);
this.lblUser.Location = new System.Drawing.Point(2, 65); this.lblUser.Location = new System.Drawing.Point(3, 98);
this.lblUser.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblUser.Name = "lblUser"; this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(63, 16); this.lblUser.Size = new System.Drawing.Size(94, 24);
this.lblUser.TabIndex = 26; this.lblUser.TabIndex = 26;
this.lblUser.Text = "用户名:"; this.lblUser.Text = "用户名:";
// //
...@@ -320,18 +343,20 @@ ...@@ -320,18 +343,20 @@
// //
this.tbxServiceUrl.BackColor = System.Drawing.SystemColors.Window; this.tbxServiceUrl.BackColor = System.Drawing.SystemColors.Window;
this.tbxServiceUrl.Font = new System.Drawing.Font("宋体", 12F); this.tbxServiceUrl.Font = new System.Drawing.Font("宋体", 12F);
this.tbxServiceUrl.Location = new System.Drawing.Point(3, 36); this.tbxServiceUrl.Location = new System.Drawing.Point(4, 54);
this.tbxServiceUrl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbxServiceUrl.Name = "tbxServiceUrl"; this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(278, 26); this.tbxServiceUrl.Size = new System.Drawing.Size(415, 35);
this.tbxServiceUrl.TabIndex = 25; this.tbxServiceUrl.TabIndex = 25;
// //
// lblUrl // lblUrl
// //
this.lblUrl.AutoSize = true; this.lblUrl.AutoSize = true;
this.lblUrl.Font = new System.Drawing.Font("宋体", 12F); this.lblUrl.Font = new System.Drawing.Font("宋体", 12F);
this.lblUrl.Location = new System.Drawing.Point(2, 17); this.lblUrl.Location = new System.Drawing.Point(3, 26);
this.lblUrl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblUrl.Name = "lblUrl"; this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(63, 16); this.lblUrl.Size = new System.Drawing.Size(94, 24);
this.lblUrl.TabIndex = 22; this.lblUrl.TabIndex = 22;
this.lblUrl.Text = "地 址:"; this.lblUrl.Text = "地 址:";
// //
...@@ -343,8 +368,10 @@ ...@@ -343,8 +368,10 @@
this.gbCamView.Dock = System.Windows.Forms.DockStyle.Top; this.gbCamView.Dock = System.Windows.Forms.DockStyle.Top;
this.gbCamView.Font = new System.Drawing.Font("宋体", 10F); this.gbCamView.Font = new System.Drawing.Font("宋体", 10F);
this.gbCamView.Location = new System.Drawing.Point(0, 0); this.gbCamView.Location = new System.Drawing.Point(0, 0);
this.gbCamView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbCamView.Name = "gbCamView"; this.gbCamView.Name = "gbCamView";
this.gbCamView.Size = new System.Drawing.Size(287, 287); this.gbCamView.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbCamView.Size = new System.Drawing.Size(430, 430);
this.gbCamView.TabIndex = 0; this.gbCamView.TabIndex = 0;
this.gbCamView.TabStop = false; this.gbCamView.TabStop = false;
this.gbCamView.Text = "相机视图"; this.gbCamView.Text = "相机视图";
...@@ -353,20 +380,23 @@ ...@@ -353,20 +380,23 @@
// //
this.btnSwitch.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnSwitch.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnSwitch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSwitch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSwitch.Location = new System.Drawing.Point(201, 246); this.btnSwitch.Location = new System.Drawing.Point(302, 369);
this.btnSwitch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnSwitch.Name = "btnSwitch"; this.btnSwitch.Name = "btnSwitch";
this.btnSwitch.Size = new System.Drawing.Size(83, 35); this.btnSwitch.Size = new System.Drawing.Size(124, 52);
this.btnSwitch.TabIndex = 4; this.btnSwitch.TabIndex = 4;
this.btnSwitch.Text = "切换相机"; this.btnSwitch.Text = "切换相机";
this.btnSwitch.UseVisualStyleBackColor = false; this.btnSwitch.UseVisualStyleBackColor = false;
this.btnSwitch.Click += new System.EventHandler(this.btnSwitch_Click);
// //
// cbxResolution // cbxResolution
// //
this.cbxResolution.Font = new System.Drawing.Font("宋体", 20F); this.cbxResolution.Font = new System.Drawing.Font("宋体", 20F);
this.cbxResolution.FormattingEnabled = true; this.cbxResolution.FormattingEnabled = true;
this.cbxResolution.Location = new System.Drawing.Point(3, 246); this.cbxResolution.Location = new System.Drawing.Point(4, 369);
this.cbxResolution.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbxResolution.Name = "cbxResolution"; this.cbxResolution.Name = "cbxResolution";
this.cbxResolution.Size = new System.Drawing.Size(193, 35); this.cbxResolution.Size = new System.Drawing.Size(288, 48);
this.cbxResolution.TabIndex = 1; this.cbxResolution.TabIndex = 1;
this.cbxResolution.SelectedIndexChanged += new System.EventHandler(this.cbxResolution_SelectedIndexChanged); this.cbxResolution.SelectedIndexChanged += new System.EventHandler(this.cbxResolution_SelectedIndexChanged);
// //
...@@ -374,29 +404,21 @@ ...@@ -374,29 +404,21 @@
// //
this.plVsp.Controls.Add(this.vspCamView); this.plVsp.Controls.Add(this.vspCamView);
this.plVsp.Dock = System.Windows.Forms.DockStyle.Top; this.plVsp.Dock = System.Windows.Forms.DockStyle.Top;
this.plVsp.Location = new System.Drawing.Point(3, 19); this.plVsp.Location = new System.Drawing.Point(4, 27);
this.plVsp.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.plVsp.Name = "plVsp"; this.plVsp.Name = "plVsp";
this.plVsp.Size = new System.Drawing.Size(281, 223); this.plVsp.Size = new System.Drawing.Size(422, 334);
this.plVsp.TabIndex = 0; this.plVsp.TabIndex = 0;
// //
// vspCamView
//
this.vspCamView.Dock = System.Windows.Forms.DockStyle.Fill;
this.vspCamView.Location = new System.Drawing.Point(0, 0);
this.vspCamView.Name = "vspCamView";
this.vspCamView.Size = new System.Drawing.Size(281, 223);
this.vspCamView.TabIndex = 0;
this.vspCamView.Text = "vspCamView";
this.vspCamView.VideoSource = null;
//
// plRight // plRight
// //
this.plRight.Controls.Add(this.gbPhotoList); this.plRight.Controls.Add(this.gbPhotoList);
this.plRight.Controls.Add(this.gbUploading); this.plRight.Controls.Add(this.gbUploading);
this.plRight.Dock = System.Windows.Forms.DockStyle.Right; this.plRight.Dock = System.Windows.Forms.DockStyle.Right;
this.plRight.Location = new System.Drawing.Point(711, 0); this.plRight.Location = new System.Drawing.Point(1066, 0);
this.plRight.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.plRight.Name = "plRight"; this.plRight.Name = "plRight";
this.plRight.Size = new System.Drawing.Size(233, 681); this.plRight.Size = new System.Drawing.Size(350, 1022);
this.plRight.TabIndex = 1; this.plRight.TabIndex = 1;
// //
// gbPhotoList // gbPhotoList
...@@ -405,8 +427,10 @@ ...@@ -405,8 +427,10 @@
this.gbPhotoList.Dock = System.Windows.Forms.DockStyle.Fill; this.gbPhotoList.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbPhotoList.Font = new System.Drawing.Font("宋体", 10F); this.gbPhotoList.Font = new System.Drawing.Font("宋体", 10F);
this.gbPhotoList.Location = new System.Drawing.Point(0, 0); this.gbPhotoList.Location = new System.Drawing.Point(0, 0);
this.gbPhotoList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbPhotoList.Name = "gbPhotoList"; this.gbPhotoList.Name = "gbPhotoList";
this.gbPhotoList.Size = new System.Drawing.Size(233, 582); this.gbPhotoList.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbPhotoList.Size = new System.Drawing.Size(350, 874);
this.gbPhotoList.TabIndex = 2; this.gbPhotoList.TabIndex = 2;
this.gbPhotoList.TabStop = false; this.gbPhotoList.TabStop = false;
this.gbPhotoList.Text = "已拍照片"; this.gbPhotoList.Text = "已拍照片";
...@@ -417,10 +441,10 @@ ...@@ -417,10 +441,10 @@
this.flpPhotosTaken.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.flpPhotosTaken.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.flpPhotosTaken.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.flpPhotosTaken.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flpPhotosTaken.Dock = System.Windows.Forms.DockStyle.Fill; this.flpPhotosTaken.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpPhotosTaken.Location = new System.Drawing.Point(3, 19); this.flpPhotosTaken.Location = new System.Drawing.Point(4, 27);
this.flpPhotosTaken.Margin = new System.Windows.Forms.Padding(0); this.flpPhotosTaken.Margin = new System.Windows.Forms.Padding(0);
this.flpPhotosTaken.Name = "flpPhotosTaken"; this.flpPhotosTaken.Name = "flpPhotosTaken";
this.flpPhotosTaken.Size = new System.Drawing.Size(227, 560); this.flpPhotosTaken.Size = new System.Drawing.Size(342, 843);
this.flpPhotosTaken.TabIndex = 2; this.flpPhotosTaken.TabIndex = 2;
// //
// gbUploading // gbUploading
...@@ -428,9 +452,11 @@ ...@@ -428,9 +452,11 @@
this.gbUploading.Controls.Add(this.btnUpload); this.gbUploading.Controls.Add(this.btnUpload);
this.gbUploading.Controls.Add(this.ckbCompress); this.gbUploading.Controls.Add(this.ckbCompress);
this.gbUploading.Dock = System.Windows.Forms.DockStyle.Bottom; this.gbUploading.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbUploading.Location = new System.Drawing.Point(0, 582); this.gbUploading.Location = new System.Drawing.Point(0, 874);
this.gbUploading.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbUploading.Name = "gbUploading"; this.gbUploading.Name = "gbUploading";
this.gbUploading.Size = new System.Drawing.Size(233, 99); this.gbUploading.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbUploading.Size = new System.Drawing.Size(350, 148);
this.gbUploading.TabIndex = 1; this.gbUploading.TabIndex = 1;
this.gbUploading.TabStop = false; this.gbUploading.TabStop = false;
this.gbUploading.Text = "操作台"; this.gbUploading.Text = "操作台";
...@@ -439,9 +465,10 @@ ...@@ -439,9 +465,10 @@
// //
this.btnUpload.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnUpload.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnUpload.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpload.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpload.Location = new System.Drawing.Point(54, 42); this.btnUpload.Location = new System.Drawing.Point(81, 63);
this.btnUpload.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnUpload.Name = "btnUpload"; this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(115, 49); this.btnUpload.Size = new System.Drawing.Size(172, 74);
this.btnUpload.TabIndex = 3; this.btnUpload.TabIndex = 3;
this.btnUpload.Text = "上传"; this.btnUpload.Text = "上传";
this.btnUpload.UseVisualStyleBackColor = false; this.btnUpload.UseVisualStyleBackColor = false;
...@@ -450,10 +477,11 @@ ...@@ -450,10 +477,11 @@
// //
this.ckbCompress.AutoSize = true; this.ckbCompress.AutoSize = true;
this.ckbCompress.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.ckbCompress.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ckbCompress.Location = new System.Drawing.Point(54, 8); this.ckbCompress.Location = new System.Drawing.Point(81, 12);
this.ckbCompress.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckbCompress.Name = "ckbCompress"; this.ckbCompress.Name = "ckbCompress";
this.ckbCompress.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.ckbCompress.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.ckbCompress.Size = new System.Drawing.Size(125, 28); this.ckbCompress.Size = new System.Drawing.Size(185, 40);
this.ckbCompress.TabIndex = 2; this.ckbCompress.TabIndex = 2;
this.ckbCompress.Text = "图片压缩"; this.ckbCompress.Text = "图片压缩";
this.ckbCompress.UseVisualStyleBackColor = true; this.ckbCompress.UseVisualStyleBackColor = true;
...@@ -463,9 +491,10 @@ ...@@ -463,9 +491,10 @@
this.plMain.Controls.Add(this.gbPhotoView); this.plMain.Controls.Add(this.gbPhotoView);
this.plMain.Controls.Add(this.gbOperating); this.plMain.Controls.Add(this.gbOperating);
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill; this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(287, 0); this.plMain.Location = new System.Drawing.Point(430, 0);
this.plMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.plMain.Name = "plMain"; this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(424, 681); this.plMain.Size = new System.Drawing.Size(636, 1022);
this.plMain.TabIndex = 2; this.plMain.TabIndex = 2;
// //
// gbPhotoView // gbPhotoView
...@@ -474,8 +503,10 @@ ...@@ -474,8 +503,10 @@
this.gbPhotoView.Dock = System.Windows.Forms.DockStyle.Fill; this.gbPhotoView.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbPhotoView.Font = new System.Drawing.Font("宋体", 10F); this.gbPhotoView.Font = new System.Drawing.Font("宋体", 10F);
this.gbPhotoView.Location = new System.Drawing.Point(0, 0); this.gbPhotoView.Location = new System.Drawing.Point(0, 0);
this.gbPhotoView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbPhotoView.Name = "gbPhotoView"; this.gbPhotoView.Name = "gbPhotoView";
this.gbPhotoView.Size = new System.Drawing.Size(424, 582); this.gbPhotoView.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbPhotoView.Size = new System.Drawing.Size(636, 874);
this.gbPhotoView.TabIndex = 1; this.gbPhotoView.TabIndex = 1;
this.gbPhotoView.TabStop = false; this.gbPhotoView.TabStop = false;
this.gbPhotoView.Text = "选中照片"; this.gbPhotoView.Text = "选中照片";
...@@ -484,9 +515,10 @@ ...@@ -484,9 +515,10 @@
// //
this.ptbPhotoDisplay.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.ptbPhotoDisplay.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.ptbPhotoDisplay.Dock = System.Windows.Forms.DockStyle.Fill; this.ptbPhotoDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
this.ptbPhotoDisplay.Location = new System.Drawing.Point(3, 19); this.ptbPhotoDisplay.Location = new System.Drawing.Point(4, 27);
this.ptbPhotoDisplay.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ptbPhotoDisplay.Name = "ptbPhotoDisplay"; this.ptbPhotoDisplay.Name = "ptbPhotoDisplay";
this.ptbPhotoDisplay.Size = new System.Drawing.Size(418, 560); this.ptbPhotoDisplay.Size = new System.Drawing.Size(628, 843);
this.ptbPhotoDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.ptbPhotoDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.ptbPhotoDisplay.TabIndex = 2; this.ptbPhotoDisplay.TabIndex = 2;
this.ptbPhotoDisplay.TabStop = false; this.ptbPhotoDisplay.TabStop = false;
...@@ -496,9 +528,11 @@ ...@@ -496,9 +528,11 @@
this.gbOperating.Controls.Add(this.btnDelete); this.gbOperating.Controls.Add(this.btnDelete);
this.gbOperating.Controls.Add(this.btnShot); this.gbOperating.Controls.Add(this.btnShot);
this.gbOperating.Dock = System.Windows.Forms.DockStyle.Bottom; this.gbOperating.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbOperating.Location = new System.Drawing.Point(0, 582); this.gbOperating.Location = new System.Drawing.Point(0, 874);
this.gbOperating.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbOperating.Name = "gbOperating"; this.gbOperating.Name = "gbOperating";
this.gbOperating.Size = new System.Drawing.Size(424, 99); this.gbOperating.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gbOperating.Size = new System.Drawing.Size(636, 148);
this.gbOperating.TabIndex = 0; this.gbOperating.TabIndex = 0;
this.gbOperating.TabStop = false; this.gbOperating.TabStop = false;
this.gbOperating.Text = "操作台"; this.gbOperating.Text = "操作台";
...@@ -509,9 +543,10 @@ ...@@ -509,9 +543,10 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.btnDelete.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnDelete.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnDelete.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnDelete.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelete.Location = new System.Drawing.Point(269, 28); this.btnDelete.Location = new System.Drawing.Point(404, 42);
this.btnDelete.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnDelete.Name = "btnDelete"; this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(138, 65); this.btnDelete.Size = new System.Drawing.Size(207, 98);
this.btnDelete.TabIndex = 2; this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除"; this.btnDelete.Text = "删除";
this.btnDelete.UseVisualStyleBackColor = false; this.btnDelete.UseVisualStyleBackColor = false;
...@@ -522,21 +557,35 @@ ...@@ -522,21 +557,35 @@
this.btnShot.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnShot.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnShot.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnShot.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); this.btnShot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.btnShot.Location = new System.Drawing.Point(24, 28); this.btnShot.Location = new System.Drawing.Point(36, 42);
this.btnShot.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnShot.Name = "btnShot"; this.btnShot.Name = "btnShot";
this.btnShot.Size = new System.Drawing.Size(138, 65); this.btnShot.Size = new System.Drawing.Size(207, 98);
this.btnShot.TabIndex = 1; this.btnShot.TabIndex = 1;
this.btnShot.Text = "拍照"; this.btnShot.Text = "拍照";
this.btnShot.UseVisualStyleBackColor = false; this.btnShot.UseVisualStyleBackColor = false;
this.btnShot.Click += new System.EventHandler(this.btnShot_Click);
//
// vspCamView
//
this.vspCamView.Dock = System.Windows.Forms.DockStyle.Fill;
this.vspCamView.Location = new System.Drawing.Point(0, 0);
this.vspCamView.Margin = new System.Windows.Forms.Padding(4);
this.vspCamView.Name = "vspCamView";
this.vspCamView.Size = new System.Drawing.Size(422, 334);
this.vspCamView.TabIndex = 0;
this.vspCamView.Text = "vspCamView";
this.vspCamView.VideoSource = null;
// //
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(944, 681); this.ClientSize = new System.Drawing.Size(1416, 1022);
this.Controls.Add(this.plMain); this.Controls.Add(this.plMain);
this.Controls.Add(this.plRight); this.Controls.Add(this.plRight);
this.Controls.Add(this.plLeft); this.Controls.Add(this.plLeft);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "FrmMain"; this.Name = "FrmMain";
this.Text = "样品拍照采集"; this.Text = "样品拍照采集";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
......
...@@ -122,6 +122,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -122,6 +122,7 @@ namespace Kivii.Sample.ImageUploader
// add all devices to combo // add all devices to combo
cameraQuantity = videoDevices.Count; cameraQuantity = videoDevices.Count;
videoDevice = new VideoCaptureDevice(videoDevices[currentCameraIndex].MonikerString); videoDevice = new VideoCaptureDevice(videoDevices[currentCameraIndex].MonikerString);
gbCamView.Text = videoDevices[currentCameraIndex].Name;
enumeratedSupportedFrameSizes(videoDevice); enumeratedSupportedFrameSizes(videoDevice);
} }
else else
...@@ -135,6 +136,21 @@ namespace Kivii.Sample.ImageUploader ...@@ -135,6 +136,21 @@ namespace Kivii.Sample.ImageUploader
} }
} }
private void switchCamera()
{
if (videoDevice.IsRunning)
{
Disconnect();
}
if (currentCameraIndex + 1 > cameraQuantity - 1) currentCameraIndex = 0;
else currentCameraIndex = currentCameraIndex + 1;
videoDevice = new VideoCaptureDevice(videoDevices[currentCameraIndex].MonikerString);
gbCamView.Text = videoDevices[currentCameraIndex].Name;
enumeratedSupportedFrameSizes(videoDevice);
// 默认选择第一个分辨率
cbxResolution.SelectedIndex = 0;
}
/// <summary> /// <summary>
/// 列出摄像头支持的分辨率 /// 列出摄像头支持的分辨率
/// </summary> /// </summary>
...@@ -143,7 +159,6 @@ namespace Kivii.Sample.ImageUploader ...@@ -143,7 +159,6 @@ namespace Kivii.Sample.ImageUploader
{ {
this.Cursor = Cursors.WaitCursor; this.Cursor = Cursors.WaitCursor;
cbxResolution.Items.Clear(); cbxResolution.Items.Clear();
try try
{ {
// 获取摄像头支持的分辨率列表 // 获取摄像头支持的分辨率列表
...@@ -176,7 +191,6 @@ namespace Kivii.Sample.ImageUploader ...@@ -176,7 +191,6 @@ namespace Kivii.Sample.ImageUploader
{ {
videoDevice.VideoResolution = videoCapabilities[selectedIndex]; videoDevice.VideoResolution = videoCapabilities[selectedIndex];
} }
vspCamView.VideoSource = videoDevice; vspCamView.VideoSource = videoDevice;
vspCamView.Start(); vspCamView.Start();
} }
...@@ -216,6 +230,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -216,6 +230,7 @@ namespace Kivii.Sample.ImageUploader
initFormCtlEnable(false); initFormCtlEnable(false);
setDefault(tbxServiceUrl, tbxUserName, tbxPassword); setDefault(tbxServiceUrl, tbxUserName, tbxPassword);
Thread.Sleep(100); Thread.Sleep(100);
if (videoDevice == null) initCameras();
// 默认选择第一个分辨率 // 默认选择第一个分辨率
cbxResolution.SelectedIndex = 0; cbxResolution.SelectedIndex = 0;
}, true); }, true);
...@@ -224,7 +239,8 @@ namespace Kivii.Sample.ImageUploader ...@@ -224,7 +239,8 @@ namespace Kivii.Sample.ImageUploader
initFormCtlEnable(); initFormCtlEnable();
_client.Dispose(); _client.Dispose();
_client = null; _client = null;
MessageBox.Show(err.Message, "Login Error"); var msg = err.GetResponseStatus().Message;
MessageBox.Show(msg, "Login Error");
}, true); }, true);
} }
...@@ -264,5 +280,97 @@ namespace Kivii.Sample.ImageUploader ...@@ -264,5 +280,97 @@ namespace Kivii.Sample.ImageUploader
{ {
Disconnect(); Disconnect();
} }
private void btnSwitch_Click(object sender, EventArgs e)
{
switchCamera();
}
private void btnShot_Click(object sender, EventArgs e)
{
try
{
if (videoDevice != null && vspCamView.IsRunning)
{
// 捕获当前帧
Bitmap bitmap = vspCamView.GetCurrentVideoFrame();
ptbPhotoDisplay.Image = bitmap;
// 创建图片 PictureBox 控件
PictureBox pictureBox = new PictureBox();
pictureBox.SizeMode = PictureBoxSizeMode.Zoom;
pictureBox.Dock = DockStyle.Fill;
pictureBox.Image = bitmap;
// 添加图片点击动作
pictureBox.Click += PictureBox_Click;
// 创建图片名称的 Label 控件
Label nameLabel = new Label();
String name = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
nameLabel.Text = name;
nameLabel.Dock = DockStyle.Fill;
nameLabel.TextAlign = ContentAlignment.MiddleCenter;
// 创建 SplitContainer 控件
SplitContainer splitContainer = new SplitContainer();
splitContainer.Size = new Size(210, 140);
splitContainer.Orientation = Orientation.Horizontal;
splitContainer.SplitterWidth = 1;
splitContainer.SplitterDistance = 100;
splitContainer.Panel1.Padding = new Padding(0, 10, 0, 0);
splitContainer.Panel1.Controls.Add(pictureBox);
splitContainer.Panel2.Controls.Add(nameLabel);
// 将 SplitContainer 添加到 flpPhotosTaken 中
flpPhotosTaken.Controls.Add(splitContainer);
// 改变排序,将新增的添加到顶部
flpPhotosTaken.Controls.SetChildIndex(splitContainer, 0);
// 将拍摄的照片对象添加到集合中
photos.Add(new Photo(bitmap, name));
// 遍历 flpPhotosTaken 中的控件,将之前选中的 SplitContainer 边框改为默认
foreach (Control control in flpPhotosTaken.Controls)
{
if (control is SplitContainer controlContainer)
{
controlContainer.BorderStyle = BorderStyle.None;
}
}
// 为新添加的 SplitContainer 添加边框
splitContainer.BorderStyle = BorderStyle.FixedSingle;
}
}
catch (Exception ex)
{
MessageBox.Show("无法拍照" + ex.Message);
}
}
private void PictureBox_Click(object sender, EventArgs e)
{
// 获取点击的 PictureBox 中的图片
PictureBox pictureBox = (PictureBox)sender;
// 遍历 flpPhotosTaken 中的控件,找到对应的 SplitContainer,并为其设置边框样式
foreach (Control control in flpPhotosTaken.Controls)
{
if (control is SplitContainer splitContainer)
{
// 如果 SplitContainer 包含点击的 PictureBox,则设置其边框,否则设置为默认
if (splitContainer.Panel1.Controls.Count > 0 && splitContainer.Panel1.Controls[0] == pictureBox)
{
splitContainer.BorderStyle = BorderStyle.FixedSingle;
}
else
{
splitContainer.BorderStyle = BorderStyle.None;
}
}
}
// 在界面中的 PictureBox 中显示该图片
ptbPhotoDisplay.Image = (Bitmap)pictureBox.Image;
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment