1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326 |
- using OpenCvSharp;
- using PaintDotNet.Adjust;
- using PaintDotNet.Adjust.BaseImage;
- using PaintDotNet.Annotation;
- using PaintDotNet.Annotation.Enum;
- using PaintDotNet.Annotation.ImageCollect;
- using PaintDotNet.Base.CommTool;
- using PaintDotNet.Base.SettingModel;
- using PaintDotNet.CustomControl;
- using PaintDotNet.ImageCollect;
- using PaintDotNet.ImageCollect.CameraEDOF;
- using PaintDotNet.ImageCollect.ImageStitching;
- using PaintDotNet.ImageCollect.MultiDimensiona;
- using PaintDotNet.Setting;
- using StageController;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Drawing.Drawing2D;
- using System.IO;
- using System.Linq;
- using System.Management;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Windows.Interop;
- using PaintDotNet.Hardware;
- using OpenCvSharp.Extensions;
- namespace PaintDotNet.ImageCollect
- {
- internal class MultiDimensionaDialog : HardwareBaseDialog
- {
- #region
- private System.ComponentModel.IContainer components = null;
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
- #endregion
- #region Windows Form Designer generated code
- private new void InitializeLanguageText()
- {
- this.groupBox13.Text = PdnResources.GetString("Menu.Puzzleeffect.text");
- this.groupBox7.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.SplicingSettings.text");
- this.ckSeamless.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Seamlesspattern.text");
- this.ckTile.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.tilemode.text");
- this.label13.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Stitchingway.text") + ":";
- this.groupBox5.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
- this.ckSize.Text = PdnResources.GetString("Menu.size.text");
- this.ckLockNull.Text = PdnResources.GetString("Menu.nothing.Text");
- this.ckArea.Text = PdnResources.GetString("Menu.area.text");
- this.label12.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Lockingmethod.text") + ":";
- this.btnDel.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.btnDetailed.Text = PdnResources.GetString("Menu.detailed.text");
- this.groupBox4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Puzzleway.text");
- this.ckOther.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.user-defined.text");
- this.btnEstablish.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Createpuzzlearea.text");
- this.ckPolygon.Text = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- this.ckRectangle.Text = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- this.ckCircular.Text = PdnResources.GetString("Menu.circular.Text");
- this.groupBox2.Text = PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text");
- this.btnWhiteBalance.Text = PdnResources.GetString("Menu.auto.text") + PdnResources.GetString("Menu.Image.WhiteBalance.Text");
- this.chkAutoExposure.Text = PdnResources.GetString("Menu.auto-exposure.text");
- this.btnOther.Text = PdnResources.GetString("Menu.othersettings.text");
- this.label6.Text = PdnResources.GetString("Menu.Exposurepercentage.text") + ":";
- this.label5.Text = PdnResources.GetString("Menu.timeofexposure.text") + ":";
- this.groupBox6.Text = PdnResources.GetString("Menu.HardwareControl.Text");
- this.btnDsRocker.Text = PdnResources.GetString("Menu.Disabletherocker.text");
- this.label4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.speed.text") + ":";
- this.groupBox12.Text = PdnResources.GetString("Menu.Fixedlength.text");
- this.groupBox11.Text = PdnResources.GetString("Menu.continuous.text");
- this.groupBox10.Text = PdnResources.GetString("Menu.viewmode.text");
- this.btnInloadstage.Text = PdnResources.GetString("Menu.enterfilm.text");
- this.groupBox9.Text = PdnResources.GetString("Menu.movementmode.text");
- this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
- this.btnStop.Text = PdnResources.GetString("Menu.stop.text");
- this.btnCreatImgFile.Text = PdnResources.GetString("Menu.Createpicture.text");
- this.btnWorking.Text = PdnResources.GetString("Menu.Started.text");
- this.groupBox3.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
- this.Text = PdnResources.GetString("Menu.ImageCollection.MultiDimensional.Text");
- base.InitializeLanguageText();
- }
- private void InitializeComponent()
- {
- this.panelall = new System.Windows.Forms.Panel();
- this.groupBox13 = new System.Windows.Forms.GroupBox();
- this.cmbStitchList = new System.Windows.Forms.ComboBox();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.picEffect = new System.Windows.Forms.PictureBox();
- this.groupBox7 = new System.Windows.Forms.GroupBox();
- this.ckSeamless = new System.Windows.Forms.RadioButton();
- this.ckTile = new System.Windows.Forms.RadioButton();
- this.label13 = new System.Windows.Forms.Label();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.ckSize = new System.Windows.Forms.RadioButton();
- this.ckLockNull = new System.Windows.Forms.RadioButton();
- this.ckArea = new System.Windows.Forms.RadioButton();
- this.label12 = new System.Windows.Forms.Label();
- this.dgvRegionTeb = new System.Windows.Forms.DataGridView();
- this.regionId = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionTiles = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionZ = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionArea = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.btnDel = new System.Windows.Forms.Button();
- this.btnDetailed = new System.Windows.Forms.Button();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.numOverlapRate = new System.Windows.Forms.NumericUpDown();
- this.label19 = new System.Windows.Forms.Label();
- this.ckOther = new System.Windows.Forms.RadioButton();
- this.btnEstablish = new System.Windows.Forms.Button();
- this.label11 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.txtAreaY = new System.Windows.Forms.TextBox();
- this.txtSizeY = new System.Windows.Forms.TextBox();
- this.txtTilesY = new System.Windows.Forms.TextBox();
- this.txtAreaX = new System.Windows.Forms.TextBox();
- this.txtSizeX = new System.Windows.Forms.TextBox();
- this.txtTilesX = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.ckPolygon = new System.Windows.Forms.RadioButton();
- this.ckRectangle = new System.Windows.Forms.RadioButton();
- this.ckCircular = new System.Windows.Forms.RadioButton();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.btnWhiteBalance = new System.Windows.Forms.Button();
- this.label16 = new System.Windows.Forms.Label();
- this.lblUnit = new System.Windows.Forms.Label();
- this.chkAutoExposure = new System.Windows.Forms.CheckBox();
- this.txtPercentage = new System.Windows.Forms.TextBox();
- this.txtTime = new System.Windows.Forms.TextBox();
- this.trackPercentage = new System.Windows.Forms.TrackBar();
- this.trackTime = new System.Windows.Forms.TrackBar();
- this.btnOther = new System.Windows.Forms.Button();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.label18 = new System.Windows.Forms.Label();
- this.label17 = new System.Windows.Forms.Label();
- this.label15 = new System.Windows.Forms.Label();
- this.pnlSpeed = new System.Windows.Forms.Panel();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbStepUnit = new System.Windows.Forms.ComboBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.groupBox12 = new System.Windows.Forms.GroupBox();
- this.groupBox11 = new System.Windows.Forms.GroupBox();
- this.groupBox10 = new System.Windows.Forms.GroupBox();
- this.panelVision = new System.Windows.Forms.Panel();
- this.groupBox9 = new System.Windows.Forms.GroupBox();
- this.panelMotion = new System.Windows.Forms.Panel();
- this.panelControl = new System.Windows.Forms.Panel();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.btnStop = new System.Windows.Forms.Button();
- this.btnCreatImgFile = new System.Windows.Forms.Button();
- this.btnWorking = new System.Windows.Forms.Button();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.panelall.SuspendLayout();
- this.groupBox13.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picEffect)).BeginInit();
- this.groupBox7.SuspendLayout();
- this.groupBox5.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).BeginInit();
- this.groupBox4.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).BeginInit();
- this.groupBox2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackTime)).BeginInit();
- this.groupBox6.SuspendLayout();
- this.groupBox12.SuspendLayout();
- this.groupBox11.SuspendLayout();
- this.groupBox10.SuspendLayout();
- this.groupBox9.SuspendLayout();
- this.groupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // lblXPosition
- //
- this.lblXPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblXPosition.AutoSize = true;
- this.lblXPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblXPosition.Location = new System.Drawing.Point(426, 642);
- this.lblXPosition.Size = new System.Drawing.Size(28, 14);
- this.lblXPosition.TabIndex = 42;
- this.lblXPosition.Text = "X:0";
- //
- // lblYPosition
- //
- this.lblYPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblYPosition.AutoSize = true;
- this.lblYPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblYPosition.Location = new System.Drawing.Point(426, 668);
- this.lblYPosition.Size = new System.Drawing.Size(28, 14);
- this.lblYPosition.TabIndex = 43;
- this.lblYPosition.Text = "Y:0";
- //
- // lblZPosition
- //
- this.lblZPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblZPosition.AutoSize = true;
- this.lblZPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblZPosition.Location = new System.Drawing.Point(426, 693);
- this.lblZPosition.Size = new System.Drawing.Size(28, 14);
- this.lblZPosition.TabIndex = 44;
- this.lblZPosition.Text = "Z:0";
- //
- // btnFreeloadstage
- //
- this.btnFreeloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnFreeloadstage.Location = new System.Drawing.Point(72, 684);
- this.btnFreeloadstage.Size = new System.Drawing.Size(59, 31);
- this.btnFreeloadstage.TabIndex = 31;
- this.btnFreeloadstage.Text = "锁定";
- this.btnFreeloadstage.UseVisualStyleBackColor = true;
- //
- // btnStoploadstage
- //
- this.btnStoploadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnStoploadstage.Location = new System.Drawing.Point(72, 639);
- this.btnStoploadstage.Size = new System.Drawing.Size(59, 33);
- this.btnStoploadstage.TabIndex = 30;
- this.btnStoploadstage.Text = "停止";
- this.btnStoploadstage.UseVisualStyleBackColor = true;
- //
- // btnResetloadstage
- //
- this.btnResetloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnResetloadstage.Location = new System.Drawing.Point(7, 639);
- this.btnResetloadstage.Size = new System.Drawing.Size(60, 33);
- this.btnResetloadstage.TabIndex = 29;
- this.btnResetloadstage.Text = "复位";
- this.btnResetloadstage.UseVisualStyleBackColor = true;
- //
- // btnCenterloadstage
- //
- this.btnCenterloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnCenterloadstage.Location = new System.Drawing.Point(7, 684);
- this.btnCenterloadstage.Size = new System.Drawing.Size(60, 31);
- this.btnCenterloadstage.TabIndex = 28;
- this.btnCenterloadstage.Text = "中心";
- this.btnCenterloadstage.UseVisualStyleBackColor = true;
- //
- // btnInloadstage
- //
- this.btnInloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnInloadstage.Location = new System.Drawing.Point(72, 592);
- this.btnInloadstage.Size = new System.Drawing.Size(61, 33);
- this.btnInloadstage.TabIndex = 27;
- this.btnInloadstage.Text = "进片";
- this.btnInloadstage.UseVisualStyleBackColor = true;
- //
- // btnOutloadstage
- //
- this.btnOutloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnOutloadstage.Location = new System.Drawing.Point(7, 592);
- this.btnOutloadstage.Size = new System.Drawing.Size(60, 33);
- this.btnOutloadstage.TabIndex = 26;
- this.btnOutloadstage.Text = "出片";
- this.btnOutloadstage.UseVisualStyleBackColor = true;
- //
- // btnZStop
- //
- this.btnZStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnZStop.Location = new System.Drawing.Point(346, 682);
- this.btnZStop.Size = new System.Drawing.Size(59, 33);
- this.btnZStop.TabIndex = 41;
- this.btnZStop.Text = "停止";
- this.btnZStop.UseVisualStyleBackColor = true;
- //
- // btnZFree
- //
- this.btnZFree.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnZFree.Location = new System.Drawing.Point(346, 641);
- this.btnZFree.Size = new System.Drawing.Size(59, 31);
- this.btnZFree.TabIndex = 40;
- this.btnZFree.Text = "锁定";
- this.btnZFree.UseVisualStyleBackColor = true;
- //
- // txtXStep
- //
- this.txtXStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtXStep.Location = new System.Drawing.Point(160, 592);
- this.txtXStep.Size = new System.Drawing.Size(68, 21);
- this.txtXStep.TabIndex = 35;
- this.txtXStep.Text = "1000";
- //
- // txtYStep
- //
- this.txtYStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtYStep.Location = new System.Drawing.Point(256, 592);
- this.txtYStep.Size = new System.Drawing.Size(68, 21);
- this.txtYStep.TabIndex = 36;
- this.txtYStep.Text = "1000";
- //
- // txtZStep
- //
- this.txtZStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtZStep.Location = new System.Drawing.Point(353, 592);
- this.txtZStep.Size = new System.Drawing.Size(68, 21);
- this.txtZStep.TabIndex = 37;
- this.txtZStep.Text = "200";
- //
- // btnContinuityLower
- //
- this.btnContinuityLower.Location = new System.Drawing.Point(5, 89);
- this.btnContinuityLower.Size = new System.Drawing.Size(46, 59);
- this.btnContinuityLower.TabIndex = 1;
- this.btnContinuityLower.UseVisualStyleBackColor = true;
- //
- // btnContinuityUp
- //
- this.btnContinuityUp.Location = new System.Drawing.Point(5, 24);
- this.btnContinuityUp.Size = new System.Drawing.Size(46, 59);
- this.btnContinuityUp.TabIndex = 1;
- this.btnContinuityUp.UseVisualStyleBackColor = true;
- //
- // btnFixedLower
- //
- this.btnFixedLower.Location = new System.Drawing.Point(5, 89);
- this.btnFixedLower.Size = new System.Drawing.Size(46, 59);
- this.btnFixedLower.TabIndex = 2;
- this.btnFixedLower.UseVisualStyleBackColor = true;
- //
- // btnFixedUp
- //
- this.btnFixedUp.Location = new System.Drawing.Point(5, 24);
- this.btnFixedUp.Size = new System.Drawing.Size(46, 59);
- this.btnFixedUp.TabIndex = 3;
- this.btnFixedUp.UseVisualStyleBackColor = true;
- //
- // btnCenterDisplay
- //
- this.btnCenterDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnCenterDisplay.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnCenterDisplay.Location = new System.Drawing.Point(427, 522);
- this.btnCenterDisplay.Size = new System.Drawing.Size(85, 33);
- this.btnCenterDisplay.TabIndex = 49;
- this.btnCenterDisplay.Text = "中心显示";
- this.btnCenterDisplay.UseVisualStyleBackColor = true;
- //
- // btnStopall
- //
- this.btnStopall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnStopall.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnStopall.Location = new System.Drawing.Point(427, 483);
- this.btnStopall.Size = new System.Drawing.Size(85, 33);
- this.btnStopall.TabIndex = 48;
- this.btnStopall.Text = "全部停止";
- this.btnStopall.UseVisualStyleBackColor = true;
- //
- // btnDsRocker
- //
- this.btnDsRocker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnDsRocker.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnDsRocker.Location = new System.Drawing.Point(427, 444);
- this.btnDsRocker.Size = new System.Drawing.Size(85, 33);
- this.btnDsRocker.TabIndex = 47;
- this.btnDsRocker.Text = "禁用摇杆";
- this.btnDsRocker.UseVisualStyleBackColor = true;
- //
- // panelall
- //
- this.panelall.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.panelall.Controls.Add(this.groupBox13);
- this.panelall.Controls.Add(this.groupBox7);
- this.panelall.Controls.Add(this.groupBox5);
- this.panelall.Controls.Add(this.groupBox4);
- this.panelall.Controls.Add(this.groupBox2);
- this.panelall.Controls.Add(this.groupBox6);
- this.panelall.Controls.Add(this.groupBox1);
- this.panelall.Location = new System.Drawing.Point(2, 2);
- this.panelall.Name = "panelall";
- this.panelall.Size = new System.Drawing.Size(1247, 790);
- this.panelall.TabIndex = 2;
- //
- // groupBox13
- //
- this.groupBox13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox13.Controls.Add(this.cmbStitchList);
- this.groupBox13.Controls.Add(this.pictureBox1);
- this.groupBox13.Controls.Add(this.picEffect);
- this.groupBox13.Location = new System.Drawing.Point(807, 56);
- this.groupBox13.Name = "groupBox13";
- this.groupBox13.Size = new System.Drawing.Size(438, 731);
- this.groupBox13.TabIndex = 22;
- this.groupBox13.TabStop = false;
- this.groupBox13.Text = "拼图效果";
- //
- // cmbStitchList
- //
- this.cmbStitchList.FormattingEnabled = true;
- this.cmbStitchList.Location = new System.Drawing.Point(315, 39);
- this.cmbStitchList.Name = "cmbStitchList";
- this.cmbStitchList.Size = new System.Drawing.Size(102, 20);
- this.cmbStitchList.TabIndex = 3;
- this.cmbStitchList.Visible = false;
- //
- // pictureBox1
- //
- this.pictureBox1.Location = new System.Drawing.Point(6, 164);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(424, 349);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
- this.pictureBox1.TabIndex = 1;
- this.pictureBox1.TabStop = false;
- //
- // picEffect
- //
- this.picEffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.picEffect.Location = new System.Drawing.Point(6, 17);
- this.picEffect.Name = "picEffect";
- this.picEffect.Size = new System.Drawing.Size(426, 708);
- this.picEffect.TabIndex = 0;
- this.picEffect.TabStop = false;
- //
- // groupBox7
- //
- this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox7.Controls.Add(this.ckSeamless);
- this.groupBox7.Controls.Add(this.ckTile);
- this.groupBox7.Controls.Add(this.label13);
- this.groupBox7.Location = new System.Drawing.Point(2, 726);
- this.groupBox7.Name = "groupBox7";
- this.groupBox7.Size = new System.Drawing.Size(280, 60);
- this.groupBox7.TabIndex = 20;
- this.groupBox7.TabStop = false;
- this.groupBox7.Text = "拼接设置";
- //
- // ckSeamless
- //
- this.ckSeamless.AutoSize = true;
- this.ckSeamless.Location = new System.Drawing.Point(185, 30);
- this.ckSeamless.Name = "ckSeamless";
- this.ckSeamless.Size = new System.Drawing.Size(71, 16);
- this.ckSeamless.TabIndex = 55;
- this.ckSeamless.Text = "无缝模式";
- this.ckSeamless.UseVisualStyleBackColor = true;
- //
- // ckTile
- //
- this.ckTile.AutoSize = true;
- this.ckTile.Checked = true;
- this.ckTile.Location = new System.Drawing.Point(91, 30);
- this.ckTile.Name = "ckTile";
- this.ckTile.Size = new System.Drawing.Size(71, 16);
- this.ckTile.TabIndex = 54;
- this.ckTile.TabStop = true;
- this.ckTile.Text = "平铺模式";
- this.ckTile.UseVisualStyleBackColor = true;
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label13.Location = new System.Drawing.Point(6, 32);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(65, 12);
- this.label13.TabIndex = 52;
- this.label13.Text = "拼接方式:";
- //
- // groupBox5
- //
- this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox5.Controls.Add(this.ckSize);
- this.groupBox5.Controls.Add(this.ckLockNull);
- this.groupBox5.Controls.Add(this.ckArea);
- this.groupBox5.Controls.Add(this.label12);
- this.groupBox5.Controls.Add(this.dgvRegionTeb);
- this.groupBox5.Controls.Add(this.btnDel);
- this.groupBox5.Controls.Add(this.btnDetailed);
- this.groupBox5.Location = new System.Drawing.Point(3, 374);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(280, 346);
- this.groupBox5.TabIndex = 19;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "拼图区域列表";
- //
- // ckSize
- //
- this.ckSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckSize.AutoSize = true;
- this.ckSize.Location = new System.Drawing.Point(218, 321);
- this.ckSize.Name = "ckSize";
- this.ckSize.Size = new System.Drawing.Size(47, 16);
- this.ckSize.TabIndex = 51;
- this.ckSize.Text = "大小";
- this.ckSize.UseVisualStyleBackColor = true;
- this.ckSize.CheckedChanged += new System.EventHandler(this.ckSize_CheckedChanged);
- //
- // ckLockNull
- //
- this.ckLockNull.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckLockNull.AutoSize = true;
- this.ckLockNull.Checked = true;
- this.ckLockNull.Location = new System.Drawing.Point(101, 321);
- this.ckLockNull.Name = "ckLockNull";
- this.ckLockNull.Size = new System.Drawing.Size(35, 16);
- this.ckLockNull.TabIndex = 50;
- this.ckLockNull.TabStop = true;
- this.ckLockNull.Text = "无";
- this.ckLockNull.UseVisualStyleBackColor = true;
- this.ckLockNull.CheckedChanged += new System.EventHandler(this.ckLockNull_CheckedChanged);
- //
- // ckArea
- //
- this.ckArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckArea.AutoSize = true;
- this.ckArea.Location = new System.Drawing.Point(156, 321);
- this.ckArea.Name = "ckArea";
- this.ckArea.Size = new System.Drawing.Size(47, 16);
- this.ckArea.TabIndex = 49;
- this.ckArea.Text = "面积";
- this.ckArea.UseVisualStyleBackColor = true;
- this.ckArea.CheckedChanged += new System.EventHandler(this.ckArea_CheckedChanged);
- //
- // label12
- //
- this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label12.AutoSize = true;
- this.label12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label12.Location = new System.Drawing.Point(6, 319);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(65, 12);
- this.label12.TabIndex = 48;
- this.label12.Text = "锁定方式:";
- //
- // dgvRegionTeb
- //
- this.dgvRegionTeb.AllowUserToAddRows = false;
- this.dgvRegionTeb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.dgvRegionTeb.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
- this.dgvRegionTeb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dgvRegionTeb.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
- this.regionId,
- this.regionName,
- this.regionTiles,
- this.regionZ,
- this.regionArea});
- this.dgvRegionTeb.Location = new System.Drawing.Point(2, 36);
- this.dgvRegionTeb.Name = "dgvRegionTeb";
- this.dgvRegionTeb.ReadOnly = true;
- this.dgvRegionTeb.RowHeadersVisible = false;
- this.dgvRegionTeb.RowHeadersWidth = 51;
- this.dgvRegionTeb.RowTemplate.Height = 23;
- this.dgvRegionTeb.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.dgvRegionTeb.Size = new System.Drawing.Size(274, 274);
- this.dgvRegionTeb.TabIndex = 0;
- this.dgvRegionTeb.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvRegionTeb_CellContentClick);
- this.dgvRegionTeb.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvRegionTeb_CellMouseClick);
- this.dgvRegionTeb.SelectionChanged += new System.EventHandler(this.dgvRegionTeb_SelectionChanged);
- //
- // regionId
- //
- this.regionId.FillWeight = 24F;
- this.regionId.HeaderText = "ID";
- this.regionId.MinimumWidth = 6;
- this.regionId.Name = "regionId";
- this.regionId.ReadOnly = true;
- this.regionId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionName
- //
- this.regionName.FillWeight = 60F;
- this.regionName.HeaderText = "Name";
- this.regionName.MinimumWidth = 6;
- this.regionName.Name = "regionName";
- this.regionName.ReadOnly = true;
- this.regionName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionTiles
- //
- this.regionTiles.FillWeight = 60F;
- this.regionTiles.HeaderText = "Tiles";
- this.regionTiles.MinimumWidth = 6;
- this.regionTiles.Name = "regionTiles";
- this.regionTiles.ReadOnly = true;
- this.regionTiles.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionZ
- //
- this.regionZ.FillWeight = 60F;
- this.regionZ.HeaderText = "Z(μm)";
- this.regionZ.MinimumWidth = 6;
- this.regionZ.Name = "regionZ";
- this.regionZ.ReadOnly = true;
- this.regionZ.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionArea
- //
- this.regionArea.FillWeight = 60F;
- this.regionArea.HeaderText = "Area(mm²)";
- this.regionArea.MinimumWidth = 6;
- this.regionArea.Name = "regionArea";
- this.regionArea.ReadOnly = true;
- this.regionArea.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // btnDel
- //
- this.btnDel.Location = new System.Drawing.Point(206, 11);
- this.btnDel.Name = "btnDel";
- this.btnDel.Size = new System.Drawing.Size(65, 23);
- this.btnDel.TabIndex = 47;
- this.btnDel.Text = "删除";
- this.btnDel.UseVisualStyleBackColor = true;
- this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
- //
- // btnDetailed
- //
- this.btnDetailed.Location = new System.Drawing.Point(137, 11);
- this.btnDetailed.Name = "btnDetailed";
- this.btnDetailed.Size = new System.Drawing.Size(68, 23);
- this.btnDetailed.TabIndex = 46;
- this.btnDetailed.Text = "详细";
- this.btnDetailed.UseVisualStyleBackColor = true;
- this.btnDetailed.Click += new System.EventHandler(this.btnDetailed_Click);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.numOverlapRate);
- this.groupBox4.Controls.Add(this.label19);
- this.groupBox4.Controls.Add(this.ckOther);
- this.groupBox4.Controls.Add(this.btnEstablish);
- this.groupBox4.Controls.Add(this.label11);
- this.groupBox4.Controls.Add(this.label10);
- this.groupBox4.Controls.Add(this.label9);
- this.groupBox4.Controls.Add(this.txtAreaY);
- this.groupBox4.Controls.Add(this.txtSizeY);
- this.groupBox4.Controls.Add(this.txtTilesY);
- this.groupBox4.Controls.Add(this.txtAreaX);
- this.groupBox4.Controls.Add(this.txtSizeX);
- this.groupBox4.Controls.Add(this.txtTilesX);
- this.groupBox4.Controls.Add(this.label8);
- this.groupBox4.Controls.Add(this.label7);
- this.groupBox4.Controls.Add(this.ckPolygon);
- this.groupBox4.Controls.Add(this.ckRectangle);
- this.groupBox4.Controls.Add(this.ckCircular);
- this.groupBox4.Location = new System.Drawing.Point(3, 176);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(280, 192);
- this.groupBox4.TabIndex = 18;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "拼图方式";
- //
- // numOverlapRate
- //
- this.numOverlapRate.DecimalPlaces = 2;
- this.numOverlapRate.Increment = new decimal(new int[] {
- 5,
- 0,
- 0,
- 131072});
- this.numOverlapRate.Location = new System.Drawing.Point(116, 119);
- this.numOverlapRate.Maximum = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- this.numOverlapRate.Minimum = new decimal(new int[] {
- 5,
- 0,
- 0,
- 131072});
- this.numOverlapRate.Name = "numOverlapRate";
- this.numOverlapRate.Size = new System.Drawing.Size(70, 21);
- this.numOverlapRate.TabIndex = 50;
- this.numOverlapRate.Value = new decimal(new int[] {
- 10,
- 0,
- 0,
- 131072});
- //
- // label19
- //
- this.label19.AutoSize = true;
- this.label19.Location = new System.Drawing.Point(22, 121);
- this.label19.Name = "label19";
- this.label19.Size = new System.Drawing.Size(77, 12);
- this.label19.TabIndex = 49;
- this.label19.Text = "Overlap Rate";
- //
- // ckOther
- //
- this.ckOther.AutoSize = true;
- this.ckOther.Checked = true;
- this.ckOther.Location = new System.Drawing.Point(206, 20);
- this.ckOther.Name = "ckOther";
- this.ckOther.Size = new System.Drawing.Size(59, 16);
- this.ckOther.TabIndex = 46;
- this.ckOther.TabStop = true;
- this.ckOther.Text = "自定义";
- this.ckOther.UseVisualStyleBackColor = true;
- this.ckOther.CheckedChanged += new System.EventHandler(this.ckOther_CheckedChanged);
- //
- // btnEstablish
- //
- this.btnEstablish.Location = new System.Drawing.Point(73, 153);
- this.btnEstablish.Name = "btnEstablish";
- this.btnEstablish.Size = new System.Drawing.Size(137, 23);
- this.btnEstablish.TabIndex = 45;
- this.btnEstablish.Text = "创建拼图区域";
- this.btnEstablish.UseVisualStyleBackColor = true;
- this.btnEstablish.Click += new System.EventHandler(this.btnEstablish_Click);
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label11.Location = new System.Drawing.Point(202, 44);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(35, 14);
- this.label11.TabIndex = 44;
- this.label11.Text = "Area";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label10.Location = new System.Drawing.Point(133, 44);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(35, 14);
- this.label10.TabIndex = 43;
- this.label10.Text = "Size";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label9.Location = new System.Drawing.Point(61, 44);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(42, 14);
- this.label9.TabIndex = 42;
- this.label9.Text = "Tiles";
- //
- // txtAreaY
- //
- this.txtAreaY.Enabled = false;
- this.txtAreaY.Location = new System.Drawing.Point(186, 83);
- this.txtAreaY.Name = "txtAreaY";
- this.txtAreaY.ReadOnly = true;
- this.txtAreaY.Size = new System.Drawing.Size(70, 21);
- this.txtAreaY.TabIndex = 41;
- //
- // txtSizeY
- //
- this.txtSizeY.Location = new System.Drawing.Point(116, 83);
- this.txtSizeY.Name = "txtSizeY";
- this.txtSizeY.Size = new System.Drawing.Size(70, 21);
- this.txtSizeY.TabIndex = 40;
- //
- // txtTilesY
- //
- this.txtTilesY.Location = new System.Drawing.Point(46, 83);
- this.txtTilesY.Name = "txtTilesY";
- this.txtTilesY.Size = new System.Drawing.Size(70, 21);
- this.txtTilesY.TabIndex = 39;
- //
- // txtAreaX
- //
- this.txtAreaX.Location = new System.Drawing.Point(186, 61);
- this.txtAreaX.Name = "txtAreaX";
- this.txtAreaX.Size = new System.Drawing.Size(70, 21);
- this.txtAreaX.TabIndex = 38;
- //
- // txtSizeX
- //
- this.txtSizeX.Location = new System.Drawing.Point(116, 61);
- this.txtSizeX.Name = "txtSizeX";
- this.txtSizeX.Size = new System.Drawing.Size(70, 21);
- this.txtSizeX.TabIndex = 37;
- //
- // txtTilesX
- //
- this.txtTilesX.Location = new System.Drawing.Point(46, 61);
- this.txtTilesX.Name = "txtTilesX";
- this.txtTilesX.Size = new System.Drawing.Size(70, 21);
- this.txtTilesX.TabIndex = 36;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label8.Location = new System.Drawing.Point(21, 86);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(21, 14);
- this.label8.TabIndex = 34;
- this.label8.Text = "Y:";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label7.Location = new System.Drawing.Point(21, 64);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(21, 14);
- this.label7.TabIndex = 33;
- this.label7.Text = "X:";
- //
- // ckPolygon
- //
- this.ckPolygon.AutoSize = true;
- this.ckPolygon.Location = new System.Drawing.Point(132, 20);
- this.ckPolygon.Name = "ckPolygon";
- this.ckPolygon.Size = new System.Drawing.Size(59, 16);
- this.ckPolygon.TabIndex = 3;
- this.ckPolygon.Text = "多边形";
- this.ckPolygon.UseVisualStyleBackColor = true;
- this.ckPolygon.CheckedChanged += new System.EventHandler(this.ckPolygon_CheckedChanged);
- //
- // ckRectangle
- //
- this.ckRectangle.AutoSize = true;
- this.ckRectangle.Location = new System.Drawing.Point(9, 20);
- this.ckRectangle.Name = "ckRectangle";
- this.ckRectangle.Size = new System.Drawing.Size(47, 16);
- this.ckRectangle.TabIndex = 2;
- this.ckRectangle.Text = "矩形";
- this.ckRectangle.UseVisualStyleBackColor = true;
- this.ckRectangle.CheckedChanged += new System.EventHandler(this.ckRectangle_CheckedChanged);
- //
- // ckCircular
- //
- this.ckCircular.AutoSize = true;
- this.ckCircular.Location = new System.Drawing.Point(73, 20);
- this.ckCircular.Name = "ckCircular";
- this.ckCircular.Size = new System.Drawing.Size(47, 16);
- this.ckCircular.TabIndex = 1;
- this.ckCircular.Text = "圆形";
- this.ckCircular.UseVisualStyleBackColor = true;
- this.ckCircular.CheckedChanged += new System.EventHandler(this.ckCircular_CheckedChanged);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.btnWhiteBalance);
- this.groupBox2.Controls.Add(this.label16);
- this.groupBox2.Controls.Add(this.lblUnit);
- this.groupBox2.Controls.Add(this.chkAutoExposure);
- this.groupBox2.Controls.Add(this.txtPercentage);
- this.groupBox2.Controls.Add(this.txtTime);
- this.groupBox2.Controls.Add(this.trackPercentage);
- this.groupBox2.Controls.Add(this.trackTime);
- this.groupBox2.Controls.Add(this.btnOther);
- this.groupBox2.Controls.Add(this.label6);
- this.groupBox2.Controls.Add(this.label5);
- this.groupBox2.Location = new System.Drawing.Point(3, 56);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(280, 114);
- this.groupBox2.TabIndex = 17;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "相机设置";
- //
- // btnWhiteBalance
- //
- this.btnWhiteBalance.Location = new System.Drawing.Point(96, 85);
- this.btnWhiteBalance.Name = "btnWhiteBalance";
- this.btnWhiteBalance.Size = new System.Drawing.Size(96, 23);
- this.btnWhiteBalance.TabIndex = 40;
- this.btnWhiteBalance.Text = "自动白平衡";
- this.btnWhiteBalance.UseVisualStyleBackColor = true;
- this.btnWhiteBalance.Click += new System.EventHandler(this.btnWhiteBalance_Click);
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(257, 47);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(11, 12);
- this.label16.TabIndex = 39;
- this.label16.Text = "%";
- //
- // lblUnit
- //
- this.lblUnit.AutoSize = true;
- this.lblUnit.Location = new System.Drawing.Point(257, 19);
- this.lblUnit.Name = "lblUnit";
- this.lblUnit.Size = new System.Drawing.Size(17, 12);
- this.lblUnit.TabIndex = 0;
- this.lblUnit.Text = "ms";
- //
- // chkAutoExposure
- //
- this.chkAutoExposure.AutoSize = true;
- this.chkAutoExposure.Location = new System.Drawing.Point(10, 88);
- this.chkAutoExposure.Name = "chkAutoExposure";
- this.chkAutoExposure.Size = new System.Drawing.Size(72, 16);
- this.chkAutoExposure.TabIndex = 0;
- this.chkAutoExposure.Text = "自动曝光";
- this.chkAutoExposure.UseVisualStyleBackColor = true;
- this.chkAutoExposure.Click += new System.EventHandler(this.chkAutoExposure_Click);
- //
- // txtPercentage
- //
- this.txtPercentage.Location = new System.Drawing.Point(214, 44);
- this.txtPercentage.Name = "txtPercentage";
- this.txtPercentage.Size = new System.Drawing.Size(42, 21);
- this.txtPercentage.TabIndex = 37;
- this.txtPercentage.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtPercentage_KeyPress);
- //
- // txtTime
- //
- this.txtTime.Location = new System.Drawing.Point(214, 17);
- this.txtTime.Name = "txtTime";
- this.txtTime.Size = new System.Drawing.Size(42, 21);
- this.txtTime.TabIndex = 36;
- this.txtTime.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTime_KeyPress);
- //
- // trackPercentage
- //
- this.trackPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.trackPercentage.AutoSize = false;
- this.trackPercentage.Location = new System.Drawing.Point(78, 45);
- this.trackPercentage.Maximum = 200;
- this.trackPercentage.Minimum = 5;
- this.trackPercentage.Name = "trackPercentage";
- this.trackPercentage.Size = new System.Drawing.Size(141, 25);
- this.trackPercentage.TabIndex = 5;
- this.trackPercentage.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackPercentage.Value = 5;
- this.trackPercentage.ValueChanged += new System.EventHandler(this.trackPercentage_ValueChanged);
- //
- // trackTime
- //
- this.trackTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.trackTime.AutoSize = false;
- this.trackTime.Location = new System.Drawing.Point(78, 19);
- this.trackTime.Maximum = 1000000;
- this.trackTime.Name = "trackTime";
- this.trackTime.Size = new System.Drawing.Size(141, 25);
- this.trackTime.TabIndex = 4;
- this.trackTime.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackTime.ValueChanged += new System.EventHandler(this.trackTime_ValueChanged);
- //
- // btnOther
- //
- this.btnOther.Location = new System.Drawing.Point(202, 85);
- this.btnOther.Name = "btnOther";
- this.btnOther.Size = new System.Drawing.Size(75, 23);
- this.btnOther.TabIndex = 3;
- this.btnOther.Text = "曝光设置";
- this.btnOther.UseVisualStyleBackColor = true;
- this.btnOther.Click += new System.EventHandler(this.btnCameraSetting_Click);
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(7, 47);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(77, 12);
- this.label6.TabIndex = 1;
- this.label6.Text = "曝光百分比:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(7, 20);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(65, 12);
- this.label5.TabIndex = 0;
- this.label5.Text = "曝光时间:";
- //
- // groupBox6
- //
- this.groupBox6.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.groupBox6.Controls.Add(this.label18);
- this.groupBox6.Controls.Add(this.label17);
- this.groupBox6.Controls.Add(this.label15);
- this.groupBox6.Controls.Add(this.pnlSpeed);
- this.groupBox6.Controls.Add(this.btnCenterDisplay);
- this.groupBox6.Controls.Add(this.btnStopall);
- this.groupBox6.Controls.Add(this.btnDsRocker);
- this.groupBox6.Controls.Add(this.lblZPosition);
- this.groupBox6.Controls.Add(this.lblYPosition);
- this.groupBox6.Controls.Add(this.lblXPosition);
- this.groupBox6.Controls.Add(this.btnZStop);
- this.groupBox6.Controls.Add(this.btnZFree);
- this.groupBox6.Controls.Add(this.label4);
- this.groupBox6.Controls.Add(this.cmbStepUnit);
- this.groupBox6.Controls.Add(this.txtZStep);
- this.groupBox6.Controls.Add(this.txtYStep);
- this.groupBox6.Controls.Add(this.txtXStep);
- this.groupBox6.Controls.Add(this.label3);
- this.groupBox6.Controls.Add(this.label2);
- this.groupBox6.Controls.Add(this.label1);
- this.groupBox6.Controls.Add(this.btnOutloadstage);
- this.groupBox6.Controls.Add(this.groupBox12);
- this.groupBox6.Controls.Add(this.btnFreeloadstage);
- this.groupBox6.Controls.Add(this.groupBox11);
- this.groupBox6.Controls.Add(this.groupBox10);
- this.groupBox6.Controls.Add(this.btnInloadstage);
- this.groupBox6.Controls.Add(this.groupBox9);
- this.groupBox6.Controls.Add(this.btnStoploadstage);
- this.groupBox6.Controls.Add(this.panelControl);
- this.groupBox6.Controls.Add(this.btnResetloadstage);
- this.groupBox6.Controls.Add(this.btnCenterloadstage);
- this.groupBox6.Location = new System.Drawing.Point(289, 56);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(512, 731);
- this.groupBox6.TabIndex = 16;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "硬件控制";
- this.groupBox6.Controls.SetChildIndex(this.btnCenterloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnResetloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.panelControl, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnStoploadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox9, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnInloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox10, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox11, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnFreeloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox12, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnOutloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.label1, 0);
- this.groupBox6.Controls.SetChildIndex(this.label2, 0);
- this.groupBox6.Controls.SetChildIndex(this.label3, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtXStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtYStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtZStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.cmbStepUnit, 0);
- this.groupBox6.Controls.SetChildIndex(this.label4, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnZFree, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnZStop, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblXPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblYPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblZPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnDsRocker, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnStopall, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnCenterDisplay, 0);
- this.groupBox6.Controls.SetChildIndex(this.pnlSpeed, 0);
- this.groupBox6.Controls.SetChildIndex(this.label15, 0);
- this.groupBox6.Controls.SetChildIndex(this.label17, 0);
- this.groupBox6.Controls.SetChildIndex(this.label18, 0);
- //
- // label18
- //
- this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label18.AutoSize = true;
- this.label18.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label18.Location = new System.Drawing.Point(408, 693);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(21, 14);
- this.label18.TabIndex = 53;
- this.label18.Text = "Z:";
- //
- // label17
- //
- this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label17.AutoSize = true;
- this.label17.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label17.Location = new System.Drawing.Point(408, 668);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(21, 14);
- this.label17.TabIndex = 54;
- this.label17.Text = "Y:";
- //
- // label15
- //
- this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label15.AutoSize = true;
- this.label15.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label15.Location = new System.Drawing.Point(408, 642);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(21, 14);
- this.label15.TabIndex = 55;
- this.label15.Text = "X:";
- //
- // pnlSpeed
- //
- this.pnlSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.pnlSpeed.Location = new System.Drawing.Point(185, 623);
- this.pnlSpeed.Name = "pnlSpeed";
- this.pnlSpeed.Size = new System.Drawing.Size(146, 102);
- this.pnlSpeed.TabIndex = 50;
- //
- // label4
- //
- this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label4.AutoSize = true;
- this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label4.Location = new System.Drawing.Point(138, 642);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(0, 14);
- this.label4.TabIndex = 39;
- //
- // cmbStepUnit
- //
- this.cmbStepUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.cmbStepUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cmbStepUnit.FormattingEnabled = true;
- this.cmbStepUnit.Items.AddRange(new object[] {
- "μm",
- "mm",
- "cm"});
- this.cmbStepUnit.Location = new System.Drawing.Point(427, 594);
- this.cmbStepUnit.Name = "cmbStepUnit";
- this.cmbStepUnit.Size = new System.Drawing.Size(69, 20);
- this.cmbStepUnit.TabIndex = 38;
- //
- // label3
- //
- this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label3.Location = new System.Drawing.Point(328, 595);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(21, 14);
- this.label3.TabIndex = 34;
- this.label3.Text = "Z:";
- //
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label2.Location = new System.Drawing.Point(231, 595);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(21, 14);
- this.label2.TabIndex = 33;
- this.label2.Text = "Y:";
- //
- // label1
- //
- this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label1.Location = new System.Drawing.Point(138, 595);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(21, 14);
- this.label1.TabIndex = 32;
- this.label1.Text = "X:";
- //
- // groupBox12
- //
- this.groupBox12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox12.Controls.Add(this.btnFixedLower);
- this.groupBox12.Controls.Add(this.btnFixedUp);
- this.groupBox12.Location = new System.Drawing.Point(370, 420);
- this.groupBox12.Name = "groupBox12";
- this.groupBox12.Size = new System.Drawing.Size(56, 162);
- this.groupBox12.TabIndex = 25;
- this.groupBox12.TabStop = false;
- this.groupBox12.Text = "定长";
- //
- // groupBox11
- //
- this.groupBox11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox11.Controls.Add(this.btnContinuityLower);
- this.groupBox11.Controls.Add(this.btnContinuityUp);
- this.groupBox11.Location = new System.Drawing.Point(312, 420);
- this.groupBox11.Name = "groupBox11";
- this.groupBox11.Size = new System.Drawing.Size(56, 162);
- this.groupBox11.TabIndex = 24;
- this.groupBox11.TabStop = false;
- this.groupBox11.Text = "连续";
- //
- // groupBox10
- //
- this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox10.Controls.Add(this.panelVision);
- this.groupBox10.Location = new System.Drawing.Point(160, 420);
- this.groupBox10.Name = "groupBox10";
- this.groupBox10.Size = new System.Drawing.Size(150, 162);
- this.groupBox10.TabIndex = 23;
- this.groupBox10.TabStop = false;
- this.groupBox10.Text = "视场模式";
- //
- // panelVision
- //
- this.panelVision.Location = new System.Drawing.Point(2, 14);
- this.panelVision.Name = "panelVision";
- this.panelVision.Size = new System.Drawing.Size(144, 144);
- this.panelVision.TabIndex = 2;
- //
- // groupBox9
- //
- this.groupBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox9.Controls.Add(this.panelMotion);
- this.groupBox9.Location = new System.Drawing.Point(6, 420);
- this.groupBox9.Name = "groupBox9";
- this.groupBox9.Size = new System.Drawing.Size(150, 162);
- this.groupBox9.TabIndex = 22;
- this.groupBox9.TabStop = false;
- this.groupBox9.Text = "运动模式";
- //
- // panelMotion
- //
- this.panelMotion.Location = new System.Drawing.Point(2, 14);
- this.panelMotion.Name = "panelMotion";
- this.panelMotion.Size = new System.Drawing.Size(144, 144);
- this.panelMotion.TabIndex = 1;
- //
- // panelControl
- //
- this.panelControl.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.panelControl.AutoScroll = true;
- this.panelControl.BackColor = System.Drawing.SystemColors.Control;
- this.panelControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panelControl.Location = new System.Drawing.Point(6, 17);
- this.panelControl.Name = "panelControl";
- this.panelControl.Size = new System.Drawing.Size(500, 394);
- this.panelControl.TabIndex = 14;
- //
- // groupBox1
- //
- this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox1.Controls.Add(this.btnStop);
- this.groupBox1.Controls.Add(this.btnCreatImgFile);
- this.groupBox1.Controls.Add(this.btnWorking);
- this.groupBox1.Location = new System.Drawing.Point(3, 3);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(1241, 47);
- this.groupBox1.TabIndex = 2;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "操作";
- //
- // btnStop
- //
- this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnStop.Location = new System.Drawing.Point(1019, 11);
- this.btnStop.Name = "btnStop";
- this.btnStop.Size = new System.Drawing.Size(89, 34);
- this.btnStop.TabIndex = 2;
- this.btnStop.Text = "停止";
- this.btnStop.UseVisualStyleBackColor = true;
- this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
- //
- // btnCreatImgFile
- //
- this.btnCreatImgFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCreatImgFile.Location = new System.Drawing.Point(1129, 11);
- this.btnCreatImgFile.Name = "btnCreatImgFile";
- this.btnCreatImgFile.Size = new System.Drawing.Size(92, 34);
- this.btnCreatImgFile.TabIndex = 1;
- this.btnCreatImgFile.Text = "创建图片";
- this.btnCreatImgFile.UseVisualStyleBackColor = true;
- this.btnCreatImgFile.Click += new System.EventHandler(this.btnCreatImgFile_Click);
- //
- // btnWorking
- //
- this.btnWorking.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnWorking.Location = new System.Drawing.Point(909, 11);
- this.btnWorking.Name = "btnWorking";
- this.btnWorking.Size = new System.Drawing.Size(89, 34);
- this.btnWorking.TabIndex = 0;
- this.btnWorking.Text = "开始";
- this.btnWorking.UseVisualStyleBackColor = true;
- this.btnWorking.Click += new System.EventHandler(this.btnWorking_Click);
- //
- // groupBox3
- //
- this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox3.Location = new System.Drawing.Point(2, 498);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(254, 84);
- this.groupBox3.TabIndex = 13;
- this.groupBox3.TabStop = false;
- //
- // MultiDimensionaDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1251, 796);
- this.Controls.Add(this.panelall);
- this.Controls.Add(this.groupBox3);
- this.MinimumSize = new System.Drawing.Size(1257, 750);
- this.Name = "MultiDimensionaDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "多维图像合成";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MultiDimensionaDialog_FormClosing);
- this.Controls.SetChildIndex(this.groupBox3, 0);
- this.Controls.SetChildIndex(this.panelall, 0);
- this.panelall.ResumeLayout(false);
- this.groupBox13.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picEffect)).EndInit();
- this.groupBox7.ResumeLayout(false);
- this.groupBox7.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).EndInit();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).EndInit();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackTime)).EndInit();
- this.groupBox6.ResumeLayout(false);
- this.groupBox6.PerformLayout();
- this.groupBox12.ResumeLayout(false);
- this.groupBox11.ResumeLayout(false);
- this.groupBox10.ResumeLayout(false);
- this.groupBox9.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- #endregion
- #region 控件
- private System.Windows.Forms.Panel panelall;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Button btnCreatImgFile;
- private System.Windows.Forms.Button btnWorking;
- private System.Windows.Forms.Button btnStop;
- private System.Windows.Forms.GroupBox groupBox6;
- private System.Windows.Forms.GroupBox groupBox3;
- private System.Windows.Forms.Panel panelControl;
- private System.Windows.Forms.GroupBox groupBox7;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.GroupBox groupBox4;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.GroupBox groupBox12;
- private System.Windows.Forms.GroupBox groupBox11;
- private System.Windows.Forms.GroupBox groupBox10;
- private System.Windows.Forms.GroupBox groupBox9;
- private System.Windows.Forms.ComboBox cmbStepUnit;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.GroupBox groupBox13;
- private System.Windows.Forms.Button btnOther;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.TextBox txtPercentage;
- private System.Windows.Forms.TextBox txtTime;
- private System.Windows.Forms.TrackBar trackPercentage;
- private System.Windows.Forms.TrackBar trackTime;
- private System.Windows.Forms.RadioButton ckPolygon;
- private System.Windows.Forms.RadioButton ckRectangle;
- private System.Windows.Forms.RadioButton ckCircular;
- private System.Windows.Forms.TextBox txtSizeX;
- private System.Windows.Forms.TextBox txtTilesX;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.DataGridView dgvRegionTeb;
- private System.Windows.Forms.Button btnDel;
- private System.Windows.Forms.Button btnDetailed;
- private System.Windows.Forms.Button btnEstablish;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox txtAreaY;
- private System.Windows.Forms.TextBox txtSizeY;
- private System.Windows.Forms.TextBox txtTilesY;
- private System.Windows.Forms.TextBox txtAreaX;
- private System.Windows.Forms.RadioButton ckSeamless;
- private System.Windows.Forms.RadioButton ckTile;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.RadioButton ckSize;
- private System.Windows.Forms.RadioButton ckLockNull;
- private System.Windows.Forms.RadioButton ckArea;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Panel panelVision;
- private System.Windows.Forms.Panel panelMotion;
- private System.Windows.Forms.PictureBox picEffect;
- private System.Windows.Forms.RadioButton ckOther;
- private System.Windows.Forms.CheckBox chkAutoExposure;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.Label lblUnit;
- private System.Windows.Forms.Button btnWhiteBalance;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionId;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionName;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionTiles;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionZ;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionArea;
- private System.Windows.Forms.Panel pnlSpeed;
- private System.Windows.Forms.PictureBox pictureBox1;
- private Label label18;
- private Label label17;
- private Label label15;
- private CircleControl circleControl;
- private CircleControl circleSportControl;
- #endregion
- private float m_overlapRate => (float)numOverlapRate.Value; // 拼接率
- private System.Timers.Timer m_aeTimer;
- private Thread m_stitchingThread;
- private double m_scale = 1;
- private bool _isDoing;
- private bool IsDoing
- {
- get => _isDoing;
- set
- {
- _isDoing = value;
- if (value)
- {
- this.Invoke(new Action(() =>
- {
- btnWorking.Enabled = false;
- btnStop.Enabled = true;
- }));
- }
- else
- {
- this.Invoke(new Action(() =>
- {
- btnWorking.Enabled = true;
- btnStop.Enabled = false;
- }));
- }
- }
- }
- private int m_origZStep;
- private NumericUpDown numOverlapRate;
- private Label label19;
- private ComboBox cmbStitchList;
- private Mat[] Coll_Ori = new Mat[2];
- public MultiDimensionaDialog() : base()
- {
- InitializeComponent();
- }
- public MultiDimensionaDialog(AppWorkspace appWorkspace) : base(appWorkspace)
- {
- InitializeComponent();
- InitializeLanguageText();
- m_aeTimer = new System.Timers.Timer(1000);
- m_aeTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimerAutoExposure);
- m_aeTimer.AutoReset = true;
- m_aeTimer.SynchronizingObject = this;
- this.panelControl.Controls.Add(m_documentWorkspace);
- this.m_documentWorkspace.GraphicsList.SelectChanged += GraphicsList_SelectChanged;
- circleControl = initViewCircal(71);
- circleSportControl = initSportCircal(71);
- this.panelVision.Controls.Add(this.circleControl);
- this.panelMotion.Controls.Add(this.circleSportControl);
- // 初始化步长单位
- this.cmbStepUnit.Items.Clear();
- this.cmbStepUnit.Items.AddRange(m_unit);
- this.cmbStepUnit.SelectedIndex = 1;
- this.btnStop.Enabled = false;
- }
- protected override void initCameraSetting()
- {
- int exposureVal = (int)(m_cameraParamModel.parame.LNExposure);
- if (exposureVal >= trackTime.Minimum && exposureVal <= trackTime.Maximum)
- {
- trackTime.Value = exposureVal;
- }
- UpdateExposureUI(m_cameraParamModel.parame.ATExposure);
- }
- private void MultiDimensionaDialog_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (_stchCtlrList == null) return;
- foreach (var item in _stchCtlrList)
- {
- item.Dispose();
- }
- _stchCtlrList.Clear();
- GC.Collect();
- }
- #region Step Length
- /// <summary>
- /// Y轴單次进长度
- /// </summary>
- protected override double StepLenthX
- {
- get
- {
- string text = txtXStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("Y" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- /// <summary>
- /// Y轴單次进长度
- /// </summary>
- protected override double StepLenthY
- {
- get
- {
- string text = txtYStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("Y" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- /// <summary>
- /// Z轴步进长度
- /// </summary>
- protected override double StepLenthZ
- {
- get
- {
- string text = txtZStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("Z" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- #endregion
- #region Speed
- protected override void ReinitSpeedUI()
- {
- InitGroupSpeed(pnlSpeed, SpeedChanged);
- (pnlSpeed.Controls[1] as RadioButton).Checked = true;
- }
- protected void SpeedChanged(object sender, EventArgs e)
- {
- RadioButton radio = (RadioButton)sender;
- if (radio.Checked)
- {
- int index = (int)radio.Tag;
- m_Stage.SetSpeedXY(m_speedLists[index].LSpeed);
- m_Stage.SetSpeedZ(m_speedLists[index].ZSpeed);
- }
- }
- #endregion
- #region 拼图方式
- /// <summary>
- /// 矩形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckRectangle_CheckedChanged(object sender, EventArgs e)
- {
- if (ckRectangle.Checked)
- {
- DrawStitchingRectangle.ViewWidth = m_viewWidth;
- DrawStitchingRectangle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 圆
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckCircular_CheckedChanged(object sender, EventArgs e)
- {
- if (ckCircular.Checked)
- {
- DrawStitchingCircle.ViewWidth = m_viewWidth;
- DrawStitchingCircle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingCircle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingCircle.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingCircle;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 多边形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckPolygon_CheckedChanged(object sender, EventArgs e)
- {
- if (ckPolygon.Checked)
- {
- DrawStitchingPolygon.ViewWidth = m_viewWidth;
- DrawStitchingPolygon.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingPolygon.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingPolygon.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingPolygon;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 自定义
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckOther_CheckedChanged(object sender, EventArgs e)
- {
- btnEstablish.Enabled = true;
- }
- /// <summary>
- /// 创建自定义矩形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnEstablish_Click(object sender, EventArgs e)
- {
- DrawStitchingRectangle.ViewWidth = m_viewWidth;
- DrawStitchingRectangle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.SIZE;
- }
- string tilesX = txtTilesX.Text.Trim();
- string tilesY = txtTilesY.Text.Trim();
- string sizeX = txtSizeX.Text.Trim();
- string sizeY = txtSizeY.Text.Trim();
- string areaX = txtAreaX.Text.Trim();
- if (!string.IsNullOrEmpty(tilesX) && !string.IsNullOrEmpty(tilesY))
- {
- int x = Int32.Parse(tilesX);
- int y = Int32.Parse(tilesY);
- if (x <= 0 || y <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Tilesmusthavavalue.Text"));
- return;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- int width = (int)Math.Floor(Convert.ToDouble(((x - (x + 1) * m_overlapRate) * m_viewWidth))) - 1;
- int height = (int)Math.Floor(Convert.ToDouble(((y - (y + 1) * m_overlapRate) * m_viewHeight))) - 1;
- Console.WriteLine(width + " " + height + " " + m_viewHeight);
- m_documentWorkspace.CreateStitchingRectangle(width, height);
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- if (!string.IsNullOrEmpty(sizeX) && !string.IsNullOrEmpty(sizeY))
- {
- float w = float.Parse(sizeX);
- float h = float.Parse(sizeY);
- if (w <= 0 || h <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Sizevaluemustbegreaterthan0.Text"));
- return;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- m_documentWorkspace.CreateStitchingRectangle((int)(w * 1000 / m_PxLength), (int)(h * 1000 / m_PxLength));
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- if (!string.IsNullOrEmpty(areaX))
- {
- double area = double.Parse(areaX);
- if (area <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.TheAreavaluemustbegreaterthan0.Text"));
- return;
- }
- double side = Math.Round(Math.Sqrt(area), 2);
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- m_documentWorkspace.CreateStitchingRectangle((int)(side * 1000 / m_PxLength), (int)(side * 1000 / m_PxLength));
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- }
- #endregion
- #region 拼图区域列表
- private void GraphicsList_SelectChanged(object sender, EventArgs e)
- {
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- dgvRegionTeb.Rows.Clear();
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- int count = graphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
- double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
- graphicsList[i].PropertyChanged += CameraImageStitching_PropertyChanged;
- string name = "";
- if (graphicsList[i] is DrawStitchingRectangle)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- }
- else if (graphicsList[i] is DrawStitchingPolygon)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- }
- else
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
- }
- dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], m_origZStep, area);
- if (graphicsList[i].Selected)
- {
- dgvRegionTeb.Rows[i].Selected = true;
- dgvRegionTeb.CurrentCell = dgvRegionTeb.Rows[i].Cells[0];
- }
- }
- }
- private void CameraImageStitching_PropertyChanged(object sender, EventArgs e)
- {
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- this.DgvRegionTebRefresh();
- }
- private void DgvRegionTebRefresh()
- {
- dgvRegionTeb.Rows.Clear();
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- int count = graphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
- double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
- string name;
- if (graphicsList[i] is DrawStitchingRectangle)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- }
- else if (graphicsList[i] is DrawStitchingPolygon)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- }
- else
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
- }
- dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], m_origZStep, area);
- }
- }
- private void UpdateActiveTool(DrawToolType activeTool)
- {
- switch (activeTool)
- {
- case DrawToolType.DrawStitchingRectangle:
- this.ckRectangle.Checked = true;
- break;
- case DrawToolType.DrawStitchingCircle:
- this.ckCircular.Checked = true;
- break;
- case DrawToolType.DrawStitchingPolygon:
- this.ckPolygon.Checked = true;
- break;
- case DrawToolType.Pointer:
- this.ckOther.Checked = true;
- break;
- }
- }
- /// <summary>
- /// 无锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckLockNull_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.NULL);
- }
- this.m_documentWorkspace.Refresh();
- }
- /// <summary>
- /// 面积锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckArea_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.AREA);
- }
- this.m_documentWorkspace.Refresh();
- }
- /// <summary>
- /// 大小锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckSize_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.SIZE);
- }
- this.m_documentWorkspace.Refresh();
- }
- private void btnDel_Click(object sender, EventArgs e)
- {
- if (dgvRegionTeb.SelectedRows.Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Selectthedatatoelete0.Text"));
- return;
- }
- DialogResult result = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretodelete.Text") + "?", PdnResources.GetString("Menu.Tips.text"), MessageBoxButtons.OKCancel);
- if (result == DialogResult.OK)
- {
- //执行删除
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- this.m_documentWorkspace.GraphicsList.RemoveAt(r.Index);
- }
- }
- this.DgvRegionTebRefresh();
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- this.m_documentWorkspace.GraphicsList[r.Index].Selected = true;
- }
- }
- this.m_documentWorkspace.Refresh();
- }
- }
- private void dgvRegionTeb_SelectionChanged(object sender, EventArgs e)
- {
- }
- private void dgvRegionTeb_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- this.m_documentWorkspace.GraphicsList.UnselectAll();
- for (int i = 0; i < dgvRegionTeb.Rows.Count; i++)
- {
- if (dgvRegionTeb.Rows[i].Selected)
- {
- this.m_documentWorkspace.GraphicsList[i].Selected = true;
- }
- else
- {
- this.m_documentWorkspace.GraphicsList[i].Selected = false;
- }
- }
- this.m_documentWorkspace.Refresh();
- }
- private void dgvRegionTeb_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- }
- /// <summary>
- /// 详细
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnDetailed_Click(object sender, EventArgs e)
- {
- if (dgvRegionTeb.SelectedRows.Count > 1 || dgvRegionTeb.SelectedRows.Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleasselectandselecnlyoneuzzlearea0.Text"));
- return;
- }
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- MultiDimensionaDetailDialog detailDialog = new MultiDimensionaDetailDialog(this.m_documentWorkspace, r.Index);
- detailDialog.ShowDialog();
- }
- }
- }
- /// <summary>
- /// 删除拼图区域
- /// </summary>
- /// <param name="vIndex"></param>
- /// <param name="pIndex"></param>
- private void DetailDialog_Deleted(int vIndex, int pIndex)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[vIndex]).DeletePoint(pIndex);
- this.m_documentWorkspace.Refresh();
- }
- #endregion
- #region 相机设置
- /// <summary>
- /// 其它设置
- /// </summary>
- private void btnCameraSetting_Click(object sender, EventArgs e)
- {
- using (CameraSettingDialog af = new CameraSettingDialog())
- {
- af.ShowDialog();
- }
- }
- /// <summary>
- /// 自动曝光
- /// </summary>
- private void chkAutoExposure_Click(object sender, EventArgs e)
- {
- int autoExposure = chkAutoExposure.Checked ? 1 : 0;
- m_cameraParamModel.parame.ATExposure = autoExposure;
- if (autoExposure == 0)
- {
- trackPercentage.Value = 100;
- }
- UpdateExposureUI(autoExposure);
- }
- private void UpdateExposureUI(int autoExposure)
- {
- if (autoExposure == 1)
- {
- // 自动曝光
- trackTime.Enabled = false;
- txtTime.Enabled = false;
- trackPercentage.Enabled = false;
- txtPercentage.Enabled = false;
- chkAutoExposure.Checked = true;
- trackPercentage.Value = 100;
- m_aeTimer.Start();
- }
- else
- {
- trackTime.Enabled = true;
- txtTime.Enabled = true;
- trackPercentage.Enabled = true;
- txtPercentage.Enabled = true;
- chkAutoExposure.Checked = false;
- m_aeTimer.Stop();
- }
- }
- public void OnTimerAutoExposure(object source, System.Timers.ElapsedEventArgs e)
- {
- double paramValue = m_camera.ExposureTime;
- int expValue = (int)(paramValue * 1000);
- if (expValue < 137)
- {
- expValue = 130;
- }
- if (expValue > 15000000)
- {
- expValue = 15000000;
- }
- trackTime.Value = expValue;
- txtTime.Text = paramValue.ToString();
- }
- private void trackTime_ValueChanged(object sender, EventArgs e)
- {
- //规划为微秒值存储到model
- double atExpValue = (double)(this.trackTime.Value) / 1000;
- this.m_cameraParamModel.parame.LNExposure = atExpValue;
- m_camera.ExposureTime = atExpValue;
- this.txtTime.Text = atExpValue.ToString();
- }
- private void txtTime_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
- {
- e.Handled = true;
- return;
- }
- if (e.KeyChar == (char)Keys.Enter)
- {
- try
- {
- int baoGuangTBarVal = Convert.ToInt32(txtTime.Text);
- switch (lblUnit.Text)
- {
- case "s":
- baoGuangTBarVal = baoGuangTBarVal * 1000 * 1000;
- break;
- case "ms":
- baoGuangTBarVal = baoGuangTBarVal * 1000;
- break;
- }
- if (baoGuangTBarVal > trackTime.Maximum)
- {
- baoGuangTBarVal = trackTime.Maximum;
- }
- if (baoGuangTBarVal < trackTime.Minimum)
- {
- baoGuangTBarVal = trackTime.Minimum;
- }
- trackTime.Value = baoGuangTBarVal;
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- }
- private void trackPercentage_ValueChanged(object sender, EventArgs e)
- {
- }
- private void txtPercentage_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
- {
- e.Handled = true;
- return;
- }
- if (e.KeyChar == (char)Keys.Enter)
- {
- try
- {
- int baoGuangPerTBarVal = Convert.ToInt32(txtPercentage.Text);
- if (baoGuangPerTBarVal < 5)
- {
- baoGuangPerTBarVal = 5;
- }
- if (baoGuangPerTBarVal > 200)
- {
- baoGuangPerTBarVal = 200;
- }
- trackPercentage.Value = baoGuangPerTBarVal;
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- }
- /// <summary>
- /// 白平衡
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnWhiteBalance_Click(object sender, EventArgs e)
- {
- m_cameraParamModel.parame.WhiteBalance = 1;
- // 自动白平衡
- m_camera.WhiteBalanceMode = 2;
- }
- #endregion
- #region 拼图
- private StitchingController _stitching;
- private List<StitchingController> _stchCtlrList;
- private void btnStop_Click(object sender, EventArgs e)
- {
- IsDoing = false;
- m_Stage.LockStage();
- m_Stage.LockZ();
- }
- /// <summary>
- /// 拼图开始
- /// </summary>
- private void btnWorking_Click(object sender, EventArgs e)
- {
- if (!m_camera.IsOpen())
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseconfirmwhetherthecameraisconnected.Text"));
- return;
- }
- if (!m_isReset)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseresetfirst.Text"));
- return;
- }
- if (this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch).Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleasereatethepuzzleareafirst.Text"));
- return;
- }
- _stchCtlrList = new List<StitchingController>();
- IsDoing = true;
- m_stitchingThread = new Thread(new ThreadStart(StitchingMoveThreadEntry));
- m_stitchingThread.Start();
- ///展示拼图成果
- new Task(() =>
- {
- do
- {
- if (_stitching != null)
- {
- if (_stitching.Result != null)
- this.Invoke(new Action(() =>
- {
- pictureBox1.Image = _stitching.Result;
- pictureBox1.Invalidate();
- }));
- }
- else Thread.Sleep(300);
- } while ((IsDoing || (_stitching != null && !_stitching.IsDone)));
- }).Start();
- }
- /// <summary>
- /// 景深融合
- /// </summary>
- protected override void DepthMerge()
- {
- m_Stage.WaitMoveDone();
- if (m_zMat == null)
- {
- m_zMat = PaintDotNet.Camera.Tools.ToMat(m_BitmapCurrent);
- }
- else
- {
- //原始图
- Coll_Ori[1] = PaintDotNet.Camera.Tools.ToMat(m_BitmapCurrent);
- Coll_Ori[0] = m_zMat;
- m_zMat = Merge.GetMergeMatForCamera(Coll_Ori);
- GC.Collect();
- }
- }
- private Mat m_zMat;
- private void StitchingMoveThreadEntry()
- {
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- for (int i = 0; i < graphicsList.Count; i++)
- {
- var draw = (DrawStithchingBase)graphicsList[i];
- List<Dictionary<int, object>> list = draw.GetViewPoints();
- PointF currentPointF = (PointF)list[0][0];
- this.Invoke(new Action(() =>
- {
- if (i == 0)
- cmbStitchList.Items.Clear();
- cmbStitchList.Items.Add(i);
- cmbStitchList.Visible = i > 0;
- }));
- //_stitching?.Wait();
- _stitching = new StitchingController(draw.ColumnNum, draw.RowNum, m_overlapRate);
- _stchCtlrList.Add(_stitching);
- _stitching.Start();
- for (int j = 0; j < list.Count; j++)
- {
- if (!IsDoing) return;//结束
- Dictionary<int, object> point = list[j];
- //if (point[1].ToString().Equals("0"))
- {
- PointF nextP = (PointF)point[0];
- var x = ConvertPXToUm((int)(nextP.X));
- var y = ConvertPXToUm((int)(nextP.Y));
- base.m_Stage.To(x, y);
- m_Stage.WaitMoveDone();
- //景深融合
- Bitmap img0;
- ZScanParameter scan = ((DrawStithchingBase)graphicsList[i]).GetZAxisScan(j);
- if (scan.Track > 0)
- {
- m_zMat = null;
- var _isDepthMerging = true;
- m_Stage.ZScan(scan.Start, scan.Track, scan.Times, DepthMerge, null, () => _isDepthMerging = false);
- while (_isDepthMerging)
- {
- if (!IsDoing) return;
- Thread.Sleep(50);
- }
- img0 = BitmapConverter.ToBitmap(m_zMat);
- }
- else
- {
- base.m_Stage.UpTo(m_origZStep);
- m_Stage.WaitMoveDone();
- img0 = m_BitmapCurrent;
- }
- _stitching.Add(img0);
- }
- }
- }
- _stitching?.Wait();
- //拼图结束
- IsDoing = false;
- this.Invoke(new Action(() =>
- {
- cmbStitchList.SelectedIndex = cmbStitchList.Items.Count - 1;
- }));
- }
- private void btnCreatImgFile_Click(object sender, EventArgs e)
- {
- if (_stitching == null)
- {
- MessageBox.Show(PdnResources.GetString("Menu.NoMosaicimagefound.Text"));
- return;
- }
- //获取命名
- string photoName;
- if (Startup.instance.ruleDB == null)
- {
- photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, "默认标尺", "0");
- }
- else
- {
- photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, Startup.instance.ruleDB.ruler_name, Startup.instance.ruleDB.gain_multiple.ToString());
- }
- DocumentWorkspace dw = m_appWorkspace.AddNewDocumentWorkspace();
- Document document = Document.FromImageMat(_stitching.ResultMat);
- document.Dirty = true;
- dw.Document = document;
- dw.fileText = photoName;
- dw.xmlSaveModel = Startup.instance.ruleDB;
- dw.InitRulerInfo();
- //激活
- m_appWorkspace.ActiveDocumentWorkspace = dw;
- //锁定扩缩
- if (m_appWorkspace.isLockZoom && m_appWorkspace.lockScaleRatio > 0)
- {
- m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.ScaleFactor;
- m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor = ScaleFactor.FromDouble(m_appWorkspace.lockScaleRatio);
- m_appWorkspace.SetZoonTrackValue(m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor);
- }
- else
- {
- m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.FitToWindow;
- }
- m_appWorkspace.Refresh();
- }
- #endregion
- }
- }
|