Commit 5ec7e266 by Neo Turing

增加图片旋转功能

parent 6945e4ec
...@@ -46,9 +46,7 @@ ...@@ -46,9 +46,7 @@
this.lblUrl = new System.Windows.Forms.Label(); this.lblUrl = new System.Windows.Forms.Label();
this.gbCamView = new System.Windows.Forms.GroupBox(); this.gbCamView = new System.Windows.Forms.GroupBox();
this.btnSwitch = new System.Windows.Forms.Button(); this.btnSwitch = new System.Windows.Forms.Button();
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.flpPhotos = new System.Windows.Forms.FlowLayoutPanel(); this.flpPhotos = new System.Windows.Forms.FlowLayoutPanel();
...@@ -63,6 +61,9 @@ ...@@ -63,6 +61,9 @@
this.btnShot = new System.Windows.Forms.Button(); this.btnShot = new System.Windows.Forms.Button();
this.btnEditor = new System.Windows.Forms.Button(); this.btnEditor = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button();
this.btnCamearTurn = new System.Windows.Forms.Button();
this.vspCamView = new Kivii.Sample.ImageUploader.Controls.VideoSourcePlayer();
this.cbxResolution = new System.Windows.Forms.ComboBox();
this.plLeft.SuspendLayout(); this.plLeft.SuspendLayout();
this.gbSample.SuspendLayout(); this.gbSample.SuspendLayout();
this.plSearchReport.SuspendLayout(); this.plSearchReport.SuspendLayout();
...@@ -87,7 +88,7 @@ ...@@ -87,7 +88,7 @@
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.Name = "plLeft"; this.plLeft.Name = "plLeft";
this.plLeft.Size = new System.Drawing.Size(287, 681); this.plLeft.Size = new System.Drawing.Size(252, 681);
this.plLeft.TabIndex = 0; this.plLeft.TabIndex = 0;
// //
// gbSample // gbSample
...@@ -95,9 +96,9 @@ ...@@ -95,9 +96,9 @@
this.gbSample.Controls.Add(this.rtbMessage); this.gbSample.Controls.Add(this.rtbMessage);
this.gbSample.Controls.Add(this.plSearchReport); this.gbSample.Controls.Add(this.plSearchReport);
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, 320);
this.gbSample.Name = "gbSample"; this.gbSample.Name = "gbSample";
this.gbSample.Size = new System.Drawing.Size(287, 182); this.gbSample.Size = new System.Drawing.Size(252, 199);
this.gbSample.TabIndex = 3; this.gbSample.TabIndex = 3;
this.gbSample.TabStop = false; this.gbSample.TabStop = false;
this.gbSample.Text = "查询样品"; this.gbSample.Text = "查询样品";
...@@ -105,11 +106,11 @@ ...@@ -105,11 +106,11 @@
// rtbMessage // rtbMessage
// //
this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill; this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbMessage.Font = new System.Drawing.Font("宋体", 16F); this.rtbMessage.Font = new System.Drawing.Font("宋体", 14F);
this.rtbMessage.Location = new System.Drawing.Point(3, 59); this.rtbMessage.Location = new System.Drawing.Point(3, 59);
this.rtbMessage.Margin = new System.Windows.Forms.Padding(2); this.rtbMessage.Margin = new System.Windows.Forms.Padding(2);
this.rtbMessage.Name = "rtbMessage"; this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.Size = new System.Drawing.Size(281, 120); this.rtbMessage.Size = new System.Drawing.Size(246, 137);
this.rtbMessage.TabIndex = 20; this.rtbMessage.TabIndex = 20;
this.rtbMessage.Text = ""; this.rtbMessage.Text = "";
// //
...@@ -120,7 +121,7 @@ ...@@ -120,7 +121,7 @@
this.plSearchReport.Dock = System.Windows.Forms.DockStyle.Top; this.plSearchReport.Dock = System.Windows.Forms.DockStyle.Top;
this.plSearchReport.Location = new System.Drawing.Point(3, 17); this.plSearchReport.Location = new System.Drawing.Point(3, 17);
this.plSearchReport.Name = "plSearchReport"; this.plSearchReport.Name = "plSearchReport";
this.plSearchReport.Size = new System.Drawing.Size(281, 42); this.plSearchReport.Size = new System.Drawing.Size(246, 42);
this.plSearchReport.TabIndex = 19; this.plSearchReport.TabIndex = 19;
// //
// tbxReportId // tbxReportId
...@@ -130,7 +131,7 @@ ...@@ -130,7 +131,7 @@
this.tbxReportId.Location = new System.Drawing.Point(0, 0); this.tbxReportId.Location = new System.Drawing.Point(0, 0);
this.tbxReportId.Multiline = true; this.tbxReportId.Multiline = true;
this.tbxReportId.Name = "tbxReportId"; this.tbxReportId.Name = "tbxReportId";
this.tbxReportId.Size = new System.Drawing.Size(207, 42); this.tbxReportId.Size = new System.Drawing.Size(172, 42);
this.tbxReportId.TabIndex = 7; this.tbxReportId.TabIndex = 7;
this.tbxReportId.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbxReportId_KeyPress); this.tbxReportId.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbxReportId_KeyPress);
// //
...@@ -139,7 +140,7 @@ ...@@ -139,7 +140,7 @@
this.btnReportId.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnReportId.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnReportId.Dock = System.Windows.Forms.DockStyle.Right; this.btnReportId.Dock = System.Windows.Forms.DockStyle.Right;
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(207, 0); this.btnReportId.Location = new System.Drawing.Point(172, 0);
this.btnReportId.Name = "btnReportId"; this.btnReportId.Name = "btnReportId";
this.btnReportId.Size = new System.Drawing.Size(74, 42); this.btnReportId.Size = new System.Drawing.Size(74, 42);
this.btnReportId.TabIndex = 8; this.btnReportId.TabIndex = 8;
...@@ -158,9 +159,9 @@ ...@@ -158,9 +159,9 @@
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, 519);
this.gbLogin.Name = "gbLogin"; this.gbLogin.Name = "gbLogin";
this.gbLogin.Size = new System.Drawing.Size(287, 212); this.gbLogin.Size = new System.Drawing.Size(252, 162);
this.gbLogin.TabIndex = 2; this.gbLogin.TabIndex = 2;
this.gbLogin.TabStop = false; this.gbLogin.TabStop = false;
this.gbLogin.Text = "系统登录"; this.gbLogin.Text = "系统登录";
...@@ -170,9 +171,9 @@ ...@@ -170,9 +171,9 @@
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(147, 114);
this.btnLogout.Name = "btnLogout"; this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(91, 40); this.btnLogout.Size = new System.Drawing.Size(96, 40);
this.btnLogout.TabIndex = 31; this.btnLogout.TabIndex = 31;
this.btnLogout.Text = "退 出"; this.btnLogout.Text = "退 出";
this.btnLogout.UseVisualStyleBackColor = false; this.btnLogout.UseVisualStyleBackColor = false;
...@@ -183,9 +184,9 @@ ...@@ -183,9 +184,9 @@
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(3, 113);
this.btnLogin.Name = "btnLogin"; this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(179, 40); this.btnLogin.Size = new System.Drawing.Size(136, 40);
this.btnLogin.TabIndex = 30; this.btnLogin.TabIndex = 30;
this.btnLogin.Text = "登 录"; this.btnLogin.Text = "登 录";
this.btnLogin.UseVisualStyleBackColor = false; this.btnLogin.UseVisualStyleBackColor = false;
...@@ -194,10 +195,10 @@ ...@@ -194,10 +195,10 @@
// 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(64, 78);
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(179, 26);
this.tbxPassword.TabIndex = 29; this.tbxPassword.TabIndex = 29;
this.tbxPassword.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbxPassword_KeyPress); this.tbxPassword.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbxPassword_KeyPress);
// //
...@@ -205,7 +206,7 @@ ...@@ -205,7 +206,7 @@
// //
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(2, 81);
this.lblPassword.Name = "lblPassword"; this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(63, 16); this.lblPassword.Size = new System.Drawing.Size(63, 16);
this.lblPassword.TabIndex = 28; this.lblPassword.TabIndex = 28;
...@@ -214,16 +215,16 @@ ...@@ -214,16 +215,16 @@
// 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(64, 46);
this.tbxUserName.Name = "tbxUserName"; this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(278, 26); this.tbxUserName.Size = new System.Drawing.Size(179, 26);
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(2, 49);
this.lblUser.Name = "lblUser"; this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(63, 16); this.lblUser.Size = new System.Drawing.Size(63, 16);
this.lblUser.TabIndex = 26; this.lblUser.TabIndex = 26;
...@@ -233,9 +234,9 @@ ...@@ -233,9 +234,9 @@
// //
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(64, 14);
this.tbxServiceUrl.Name = "tbxServiceUrl"; this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(278, 26); this.tbxServiceUrl.Size = new System.Drawing.Size(179, 26);
this.tbxServiceUrl.TabIndex = 25; this.tbxServiceUrl.TabIndex = 25;
// //
// lblUrl // lblUrl
...@@ -250,14 +251,14 @@ ...@@ -250,14 +251,14 @@
// //
// gbCamView // gbCamView
// //
this.gbCamView.Controls.Add(this.btnSwitch);
this.gbCamView.Controls.Add(this.cbxResolution); this.gbCamView.Controls.Add(this.cbxResolution);
this.gbCamView.Controls.Add(this.btnSwitch);
this.gbCamView.Controls.Add(this.plVsp); this.gbCamView.Controls.Add(this.plVsp);
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.Name = "gbCamView"; this.gbCamView.Name = "gbCamView";
this.gbCamView.Size = new System.Drawing.Size(287, 287); this.gbCamView.Size = new System.Drawing.Size(252, 320);
this.gbCamView.TabIndex = 0; this.gbCamView.TabIndex = 0;
this.gbCamView.TabStop = false; this.gbCamView.TabStop = false;
this.gbCamView.Text = "相机视图"; this.gbCamView.Text = "相机视图";
...@@ -265,52 +266,33 @@ ...@@ -265,52 +266,33 @@
// btnSwitch // btnSwitch
// //
this.btnSwitch.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnSwitch.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnSwitch.Dock = System.Windows.Forms.DockStyle.Right;
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(167, 273);
this.btnSwitch.Name = "btnSwitch"; this.btnSwitch.Name = "btnSwitch";
this.btnSwitch.Size = new System.Drawing.Size(83, 35); this.btnSwitch.Size = new System.Drawing.Size(82, 44);
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); this.btnSwitch.Click += new System.EventHandler(this.btnSwitch_Click);
// //
// cbxResolution
//
this.cbxResolution.Font = new System.Drawing.Font("宋体", 20F);
this.cbxResolution.FormattingEnabled = true;
this.cbxResolution.Location = new System.Drawing.Point(3, 246);
this.cbxResolution.Name = "cbxResolution";
this.cbxResolution.Size = new System.Drawing.Size(193, 35);
this.cbxResolution.TabIndex = 1;
this.cbxResolution.SelectedIndexChanged += new System.EventHandler(this.cbxResolution_SelectedIndexChanged);
//
// plVsp // plVsp
// //
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(3, 19);
this.plVsp.Name = "plVsp"; this.plVsp.Name = "plVsp";
this.plVsp.Size = new System.Drawing.Size(281, 223); this.plVsp.Size = new System.Drawing.Size(246, 254);
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(793, 0);
this.plRight.Name = "plRight"; this.plRight.Name = "plRight";
this.plRight.Size = new System.Drawing.Size(233, 681); this.plRight.Size = new System.Drawing.Size(151, 681);
this.plRight.TabIndex = 1; this.plRight.TabIndex = 1;
// //
// gbPhotoList // gbPhotoList
...@@ -320,7 +302,7 @@ ...@@ -320,7 +302,7 @@
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.Name = "gbPhotoList"; this.gbPhotoList.Name = "gbPhotoList";
this.gbPhotoList.Size = new System.Drawing.Size(233, 582); this.gbPhotoList.Size = new System.Drawing.Size(151, 597);
this.gbPhotoList.TabIndex = 2; this.gbPhotoList.TabIndex = 2;
this.gbPhotoList.TabStop = false; this.gbPhotoList.TabStop = false;
this.gbPhotoList.Text = "已拍照片"; this.gbPhotoList.Text = "已拍照片";
...@@ -334,16 +316,16 @@ ...@@ -334,16 +316,16 @@
this.flpPhotos.Location = new System.Drawing.Point(3, 19); this.flpPhotos.Location = new System.Drawing.Point(3, 19);
this.flpPhotos.Margin = new System.Windows.Forms.Padding(0); this.flpPhotos.Margin = new System.Windows.Forms.Padding(0);
this.flpPhotos.Name = "flpPhotos"; this.flpPhotos.Name = "flpPhotos";
this.flpPhotos.Size = new System.Drawing.Size(227, 560); this.flpPhotos.Size = new System.Drawing.Size(145, 575);
this.flpPhotos.TabIndex = 2; this.flpPhotos.TabIndex = 2;
// //
// gbUploading // gbUploading
// //
this.gbUploading.Controls.Add(this.btnUpload); this.gbUploading.Controls.Add(this.btnUpload);
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, 597);
this.gbUploading.Name = "gbUploading"; this.gbUploading.Name = "gbUploading";
this.gbUploading.Size = new System.Drawing.Size(233, 99); this.gbUploading.Size = new System.Drawing.Size(151, 84);
this.gbUploading.TabIndex = 1; this.gbUploading.TabIndex = 1;
this.gbUploading.TabStop = false; this.gbUploading.TabStop = false;
this.gbUploading.Text = "操作台"; this.gbUploading.Text = "操作台";
...@@ -355,7 +337,7 @@ ...@@ -355,7 +337,7 @@
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(3, 17); this.btnUpload.Location = new System.Drawing.Point(3, 17);
this.btnUpload.Name = "btnUpload"; this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(227, 79); this.btnUpload.Size = new System.Drawing.Size(145, 64);
this.btnUpload.TabIndex = 3; this.btnUpload.TabIndex = 3;
this.btnUpload.Text = "上传"; this.btnUpload.Text = "上传";
this.btnUpload.UseVisualStyleBackColor = false; this.btnUpload.UseVisualStyleBackColor = false;
...@@ -366,9 +348,9 @@ ...@@ -366,9 +348,9 @@
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(252, 0);
this.plMain.Name = "plMain"; this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(424, 681); this.plMain.Size = new System.Drawing.Size(541, 681);
this.plMain.TabIndex = 2; this.plMain.TabIndex = 2;
// //
// gbPhotoView // gbPhotoView
...@@ -379,7 +361,7 @@ ...@@ -379,7 +361,7 @@
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.Name = "gbPhotoView"; this.gbPhotoView.Name = "gbPhotoView";
this.gbPhotoView.Size = new System.Drawing.Size(424, 582); this.gbPhotoView.Size = new System.Drawing.Size(541, 602);
this.gbPhotoView.TabIndex = 1; this.gbPhotoView.TabIndex = 1;
this.gbPhotoView.TabStop = false; this.gbPhotoView.TabStop = false;
this.gbPhotoView.Text = "选中照片"; this.gbPhotoView.Text = "选中照片";
...@@ -390,18 +372,19 @@ ...@@ -390,18 +372,19 @@
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(3, 19);
this.ptbPhotoDisplay.Name = "ptbPhotoDisplay"; this.ptbPhotoDisplay.Name = "ptbPhotoDisplay";
this.ptbPhotoDisplay.Size = new System.Drawing.Size(418, 534); this.ptbPhotoDisplay.Size = new System.Drawing.Size(535, 552);
this.ptbPhotoDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.ptbPhotoDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.ptbPhotoDisplay.TabIndex = 4; this.ptbPhotoDisplay.TabIndex = 4;
this.ptbPhotoDisplay.TabStop = false; this.ptbPhotoDisplay.TabStop = false;
// //
// plDisplay // plDisplay
// //
this.plDisplay.Controls.Add(this.btnCamearTurn);
this.plDisplay.Controls.Add(this.lbDisplay); this.plDisplay.Controls.Add(this.lbDisplay);
this.plDisplay.Dock = System.Windows.Forms.DockStyle.Bottom; this.plDisplay.Dock = System.Windows.Forms.DockStyle.Bottom;
this.plDisplay.Location = new System.Drawing.Point(3, 553); this.plDisplay.Location = new System.Drawing.Point(3, 571);
this.plDisplay.Name = "plDisplay"; this.plDisplay.Name = "plDisplay";
this.plDisplay.Size = new System.Drawing.Size(418, 26); this.plDisplay.Size = new System.Drawing.Size(535, 28);
this.plDisplay.TabIndex = 3; this.plDisplay.TabIndex = 3;
// //
// lbDisplay // lbDisplay
...@@ -420,9 +403,9 @@ ...@@ -420,9 +403,9 @@
this.gbOperating.Controls.Add(this.btnEditor); this.gbOperating.Controls.Add(this.btnEditor);
this.gbOperating.Controls.Add(this.btnDelete); this.gbOperating.Controls.Add(this.btnDelete);
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, 602);
this.gbOperating.Name = "gbOperating"; this.gbOperating.Name = "gbOperating";
this.gbOperating.Size = new System.Drawing.Size(424, 99); this.gbOperating.Size = new System.Drawing.Size(541, 79);
this.gbOperating.TabIndex = 0; this.gbOperating.TabIndex = 0;
this.gbOperating.TabStop = false; this.gbOperating.TabStop = false;
this.gbOperating.Text = "操作台"; this.gbOperating.Text = "操作台";
...@@ -436,7 +419,7 @@ ...@@ -436,7 +419,7 @@
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(3, 17); this.btnShot.Location = new System.Drawing.Point(3, 17);
this.btnShot.Name = "btnShot"; this.btnShot.Name = "btnShot";
this.btnShot.Size = new System.Drawing.Size(185, 79); this.btnShot.Size = new System.Drawing.Size(343, 59);
this.btnShot.TabIndex = 5; this.btnShot.TabIndex = 5;
this.btnShot.Text = "拍照"; this.btnShot.Text = "拍照";
this.btnShot.UseVisualStyleBackColor = false; this.btnShot.UseVisualStyleBackColor = false;
...@@ -447,9 +430,9 @@ ...@@ -447,9 +430,9 @@
this.btnEditor.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnEditor.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnEditor.Dock = System.Windows.Forms.DockStyle.Right; this.btnEditor.Dock = System.Windows.Forms.DockStyle.Right;
this.btnEditor.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnEditor.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEditor.Location = new System.Drawing.Point(188, 17); this.btnEditor.Location = new System.Drawing.Point(346, 17);
this.btnEditor.Name = "btnEditor"; this.btnEditor.Name = "btnEditor";
this.btnEditor.Size = new System.Drawing.Size(137, 79); this.btnEditor.Size = new System.Drawing.Size(96, 59);
this.btnEditor.TabIndex = 4; this.btnEditor.TabIndex = 4;
this.btnEditor.Text = "裁剪"; this.btnEditor.Text = "裁剪";
this.btnEditor.UseVisualStyleBackColor = false; this.btnEditor.UseVisualStyleBackColor = false;
...@@ -460,14 +443,46 @@ ...@@ -460,14 +443,46 @@
this.btnDelete.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.btnDelete.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnDelete.Dock = System.Windows.Forms.DockStyle.Right; this.btnDelete.Dock = System.Windows.Forms.DockStyle.Right;
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(325, 17); this.btnDelete.Location = new System.Drawing.Point(442, 17);
this.btnDelete.Name = "btnDelete"; this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(96, 79); this.btnDelete.Size = new System.Drawing.Size(96, 59);
this.btnDelete.TabIndex = 2; this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除"; this.btnDelete.Text = "删除";
this.btnDelete.UseVisualStyleBackColor = false; this.btnDelete.UseVisualStyleBackColor = false;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
// //
// btnCamearTurn
//
this.btnCamearTurn.Dock = System.Windows.Forms.DockStyle.Right;
this.btnCamearTurn.Location = new System.Drawing.Point(447, 0);
this.btnCamearTurn.Name = "btnCamearTurn";
this.btnCamearTurn.Size = new System.Drawing.Size(88, 28);
this.btnCamearTurn.TabIndex = 31;
this.btnCamearTurn.Text = "旋转";
this.btnCamearTurn.UseVisualStyleBackColor = true;
this.btnCamearTurn.Click += new System.EventHandler(this.btnCamearTurn_Click);
//
// 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(246, 254);
this.vspCamView.TabIndex = 0;
this.vspCamView.Text = "vspCamView";
this.vspCamView.VideoSource = null;
//
// cbxResolution
//
this.cbxResolution.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbxResolution.Font = new System.Drawing.Font("宋体", 20F);
this.cbxResolution.FormattingEnabled = true;
this.cbxResolution.Location = new System.Drawing.Point(3, 273);
this.cbxResolution.Name = "cbxResolution";
this.cbxResolution.Size = new System.Drawing.Size(164, 35);
this.cbxResolution.TabIndex = 5;
this.cbxResolution.SelectedIndexChanged += new System.EventHandler(this.cbxResolution_SelectedIndexChanged);
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -508,7 +523,6 @@ ...@@ -508,7 +523,6 @@
private System.Windows.Forms.Panel plRight; private System.Windows.Forms.Panel plRight;
private System.Windows.Forms.Panel plMain; private System.Windows.Forms.Panel plMain;
private System.Windows.Forms.GroupBox gbCamView; private System.Windows.Forms.GroupBox gbCamView;
private System.Windows.Forms.ComboBox cbxResolution;
private System.Windows.Forms.Panel plVsp; private System.Windows.Forms.Panel plVsp;
private Controls.VideoSourcePlayer vspCamView; private Controls.VideoSourcePlayer vspCamView;
private System.Windows.Forms.Button btnSwitch; private System.Windows.Forms.Button btnSwitch;
...@@ -538,6 +552,8 @@ ...@@ -538,6 +552,8 @@
private System.Windows.Forms.Label lbDisplay; private System.Windows.Forms.Label lbDisplay;
private System.Windows.Forms.Button btnShot; private System.Windows.Forms.Button btnShot;
private System.Windows.Forms.Button btnEditor; private System.Windows.Forms.Button btnEditor;
private System.Windows.Forms.Button btnCamearTurn;
private System.Windows.Forms.ComboBox cbxResolution;
} }
} }
using Kivii.Linq; using Kivii.Imaging.Filters;
using Kivii.Imaging;
using Kivii.Linq;
using Kivii.Math.Geometry;
using Kivii.Messaging; using Kivii.Messaging;
using Kivii.Sample.ImageUploader.Entities; using Kivii.Sample.ImageUploader.Entities;
using Kivii.Video; using Kivii.Video;
...@@ -117,6 +120,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -117,6 +120,7 @@ namespace Kivii.Sample.ImageUploader
btnReportId.Enabled = !notLogin; btnReportId.Enabled = !notLogin;
btnShot.Enabled = !notLogin; btnShot.Enabled = !notLogin;
btnDelete.Enabled = !notLogin; btnDelete.Enabled = !notLogin;
btnEditor.Enabled = !notLogin;
btnLogout.Enabled = !notLogin; btnLogout.Enabled = !notLogin;
if (notLogin) if (notLogin)
...@@ -719,6 +723,33 @@ namespace Kivii.Sample.ImageUploader ...@@ -719,6 +723,33 @@ namespace Kivii.Sample.ImageUploader
picName += DateTime.Now.ToString("mmssfff"); picName += DateTime.Now.ToString("mmssfff");
var photo = new DbFile(bitmap, picName); var photo = new DbFile(bitmap, picName);
//if (chbRectify.Checked)
//{
// Bitmap temp = photo.Image.Clone() as Bitmap;
// var _counter = new BlobCounter();
// _counter.FilterBlobs = true;
// _counter.MinWidth = photo.Image.Width / 4;
// _counter.MinHeight = photo.Image.Height / 4;
// FiltersSequence seq = new FiltersSequence();
// seq.Add(Grayscale.CommonAlgorithms.BT709); //First add grayScaling filter
// seq.Add(new OtsuThreshold()); //Then add binarization(thresholding) filter
// temp = seq.Apply(temp);
// _counter.ProcessImage(temp);
// temp.Dispose();
// var blobs = _counter.GetObjectsInformation();
// if (blobs != null && blobs.Length > 0)
// {
// var corners = PointsCloud.FindQuadrilateralCorners(_counter.GetBlobsEdgePoints(blobs[0]));
// var rect = blobs[0].Rectangle;
// QuadrilateralTransformation quadTransformer = new QuadrilateralTransformation();
// quadTransformer.SourceQuadrilateral = corners; //Set corners for transforming card
// quadTransformer.AutomaticSizeCalculaton = true;
// photo.Image = quadTransformer.Apply(photo.Image);
// //ResizeBilinear resizer = new ResizeBilinear(rect.Width, rect.Height);
// }
//}
addSnapshot(photo); addSnapshot(photo);
Thread.Sleep(50); Thread.Sleep(50);
showSnapshot(photo); showSnapshot(photo);
...@@ -734,7 +765,24 @@ namespace Kivii.Sample.ImageUploader ...@@ -734,7 +765,24 @@ namespace Kivii.Sample.ImageUploader
MessageBox.Show("没有找到视频采集设备"); MessageBox.Show("没有找到视频采集设备");
} }
} }
private void btnCamearTurn_Click(object sender, EventArgs e)
{
if (currentPhoto == null) return;
if (currentPhoto.Image == null) return;
int index = 0;
var photo = photos.FirstOrDefault(o => o.Image == currentPhoto.Image);
if (photo != null)
{
index = photos.IndexOf(photo);
if (index <= -1) index = 0;
deleteSnapshot(photo);
}
currentPhoto.Image.RotateFlip(RotateFlipType.Rotate90FlipNone);
var editedPhoto = new DbFile(currentPhoto.Image, currentPhoto.Name);
addSnapshot(editedPhoto, index);
showSnapshot(editedPhoto);
}
private void PictureBox_Click(object sender, EventArgs e) private void PictureBox_Click(object sender, EventArgs e)
{ {
// 获取点击的 PictureBox 中的图片 // 获取点击的 PictureBox 中的图片
......
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