CameraImageStitching.cs 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647
  1. using OpenCvSharp;
  2. using PaintDotNet.Adjust;
  3. using PaintDotNet.Adjust.BaseImage;
  4. using PaintDotNet.Annotation;
  5. using PaintDotNet.Annotation.Enum;
  6. using PaintDotNet.Annotation.ImageCollect;
  7. using PaintDotNet.Base.CommTool;
  8. using PaintDotNet.Base.SettingModel;
  9. using PaintDotNet.CustomControl;
  10. using PaintDotNet.Hardware;
  11. using PaintDotNet.ImageCollect.ImageStitching;
  12. using PaintDotNet.Setting;
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Drawing;
  16. using System.Linq;
  17. using System.Runtime.InteropServices;
  18. using System.Threading;
  19. using System.Threading.Tasks;
  20. using System.Windows.Forms;
  21. using TUCAMAPI;
  22. using TUCamera;
  23. namespace PaintDotNet.ImageCollect
  24. {
  25. internal class CameraImageStitching : HardwareBaseDialog
  26. {
  27. /// <summary>
  28. /// Required designer variable.
  29. /// </summary>
  30. private System.ComponentModel.IContainer components = null;
  31. /// <summary>
  32. /// Clean up any resources being used.
  33. /// </summary>
  34. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  35. protected override void Dispose(bool disposing)
  36. {
  37. if (disposing && (components != null))
  38. {
  39. components.Dispose();
  40. }
  41. base.Dispose(disposing);
  42. }
  43. #region Windows Form Designer generated code
  44. private new void InitializeLanguageText()
  45. {
  46. this.groupBox13.Text = PdnResources.GetString("Menu.Puzzleeffect.text");
  47. this.groupBox8.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Focus.text");
  48. this.comChoice.Items.AddRange(new object[] {
  49. PdnResources.GetString("Menu.imagecapture.Imagestitching.everypiece.text"),
  50. PdnResources.GetString("Menu.imagecapture.Imagestitching.Everytwo.text"),
  51. PdnResources.GetString("Menu.imagecapture.Imagestitching.Everythree.text"),
  52. PdnResources.GetString("Menu.imagecapture.Imagestitching.EveryFive.text"),
  53. PdnResources.GetString("Menu.imagecapture.Imagestitching.Everyseven.text"),
  54. PdnResources.GetString("Menu.imagecapture.Imagestitching.Everynine.text"),
  55. PdnResources.GetString("Menu.imagecapture.Imagestitching.EveryTen.text")});
  56. this.label14.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.autofocusselect.text") + ":";
  57. this.ckFocusingRepair.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.focus-compensating.text");
  58. this.ckFocusingNull.Text = PdnResources.GetString("Menu.nothing.Text");
  59. this.ckAtuoFocusing.Text = PdnResources.GetString("Menu.ImageCollection.Autofocus.Text");
  60. this.groupBox7.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.SplicingSettings.text");
  61. this.ckSeamless.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Seamlesspattern.text");
  62. this.ckTile.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.tilemode.text");
  63. this.label13.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Stitchingway.text") + ":";
  64. this.groupBox5.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
  65. this.ckSize.Text = PdnResources.GetString("Menu.size.text");
  66. this.ckLockNull.Text = PdnResources.GetString("Menu.nothing.Text");
  67. this.ckArea.Text = PdnResources.GetString("Menu.area.text");
  68. this.label12.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Lockingmethod.text") + ":";
  69. this.btnDel.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
  70. this.btnDetailed.Text = PdnResources.GetString("Menu.detailed.text");
  71. this.groupBox4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Puzzleway.text");
  72. this.ckOther.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.user-defined.text");
  73. this.btnEstablish.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Createpuzzlearea.text");
  74. this.ckPolygon.Text = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
  75. this.ckRectangle.Text = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
  76. this.ckCircular.Text = PdnResources.GetString("Menu.circular.Text");
  77. this.groupBox2.Text = PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text");
  78. this.btnWhiteBalance.Text = PdnResources.GetString("Menu.auto.text") + PdnResources.GetString("Menu.Image.WhiteBalance.Text");
  79. this.chkAutoExposure.Text = PdnResources.GetString("Menu.auto-exposure.text");
  80. this.btnOther.Text = PdnResources.GetString("Menu.othersettings.text");
  81. this.label6.Text = PdnResources.GetString("Menu.Exposurepercentage.text") + ":";
  82. this.label5.Text = PdnResources.GetString("Menu.timeofexposure.text") + ":";
  83. this.groupBox6.Text = PdnResources.GetString("Menu.HardwareControl.Text");
  84. this.label4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.speed.text") + ":";
  85. this.groupBox12.Text = PdnResources.GetString("Menu.Fixedlength.text");
  86. this.groupBox11.Text = PdnResources.GetString("Menu.continuous.text");
  87. this.groupBox10.Text = PdnResources.GetString("Menu.viewmode.text");
  88. this.btnInloadstage.Text = PdnResources.GetString("Menu.enterfilm.text");
  89. this.groupBox9.Text = PdnResources.GetString("Menu.movementmode.text");
  90. this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
  91. this.btnStop.Text = PdnResources.GetString("Menu.stop.text");
  92. this.btnCreatImgFile.Text = PdnResources.GetString("Menu.Createpicture.text");
  93. this.btnWorking.Text = PdnResources.GetString("Menu.Started.text");
  94. this.groupBox3.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
  95. this.Text = PdnResources.GetString("Menu.ImageCollection.ImageStitching.Text");
  96. base.InitializeLanguageText();
  97. }
  98. /// <summary>
  99. /// Required method for Designer support - do not modify
  100. /// the contents of this method with the code editor.
  101. /// </summary>
  102. private void InitializeComponent()
  103. {
  104. this.panelall = new System.Windows.Forms.Panel();
  105. this.groupBox13 = new System.Windows.Forms.GroupBox();
  106. this.cmbStitchList = new System.Windows.Forms.ComboBox();
  107. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  108. this.picEffect = new System.Windows.Forms.PictureBox();
  109. this.groupBox8 = new System.Windows.Forms.GroupBox();
  110. this.comChoice = new System.Windows.Forms.ComboBox();
  111. this.label14 = new System.Windows.Forms.Label();
  112. this.ckFocusingRepair = new System.Windows.Forms.RadioButton();
  113. this.ckFocusingNull = new System.Windows.Forms.RadioButton();
  114. this.ckAtuoFocusing = new System.Windows.Forms.RadioButton();
  115. this.groupBox7 = new System.Windows.Forms.GroupBox();
  116. this.ckSeamless = new System.Windows.Forms.RadioButton();
  117. this.ckTile = new System.Windows.Forms.RadioButton();
  118. this.label13 = new System.Windows.Forms.Label();
  119. this.groupBox5 = new System.Windows.Forms.GroupBox();
  120. this.ckSize = new System.Windows.Forms.RadioButton();
  121. this.ckLockNull = new System.Windows.Forms.RadioButton();
  122. this.ckArea = new System.Windows.Forms.RadioButton();
  123. this.label12 = new System.Windows.Forms.Label();
  124. this.dgvRegionTeb = new System.Windows.Forms.DataGridView();
  125. this.regionId = new System.Windows.Forms.DataGridViewTextBoxColumn();
  126. this.regionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
  127. this.regionTiles = new System.Windows.Forms.DataGridViewTextBoxColumn();
  128. this.regionZ = new System.Windows.Forms.DataGridViewTextBoxColumn();
  129. this.regionArea = new System.Windows.Forms.DataGridViewTextBoxColumn();
  130. this.btnDel = new System.Windows.Forms.Button();
  131. this.btnDetailed = new System.Windows.Forms.Button();
  132. this.groupBox4 = new System.Windows.Forms.GroupBox();
  133. this.numOverlapRate = new System.Windows.Forms.NumericUpDown();
  134. this.label19 = new System.Windows.Forms.Label();
  135. this.ckOther = new System.Windows.Forms.RadioButton();
  136. this.btnEstablish = new System.Windows.Forms.Button();
  137. this.label11 = new System.Windows.Forms.Label();
  138. this.label10 = new System.Windows.Forms.Label();
  139. this.label9 = new System.Windows.Forms.Label();
  140. this.txtAreaY = new System.Windows.Forms.TextBox();
  141. this.txtSizeY = new System.Windows.Forms.TextBox();
  142. this.txtTilesY = new System.Windows.Forms.TextBox();
  143. this.txtAreaX = new System.Windows.Forms.TextBox();
  144. this.txtSizeX = new System.Windows.Forms.TextBox();
  145. this.txtTilesX = new System.Windows.Forms.TextBox();
  146. this.label8 = new System.Windows.Forms.Label();
  147. this.label7 = new System.Windows.Forms.Label();
  148. this.ckPolygon = new System.Windows.Forms.RadioButton();
  149. this.ckRectangle = new System.Windows.Forms.RadioButton();
  150. this.ckCircular = new System.Windows.Forms.RadioButton();
  151. this.groupBox2 = new System.Windows.Forms.GroupBox();
  152. this.btnWhiteBalance = new System.Windows.Forms.Button();
  153. this.label16 = new System.Windows.Forms.Label();
  154. this.lblUnit = new System.Windows.Forms.Label();
  155. this.chkAutoExposure = new System.Windows.Forms.CheckBox();
  156. this.txtPercentage = new System.Windows.Forms.TextBox();
  157. this.txtTime = new System.Windows.Forms.TextBox();
  158. this.trackPercentage = new System.Windows.Forms.TrackBar();
  159. this.trackTime = new System.Windows.Forms.TrackBar();
  160. this.btnOther = new System.Windows.Forms.Button();
  161. this.label6 = new System.Windows.Forms.Label();
  162. this.label5 = new System.Windows.Forms.Label();
  163. this.groupBox6 = new System.Windows.Forms.GroupBox();
  164. this.label18 = new System.Windows.Forms.Label();
  165. this.label17 = new System.Windows.Forms.Label();
  166. this.label15 = new System.Windows.Forms.Label();
  167. this.pnlSpeed = new System.Windows.Forms.Panel();
  168. this.label4 = new System.Windows.Forms.Label();
  169. this.cmbStepUnit = new System.Windows.Forms.ComboBox();
  170. this.label3 = new System.Windows.Forms.Label();
  171. this.label2 = new System.Windows.Forms.Label();
  172. this.label1 = new System.Windows.Forms.Label();
  173. this.groupBox12 = new System.Windows.Forms.GroupBox();
  174. this.groupBox11 = new System.Windows.Forms.GroupBox();
  175. this.groupBox10 = new System.Windows.Forms.GroupBox();
  176. this.panelVision = new System.Windows.Forms.Panel();
  177. this.groupBox9 = new System.Windows.Forms.GroupBox();
  178. this.panelMotion = new System.Windows.Forms.Panel();
  179. this.panelControl = new System.Windows.Forms.Panel();
  180. this.groupBox1 = new System.Windows.Forms.GroupBox();
  181. this.btnStop = new System.Windows.Forms.Button();
  182. this.btnCreatImgFile = new System.Windows.Forms.Button();
  183. this.btnWorking = new System.Windows.Forms.Button();
  184. this.groupBox3 = new System.Windows.Forms.GroupBox();
  185. this.panelall.SuspendLayout();
  186. this.groupBox13.SuspendLayout();
  187. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
  188. ((System.ComponentModel.ISupportInitialize)(this.picEffect)).BeginInit();
  189. this.groupBox8.SuspendLayout();
  190. this.groupBox7.SuspendLayout();
  191. this.groupBox5.SuspendLayout();
  192. ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).BeginInit();
  193. this.groupBox4.SuspendLayout();
  194. ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).BeginInit();
  195. this.groupBox2.SuspendLayout();
  196. ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).BeginInit();
  197. ((System.ComponentModel.ISupportInitialize)(this.trackTime)).BeginInit();
  198. this.groupBox6.SuspendLayout();
  199. this.groupBox12.SuspendLayout();
  200. this.groupBox11.SuspendLayout();
  201. this.groupBox10.SuspendLayout();
  202. this.groupBox9.SuspendLayout();
  203. this.groupBox1.SuspendLayout();
  204. this.SuspendLayout();
  205. //
  206. // lblXPosition
  207. //
  208. this.lblXPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  209. this.lblXPosition.AutoSize = true;
  210. this.lblXPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  211. this.lblXPosition.Location = new System.Drawing.Point(431, 642);
  212. this.lblXPosition.Size = new System.Drawing.Size(14, 14);
  213. this.lblXPosition.TabIndex = 42;
  214. this.lblXPosition.Text = "0";
  215. //
  216. // lblYPosition
  217. //
  218. this.lblYPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  219. this.lblYPosition.AutoSize = true;
  220. this.lblYPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  221. this.lblYPosition.Location = new System.Drawing.Point(431, 668);
  222. this.lblYPosition.Size = new System.Drawing.Size(14, 14);
  223. this.lblYPosition.TabIndex = 43;
  224. this.lblYPosition.Text = "0";
  225. //
  226. // lblZPosition
  227. //
  228. this.lblZPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  229. this.lblZPosition.AutoSize = true;
  230. this.lblZPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  231. this.lblZPosition.Location = new System.Drawing.Point(431, 693);
  232. this.lblZPosition.Size = new System.Drawing.Size(14, 14);
  233. this.lblZPosition.TabIndex = 44;
  234. this.lblZPosition.Text = "0";
  235. //
  236. // btnFreeloadstage
  237. //
  238. this.btnFreeloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  239. this.btnFreeloadstage.Location = new System.Drawing.Point(72, 684);
  240. this.btnFreeloadstage.Size = new System.Drawing.Size(59, 31);
  241. this.btnFreeloadstage.TabIndex = 31;
  242. this.btnFreeloadstage.Text = "锁定";
  243. this.btnFreeloadstage.UseVisualStyleBackColor = true;
  244. //
  245. // btnStoploadstage
  246. //
  247. this.btnStoploadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  248. this.btnStoploadstage.Location = new System.Drawing.Point(72, 639);
  249. this.btnStoploadstage.Size = new System.Drawing.Size(59, 33);
  250. this.btnStoploadstage.TabIndex = 30;
  251. this.btnStoploadstage.Text = "停止";
  252. this.btnStoploadstage.UseVisualStyleBackColor = true;
  253. //
  254. // btnResetloadstage
  255. //
  256. this.btnResetloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  257. this.btnResetloadstage.Location = new System.Drawing.Point(7, 639);
  258. this.btnResetloadstage.Size = new System.Drawing.Size(60, 33);
  259. this.btnResetloadstage.TabIndex = 29;
  260. this.btnResetloadstage.Text = "复位";
  261. this.btnResetloadstage.UseVisualStyleBackColor = true;
  262. //
  263. // btnCenterloadstage
  264. //
  265. this.btnCenterloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  266. this.btnCenterloadstage.Location = new System.Drawing.Point(7, 684);
  267. this.btnCenterloadstage.Size = new System.Drawing.Size(60, 31);
  268. this.btnCenterloadstage.TabIndex = 28;
  269. this.btnCenterloadstage.Text = "中心";
  270. this.btnCenterloadstage.UseVisualStyleBackColor = true;
  271. //
  272. // btnInloadstage
  273. //
  274. this.btnInloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  275. this.btnInloadstage.Location = new System.Drawing.Point(72, 592);
  276. this.btnInloadstage.Size = new System.Drawing.Size(61, 33);
  277. this.btnInloadstage.TabIndex = 27;
  278. this.btnInloadstage.Text = "进片";
  279. this.btnInloadstage.UseVisualStyleBackColor = true;
  280. //
  281. // btnOutloadstage
  282. //
  283. this.btnOutloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  284. this.btnOutloadstage.Location = new System.Drawing.Point(7, 592);
  285. this.btnOutloadstage.Size = new System.Drawing.Size(60, 33);
  286. this.btnOutloadstage.TabIndex = 26;
  287. this.btnOutloadstage.Text = "出片";
  288. this.btnOutloadstage.UseVisualStyleBackColor = true;
  289. //
  290. // btnZStop
  291. //
  292. this.btnZStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  293. this.btnZStop.Location = new System.Drawing.Point(346, 682);
  294. this.btnZStop.Size = new System.Drawing.Size(59, 33);
  295. this.btnZStop.TabIndex = 41;
  296. this.btnZStop.Text = "停止";
  297. this.btnZStop.UseVisualStyleBackColor = true;
  298. //
  299. // btnZFree
  300. //
  301. this.btnZFree.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  302. this.btnZFree.Location = new System.Drawing.Point(346, 641);
  303. this.btnZFree.Size = new System.Drawing.Size(59, 31);
  304. this.btnZFree.TabIndex = 40;
  305. this.btnZFree.Text = "锁定";
  306. this.btnZFree.UseVisualStyleBackColor = true;
  307. //
  308. // txtXStep
  309. //
  310. this.txtXStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  311. this.txtXStep.Location = new System.Drawing.Point(160, 592);
  312. this.txtXStep.Size = new System.Drawing.Size(68, 21);
  313. this.txtXStep.TabIndex = 35;
  314. this.txtXStep.Text = "1000";
  315. //
  316. // txtYStep
  317. //
  318. this.txtYStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  319. this.txtYStep.Location = new System.Drawing.Point(256, 592);
  320. this.txtYStep.Size = new System.Drawing.Size(68, 21);
  321. this.txtYStep.TabIndex = 36;
  322. this.txtYStep.Text = "1000";
  323. //
  324. // txtZStep
  325. //
  326. this.txtZStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  327. this.txtZStep.Location = new System.Drawing.Point(353, 592);
  328. this.txtZStep.Size = new System.Drawing.Size(68, 21);
  329. this.txtZStep.TabIndex = 37;
  330. this.txtZStep.Text = "200";
  331. //
  332. // btnContinuityLower
  333. //
  334. this.btnContinuityLower.Location = new System.Drawing.Point(5, 89);
  335. this.btnContinuityLower.Size = new System.Drawing.Size(46, 59);
  336. this.btnContinuityLower.TabIndex = 1;
  337. this.btnContinuityLower.UseVisualStyleBackColor = true;
  338. //
  339. // btnContinuityUp
  340. //
  341. this.btnContinuityUp.Location = new System.Drawing.Point(5, 24);
  342. this.btnContinuityUp.Size = new System.Drawing.Size(46, 59);
  343. this.btnContinuityUp.TabIndex = 1;
  344. this.btnContinuityUp.UseVisualStyleBackColor = true;
  345. //
  346. // btnFixedLower
  347. //
  348. this.btnFixedLower.Location = new System.Drawing.Point(5, 89);
  349. this.btnFixedLower.Size = new System.Drawing.Size(46, 59);
  350. this.btnFixedLower.TabIndex = 2;
  351. this.btnFixedLower.UseVisualStyleBackColor = true;
  352. //
  353. // btnFixedUp
  354. //
  355. this.btnFixedUp.Location = new System.Drawing.Point(5, 24);
  356. this.btnFixedUp.Size = new System.Drawing.Size(46, 59);
  357. this.btnFixedUp.TabIndex = 3;
  358. this.btnFixedUp.UseVisualStyleBackColor = true;
  359. //
  360. // btnCenterDisplay
  361. //
  362. this.btnCenterDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  363. this.btnCenterDisplay.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  364. this.btnCenterDisplay.Location = new System.Drawing.Point(427, 522);
  365. this.btnCenterDisplay.Size = new System.Drawing.Size(74, 33);
  366. this.btnCenterDisplay.TabIndex = 49;
  367. this.btnCenterDisplay.Text = "中心显示";
  368. this.btnCenterDisplay.UseVisualStyleBackColor = true;
  369. //
  370. // btnStopall
  371. //
  372. this.btnStopall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  373. this.btnStopall.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  374. this.btnStopall.Location = new System.Drawing.Point(427, 483);
  375. this.btnStopall.Size = new System.Drawing.Size(74, 33);
  376. this.btnStopall.TabIndex = 48;
  377. this.btnStopall.Text = "全部停止";
  378. this.btnStopall.UseVisualStyleBackColor = true;
  379. //
  380. // btnDsRocker
  381. //
  382. this.btnDsRocker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  383. this.btnDsRocker.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  384. this.btnDsRocker.Location = new System.Drawing.Point(427, 444);
  385. this.btnDsRocker.Size = new System.Drawing.Size(74, 33);
  386. this.btnDsRocker.TabIndex = 47;
  387. this.btnDsRocker.Text = "禁用摇杆";
  388. this.btnDsRocker.UseVisualStyleBackColor = true;
  389. //
  390. // btnSetting
  391. //
  392. this.btnSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
  393. this.btnSetting.Location = new System.Drawing.Point(779, 11);
  394. this.btnSetting.Size = new System.Drawing.Size(115, 34);
  395. this.btnSetting.TabIndex = 3;
  396. this.btnSetting.Text = "Stage Setting";
  397. this.btnSetting.UseVisualStyleBackColor = true;
  398. //
  399. // panelall
  400. //
  401. this.panelall.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  402. | System.Windows.Forms.AnchorStyles.Left)
  403. | System.Windows.Forms.AnchorStyles.Right)));
  404. this.panelall.Controls.Add(this.groupBox13);
  405. this.panelall.Controls.Add(this.groupBox8);
  406. this.panelall.Controls.Add(this.groupBox7);
  407. this.panelall.Controls.Add(this.groupBox5);
  408. this.panelall.Controls.Add(this.groupBox4);
  409. this.panelall.Controls.Add(this.groupBox2);
  410. this.panelall.Controls.Add(this.groupBox6);
  411. this.panelall.Controls.Add(this.groupBox1);
  412. this.panelall.Location = new System.Drawing.Point(2, 2);
  413. this.panelall.Name = "panelall";
  414. this.panelall.Size = new System.Drawing.Size(1247, 790);
  415. this.panelall.TabIndex = 2;
  416. //
  417. // groupBox13
  418. //
  419. this.groupBox13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  420. | System.Windows.Forms.AnchorStyles.Right)));
  421. this.groupBox13.Controls.Add(this.cmbStitchList);
  422. this.groupBox13.Controls.Add(this.pictureBox1);
  423. this.groupBox13.Controls.Add(this.picEffect);
  424. this.groupBox13.Location = new System.Drawing.Point(807, 56);
  425. this.groupBox13.Name = "groupBox13";
  426. this.groupBox13.Size = new System.Drawing.Size(438, 731);
  427. this.groupBox13.TabIndex = 22;
  428. this.groupBox13.TabStop = false;
  429. this.groupBox13.Text = "拼图效果";
  430. //
  431. // cmbStitchList
  432. //
  433. this.cmbStitchList.FormattingEnabled = true;
  434. this.cmbStitchList.Location = new System.Drawing.Point(315, 39);
  435. this.cmbStitchList.Name = "cmbStitchList";
  436. this.cmbStitchList.Size = new System.Drawing.Size(102, 20);
  437. this.cmbStitchList.TabIndex = 2;
  438. this.cmbStitchList.Visible = false;
  439. this.cmbStitchList.SelectedIndexChanged += new System.EventHandler(this.cmbStitchList_SelectedIndexChanged);
  440. //
  441. // pictureBox1
  442. //
  443. this.pictureBox1.Location = new System.Drawing.Point(6, 164);
  444. this.pictureBox1.Name = "pictureBox1";
  445. this.pictureBox1.Size = new System.Drawing.Size(424, 349);
  446. this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
  447. this.pictureBox1.TabIndex = 1;
  448. this.pictureBox1.TabStop = false;
  449. //
  450. // picEffect
  451. //
  452. this.picEffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  453. | System.Windows.Forms.AnchorStyles.Right)));
  454. this.picEffect.Location = new System.Drawing.Point(6, 17);
  455. this.picEffect.Name = "picEffect";
  456. this.picEffect.Size = new System.Drawing.Size(426, 708);
  457. this.picEffect.TabIndex = 0;
  458. this.picEffect.TabStop = false;
  459. //
  460. // groupBox8
  461. //
  462. this.groupBox8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  463. this.groupBox8.Controls.Add(this.comChoice);
  464. this.groupBox8.Controls.Add(this.label14);
  465. this.groupBox8.Controls.Add(this.ckFocusingRepair);
  466. this.groupBox8.Controls.Add(this.ckFocusingNull);
  467. this.groupBox8.Controls.Add(this.ckAtuoFocusing);
  468. this.groupBox8.Location = new System.Drawing.Point(3, 682);
  469. this.groupBox8.Name = "groupBox8";
  470. this.groupBox8.Size = new System.Drawing.Size(280, 105);
  471. this.groupBox8.TabIndex = 21;
  472. this.groupBox8.TabStop = false;
  473. this.groupBox8.Text = "聚焦";
  474. //
  475. // comChoice
  476. //
  477. this.comChoice.DisplayMember = "0";
  478. this.comChoice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  479. this.comChoice.FormattingEnabled = true;
  480. this.comChoice.Location = new System.Drawing.Point(119, 63);
  481. this.comChoice.Name = "comChoice";
  482. this.comChoice.Size = new System.Drawing.Size(147, 20);
  483. this.comChoice.TabIndex = 56;
  484. this.comChoice.SelectedIndexChanged += new System.EventHandler(this.comChoice_SelectedIndexChanged);
  485. //
  486. // label14
  487. //
  488. this.label14.AutoSize = true;
  489. this.label14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  490. this.label14.Location = new System.Drawing.Point(6, 67);
  491. this.label14.Name = "label14";
  492. this.label14.Size = new System.Drawing.Size(89, 12);
  493. this.label14.TabIndex = 55;
  494. this.label14.Text = "自动聚焦选择:";
  495. //
  496. // ckFocusingRepair
  497. //
  498. this.ckFocusingRepair.AutoSize = true;
  499. this.ckFocusingRepair.Location = new System.Drawing.Point(178, 28);
  500. this.ckFocusingRepair.Name = "ckFocusingRepair";
  501. this.ckFocusingRepair.Size = new System.Drawing.Size(71, 16);
  502. this.ckFocusingRepair.TabIndex = 54;
  503. this.ckFocusingRepair.Text = "聚焦补偿";
  504. this.ckFocusingRepair.UseVisualStyleBackColor = true;
  505. this.ckFocusingRepair.Click += new System.EventHandler(this.ckFocusingRepair_Click);
  506. //
  507. // ckFocusingNull
  508. //
  509. this.ckFocusingNull.AutoSize = true;
  510. this.ckFocusingNull.Checked = true;
  511. this.ckFocusingNull.Location = new System.Drawing.Point(9, 28);
  512. this.ckFocusingNull.Name = "ckFocusingNull";
  513. this.ckFocusingNull.Size = new System.Drawing.Size(35, 16);
  514. this.ckFocusingNull.TabIndex = 53;
  515. this.ckFocusingNull.TabStop = true;
  516. this.ckFocusingNull.Text = "无";
  517. this.ckFocusingNull.UseVisualStyleBackColor = true;
  518. //
  519. // ckAtuoFocusing
  520. //
  521. this.ckAtuoFocusing.AutoSize = true;
  522. this.ckAtuoFocusing.Location = new System.Drawing.Point(79, 28);
  523. this.ckAtuoFocusing.Name = "ckAtuoFocusing";
  524. this.ckAtuoFocusing.Size = new System.Drawing.Size(71, 16);
  525. this.ckAtuoFocusing.TabIndex = 52;
  526. this.ckAtuoFocusing.Text = "自动聚焦";
  527. this.ckAtuoFocusing.UseVisualStyleBackColor = true;
  528. //
  529. // groupBox7
  530. //
  531. this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  532. this.groupBox7.Controls.Add(this.ckSeamless);
  533. this.groupBox7.Controls.Add(this.ckTile);
  534. this.groupBox7.Controls.Add(this.label13);
  535. this.groupBox7.Location = new System.Drawing.Point(3, 616);
  536. this.groupBox7.Name = "groupBox7";
  537. this.groupBox7.Size = new System.Drawing.Size(280, 60);
  538. this.groupBox7.TabIndex = 20;
  539. this.groupBox7.TabStop = false;
  540. this.groupBox7.Text = "拼接设置";
  541. //
  542. // ckSeamless
  543. //
  544. this.ckSeamless.AutoSize = true;
  545. this.ckSeamless.Location = new System.Drawing.Point(185, 30);
  546. this.ckSeamless.Name = "ckSeamless";
  547. this.ckSeamless.Size = new System.Drawing.Size(71, 16);
  548. this.ckSeamless.TabIndex = 55;
  549. this.ckSeamless.Text = "无缝模式";
  550. this.ckSeamless.UseVisualStyleBackColor = true;
  551. //
  552. // ckTile
  553. //
  554. this.ckTile.AutoSize = true;
  555. this.ckTile.Checked = true;
  556. this.ckTile.Location = new System.Drawing.Point(91, 30);
  557. this.ckTile.Name = "ckTile";
  558. this.ckTile.Size = new System.Drawing.Size(71, 16);
  559. this.ckTile.TabIndex = 54;
  560. this.ckTile.TabStop = true;
  561. this.ckTile.Text = "平铺模式";
  562. this.ckTile.UseVisualStyleBackColor = true;
  563. //
  564. // label13
  565. //
  566. this.label13.AutoSize = true;
  567. this.label13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  568. this.label13.Location = new System.Drawing.Point(6, 32);
  569. this.label13.Name = "label13";
  570. this.label13.Size = new System.Drawing.Size(65, 12);
  571. this.label13.TabIndex = 52;
  572. this.label13.Text = "拼接方式:";
  573. //
  574. // groupBox5
  575. //
  576. this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  577. | System.Windows.Forms.AnchorStyles.Left)));
  578. this.groupBox5.Controls.Add(this.ckSize);
  579. this.groupBox5.Controls.Add(this.ckLockNull);
  580. this.groupBox5.Controls.Add(this.ckArea);
  581. this.groupBox5.Controls.Add(this.label12);
  582. this.groupBox5.Controls.Add(this.dgvRegionTeb);
  583. this.groupBox5.Controls.Add(this.btnDel);
  584. this.groupBox5.Controls.Add(this.btnDetailed);
  585. this.groupBox5.Location = new System.Drawing.Point(3, 370);
  586. this.groupBox5.Name = "groupBox5";
  587. this.groupBox5.Size = new System.Drawing.Size(280, 240);
  588. this.groupBox5.TabIndex = 19;
  589. this.groupBox5.TabStop = false;
  590. this.groupBox5.Text = "拼图区域列表";
  591. //
  592. // ckSize
  593. //
  594. this.ckSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  595. this.ckSize.AutoSize = true;
  596. this.ckSize.Location = new System.Drawing.Point(215, 215);
  597. this.ckSize.Name = "ckSize";
  598. this.ckSize.Size = new System.Drawing.Size(47, 16);
  599. this.ckSize.TabIndex = 51;
  600. this.ckSize.Text = "大小";
  601. this.ckSize.UseVisualStyleBackColor = true;
  602. this.ckSize.CheckedChanged += new System.EventHandler(this.ckSize_CheckedChanged);
  603. //
  604. // ckLockNull
  605. //
  606. this.ckLockNull.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  607. this.ckLockNull.AutoSize = true;
  608. this.ckLockNull.Checked = true;
  609. this.ckLockNull.Location = new System.Drawing.Point(98, 215);
  610. this.ckLockNull.Name = "ckLockNull";
  611. this.ckLockNull.Size = new System.Drawing.Size(35, 16);
  612. this.ckLockNull.TabIndex = 50;
  613. this.ckLockNull.TabStop = true;
  614. this.ckLockNull.Text = "无";
  615. this.ckLockNull.UseVisualStyleBackColor = true;
  616. this.ckLockNull.CheckedChanged += new System.EventHandler(this.ckLockNull_CheckedChanged);
  617. //
  618. // ckArea
  619. //
  620. this.ckArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  621. this.ckArea.AutoSize = true;
  622. this.ckArea.Location = new System.Drawing.Point(153, 215);
  623. this.ckArea.Name = "ckArea";
  624. this.ckArea.Size = new System.Drawing.Size(47, 16);
  625. this.ckArea.TabIndex = 49;
  626. this.ckArea.Text = "面积";
  627. this.ckArea.UseVisualStyleBackColor = true;
  628. this.ckArea.CheckedChanged += new System.EventHandler(this.ckArea_CheckedChanged);
  629. //
  630. // label12
  631. //
  632. this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  633. this.label12.AutoSize = true;
  634. this.label12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  635. this.label12.Location = new System.Drawing.Point(6, 217);
  636. this.label12.Name = "label12";
  637. this.label12.Size = new System.Drawing.Size(65, 12);
  638. this.label12.TabIndex = 48;
  639. this.label12.Text = "锁定方式:";
  640. //
  641. // dgvRegionTeb
  642. //
  643. this.dgvRegionTeb.AllowUserToAddRows = false;
  644. this.dgvRegionTeb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  645. | System.Windows.Forms.AnchorStyles.Left)));
  646. this.dgvRegionTeb.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
  647. this.dgvRegionTeb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
  648. this.dgvRegionTeb.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  649. this.regionId,
  650. this.regionName,
  651. this.regionTiles,
  652. this.regionZ,
  653. this.regionArea});
  654. this.dgvRegionTeb.Location = new System.Drawing.Point(2, 36);
  655. this.dgvRegionTeb.Name = "dgvRegionTeb";
  656. this.dgvRegionTeb.ReadOnly = true;
  657. this.dgvRegionTeb.RowHeadersVisible = false;
  658. this.dgvRegionTeb.RowHeadersWidth = 51;
  659. this.dgvRegionTeb.RowTemplate.Height = 23;
  660. this.dgvRegionTeb.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
  661. this.dgvRegionTeb.Size = new System.Drawing.Size(274, 168);
  662. this.dgvRegionTeb.TabIndex = 0;
  663. this.dgvRegionTeb.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvRegionTeb_CellContentClick);
  664. this.dgvRegionTeb.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvRegionTeb_CellMouseClick);
  665. this.dgvRegionTeb.SelectionChanged += new System.EventHandler(this.dgvRegionTeb_SelectionChanged);
  666. //
  667. // regionId
  668. //
  669. this.regionId.FillWeight = 24F;
  670. this.regionId.HeaderText = "ID";
  671. this.regionId.MinimumWidth = 6;
  672. this.regionId.Name = "regionId";
  673. this.regionId.ReadOnly = true;
  674. this.regionId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
  675. //
  676. // regionName
  677. //
  678. this.regionName.FillWeight = 60F;
  679. this.regionName.HeaderText = "Name";
  680. this.regionName.MinimumWidth = 6;
  681. this.regionName.Name = "regionName";
  682. this.regionName.ReadOnly = true;
  683. this.regionName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
  684. //
  685. // regionTiles
  686. //
  687. this.regionTiles.FillWeight = 60F;
  688. this.regionTiles.HeaderText = "Tiles";
  689. this.regionTiles.MinimumWidth = 6;
  690. this.regionTiles.Name = "regionTiles";
  691. this.regionTiles.ReadOnly = true;
  692. this.regionTiles.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
  693. //
  694. // regionZ
  695. //
  696. this.regionZ.FillWeight = 60F;
  697. this.regionZ.HeaderText = "Z(μm)";
  698. this.regionZ.MinimumWidth = 6;
  699. this.regionZ.Name = "regionZ";
  700. this.regionZ.ReadOnly = true;
  701. this.regionZ.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
  702. //
  703. // regionArea
  704. //
  705. this.regionArea.FillWeight = 60F;
  706. this.regionArea.HeaderText = "Area(mm²)";
  707. this.regionArea.MinimumWidth = 6;
  708. this.regionArea.Name = "regionArea";
  709. this.regionArea.ReadOnly = true;
  710. this.regionArea.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
  711. //
  712. // btnDel
  713. //
  714. this.btnDel.Location = new System.Drawing.Point(206, 11);
  715. this.btnDel.Name = "btnDel";
  716. this.btnDel.Size = new System.Drawing.Size(65, 23);
  717. this.btnDel.TabIndex = 47;
  718. this.btnDel.Text = "删除";
  719. this.btnDel.UseVisualStyleBackColor = true;
  720. this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
  721. //
  722. // btnDetailed
  723. //
  724. this.btnDetailed.Location = new System.Drawing.Point(137, 11);
  725. this.btnDetailed.Name = "btnDetailed";
  726. this.btnDetailed.Size = new System.Drawing.Size(68, 23);
  727. this.btnDetailed.TabIndex = 46;
  728. this.btnDetailed.Text = "详细";
  729. this.btnDetailed.UseVisualStyleBackColor = true;
  730. this.btnDetailed.Click += new System.EventHandler(this.btnDetailed_Click);
  731. //
  732. // groupBox4
  733. //
  734. this.groupBox4.Controls.Add(this.numOverlapRate);
  735. this.groupBox4.Controls.Add(this.label19);
  736. this.groupBox4.Controls.Add(this.ckOther);
  737. this.groupBox4.Controls.Add(this.btnEstablish);
  738. this.groupBox4.Controls.Add(this.label11);
  739. this.groupBox4.Controls.Add(this.label10);
  740. this.groupBox4.Controls.Add(this.label9);
  741. this.groupBox4.Controls.Add(this.txtAreaY);
  742. this.groupBox4.Controls.Add(this.txtSizeY);
  743. this.groupBox4.Controls.Add(this.txtTilesY);
  744. this.groupBox4.Controls.Add(this.txtAreaX);
  745. this.groupBox4.Controls.Add(this.txtSizeX);
  746. this.groupBox4.Controls.Add(this.txtTilesX);
  747. this.groupBox4.Controls.Add(this.label8);
  748. this.groupBox4.Controls.Add(this.label7);
  749. this.groupBox4.Controls.Add(this.ckPolygon);
  750. this.groupBox4.Controls.Add(this.ckRectangle);
  751. this.groupBox4.Controls.Add(this.ckCircular);
  752. this.groupBox4.Location = new System.Drawing.Point(3, 176);
  753. this.groupBox4.Name = "groupBox4";
  754. this.groupBox4.Size = new System.Drawing.Size(280, 188);
  755. this.groupBox4.TabIndex = 18;
  756. this.groupBox4.TabStop = false;
  757. this.groupBox4.Text = "拼图方式";
  758. //
  759. // numOverlapRate
  760. //
  761. this.numOverlapRate.DecimalPlaces = 2;
  762. this.numOverlapRate.Increment = new decimal(new int[] {
  763. 5,
  764. 0,
  765. 0,
  766. 131072});
  767. this.numOverlapRate.Location = new System.Drawing.Point(116, 116);
  768. this.numOverlapRate.Maximum = new decimal(new int[] {
  769. 1,
  770. 0,
  771. 0,
  772. 0});
  773. this.numOverlapRate.Minimum = new decimal(new int[] {
  774. 5,
  775. 0,
  776. 0,
  777. 131072});
  778. this.numOverlapRate.Name = "numOverlapRate";
  779. this.numOverlapRate.Size = new System.Drawing.Size(70, 21);
  780. this.numOverlapRate.TabIndex = 48;
  781. this.numOverlapRate.Value = new decimal(new int[] {
  782. 10,
  783. 0,
  784. 0,
  785. 131072});
  786. //
  787. // label19
  788. //
  789. this.label19.AutoSize = true;
  790. this.label19.Location = new System.Drawing.Point(22, 118);
  791. this.label19.Name = "label19";
  792. this.label19.Size = new System.Drawing.Size(77, 12);
  793. this.label19.TabIndex = 47;
  794. this.label19.Text = "Overlap Rate";
  795. //
  796. // ckOther
  797. //
  798. this.ckOther.AutoSize = true;
  799. this.ckOther.Checked = true;
  800. this.ckOther.Location = new System.Drawing.Point(206, 20);
  801. this.ckOther.Name = "ckOther";
  802. this.ckOther.Size = new System.Drawing.Size(59, 16);
  803. this.ckOther.TabIndex = 46;
  804. this.ckOther.TabStop = true;
  805. this.ckOther.Text = "自定义";
  806. this.ckOther.UseVisualStyleBackColor = true;
  807. this.ckOther.CheckedChanged += new System.EventHandler(this.ckOther_CheckedChanged);
  808. //
  809. // btnEstablish
  810. //
  811. this.btnEstablish.Location = new System.Drawing.Point(85, 150);
  812. this.btnEstablish.Name = "btnEstablish";
  813. this.btnEstablish.Size = new System.Drawing.Size(120, 23);
  814. this.btnEstablish.TabIndex = 45;
  815. this.btnEstablish.Text = "创建拼图区域";
  816. this.btnEstablish.UseVisualStyleBackColor = true;
  817. this.btnEstablish.Click += new System.EventHandler(this.btnEstablish_Click);
  818. //
  819. // label11
  820. //
  821. this.label11.AutoSize = true;
  822. this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  823. this.label11.Location = new System.Drawing.Point(202, 44);
  824. this.label11.Name = "label11";
  825. this.label11.Size = new System.Drawing.Size(35, 14);
  826. this.label11.TabIndex = 44;
  827. this.label11.Text = "Area";
  828. //
  829. // label10
  830. //
  831. this.label10.AutoSize = true;
  832. this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  833. this.label10.Location = new System.Drawing.Point(133, 44);
  834. this.label10.Name = "label10";
  835. this.label10.Size = new System.Drawing.Size(35, 14);
  836. this.label10.TabIndex = 43;
  837. this.label10.Text = "Size";
  838. //
  839. // label9
  840. //
  841. this.label9.AutoSize = true;
  842. this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  843. this.label9.Location = new System.Drawing.Point(61, 44);
  844. this.label9.Name = "label9";
  845. this.label9.Size = new System.Drawing.Size(42, 14);
  846. this.label9.TabIndex = 42;
  847. this.label9.Text = "Tiles";
  848. //
  849. // txtAreaY
  850. //
  851. this.txtAreaY.Enabled = false;
  852. this.txtAreaY.Location = new System.Drawing.Point(186, 83);
  853. this.txtAreaY.Name = "txtAreaY";
  854. this.txtAreaY.ReadOnly = true;
  855. this.txtAreaY.Size = new System.Drawing.Size(70, 21);
  856. this.txtAreaY.TabIndex = 41;
  857. //
  858. // txtSizeY
  859. //
  860. this.txtSizeY.Location = new System.Drawing.Point(116, 83);
  861. this.txtSizeY.Name = "txtSizeY";
  862. this.txtSizeY.Size = new System.Drawing.Size(70, 21);
  863. this.txtSizeY.TabIndex = 40;
  864. //
  865. // txtTilesY
  866. //
  867. this.txtTilesY.Location = new System.Drawing.Point(46, 83);
  868. this.txtTilesY.Name = "txtTilesY";
  869. this.txtTilesY.Size = new System.Drawing.Size(70, 21);
  870. this.txtTilesY.TabIndex = 39;
  871. //
  872. // txtAreaX
  873. //
  874. this.txtAreaX.Location = new System.Drawing.Point(186, 61);
  875. this.txtAreaX.Name = "txtAreaX";
  876. this.txtAreaX.Size = new System.Drawing.Size(70, 21);
  877. this.txtAreaX.TabIndex = 38;
  878. //
  879. // txtSizeX
  880. //
  881. this.txtSizeX.Location = new System.Drawing.Point(116, 61);
  882. this.txtSizeX.Name = "txtSizeX";
  883. this.txtSizeX.Size = new System.Drawing.Size(70, 21);
  884. this.txtSizeX.TabIndex = 37;
  885. //
  886. // txtTilesX
  887. //
  888. this.txtTilesX.Location = new System.Drawing.Point(46, 61);
  889. this.txtTilesX.Name = "txtTilesX";
  890. this.txtTilesX.Size = new System.Drawing.Size(70, 21);
  891. this.txtTilesX.TabIndex = 36;
  892. //
  893. // label8
  894. //
  895. this.label8.AutoSize = true;
  896. this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  897. this.label8.Location = new System.Drawing.Point(21, 86);
  898. this.label8.Name = "label8";
  899. this.label8.Size = new System.Drawing.Size(21, 14);
  900. this.label8.TabIndex = 34;
  901. this.label8.Text = "Y:";
  902. //
  903. // label7
  904. //
  905. this.label7.AutoSize = true;
  906. this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  907. this.label7.Location = new System.Drawing.Point(21, 64);
  908. this.label7.Name = "label7";
  909. this.label7.Size = new System.Drawing.Size(21, 14);
  910. this.label7.TabIndex = 33;
  911. this.label7.Text = "X:";
  912. //
  913. // ckPolygon
  914. //
  915. this.ckPolygon.AutoSize = true;
  916. this.ckPolygon.Location = new System.Drawing.Point(132, 20);
  917. this.ckPolygon.Name = "ckPolygon";
  918. this.ckPolygon.Size = new System.Drawing.Size(59, 16);
  919. this.ckPolygon.TabIndex = 3;
  920. this.ckPolygon.Text = "多边形";
  921. this.ckPolygon.UseVisualStyleBackColor = true;
  922. this.ckPolygon.CheckedChanged += new System.EventHandler(this.ckPolygon_CheckedChanged);
  923. //
  924. // ckRectangle
  925. //
  926. this.ckRectangle.AutoSize = true;
  927. this.ckRectangle.Location = new System.Drawing.Point(9, 20);
  928. this.ckRectangle.Name = "ckRectangle";
  929. this.ckRectangle.Size = new System.Drawing.Size(47, 16);
  930. this.ckRectangle.TabIndex = 2;
  931. this.ckRectangle.Text = "矩形";
  932. this.ckRectangle.UseVisualStyleBackColor = true;
  933. this.ckRectangle.CheckedChanged += new System.EventHandler(this.ckRectangle_CheckedChanged);
  934. //
  935. // ckCircular
  936. //
  937. this.ckCircular.AutoSize = true;
  938. this.ckCircular.Location = new System.Drawing.Point(73, 20);
  939. this.ckCircular.Name = "ckCircular";
  940. this.ckCircular.Size = new System.Drawing.Size(47, 16);
  941. this.ckCircular.TabIndex = 1;
  942. this.ckCircular.Text = "圆形";
  943. this.ckCircular.UseVisualStyleBackColor = true;
  944. this.ckCircular.CheckedChanged += new System.EventHandler(this.ckCircular_CheckedChanged);
  945. //
  946. // groupBox2
  947. //
  948. this.groupBox2.Controls.Add(this.btnWhiteBalance);
  949. this.groupBox2.Controls.Add(this.label16);
  950. this.groupBox2.Controls.Add(this.lblUnit);
  951. this.groupBox2.Controls.Add(this.chkAutoExposure);
  952. this.groupBox2.Controls.Add(this.txtPercentage);
  953. this.groupBox2.Controls.Add(this.txtTime);
  954. this.groupBox2.Controls.Add(this.trackPercentage);
  955. this.groupBox2.Controls.Add(this.trackTime);
  956. this.groupBox2.Controls.Add(this.btnOther);
  957. this.groupBox2.Controls.Add(this.label6);
  958. this.groupBox2.Controls.Add(this.label5);
  959. this.groupBox2.Location = new System.Drawing.Point(3, 56);
  960. this.groupBox2.Name = "groupBox2";
  961. this.groupBox2.Size = new System.Drawing.Size(280, 114);
  962. this.groupBox2.TabIndex = 17;
  963. this.groupBox2.TabStop = false;
  964. this.groupBox2.Text = "相机设置";
  965. //
  966. // btnWhiteBalance
  967. //
  968. this.btnWhiteBalance.Location = new System.Drawing.Point(96, 85);
  969. this.btnWhiteBalance.Name = "btnWhiteBalance";
  970. this.btnWhiteBalance.Size = new System.Drawing.Size(96, 23);
  971. this.btnWhiteBalance.TabIndex = 40;
  972. this.btnWhiteBalance.Text = "自动白平衡";
  973. this.btnWhiteBalance.UseVisualStyleBackColor = true;
  974. this.btnWhiteBalance.Click += new System.EventHandler(this.btnWhiteBalance_Click);
  975. //
  976. // label16
  977. //
  978. this.label16.AutoSize = true;
  979. this.label16.Location = new System.Drawing.Point(257, 47);
  980. this.label16.Name = "label16";
  981. this.label16.Size = new System.Drawing.Size(11, 12);
  982. this.label16.TabIndex = 39;
  983. this.label16.Text = "%";
  984. //
  985. // lblUnit
  986. //
  987. this.lblUnit.AutoSize = true;
  988. this.lblUnit.Location = new System.Drawing.Point(257, 19);
  989. this.lblUnit.Name = "lblUnit";
  990. this.lblUnit.Size = new System.Drawing.Size(17, 12);
  991. this.lblUnit.TabIndex = 0;
  992. this.lblUnit.Text = "ms";
  993. //
  994. // chkAutoExposure
  995. //
  996. this.chkAutoExposure.AutoSize = true;
  997. this.chkAutoExposure.Location = new System.Drawing.Point(10, 88);
  998. this.chkAutoExposure.Name = "chkAutoExposure";
  999. this.chkAutoExposure.Size = new System.Drawing.Size(72, 16);
  1000. this.chkAutoExposure.TabIndex = 0;
  1001. this.chkAutoExposure.Text = "自动曝光";
  1002. this.chkAutoExposure.UseVisualStyleBackColor = true;
  1003. this.chkAutoExposure.Click += new System.EventHandler(this.chkAutoExposure_Click);
  1004. //
  1005. // txtPercentage
  1006. //
  1007. this.txtPercentage.Location = new System.Drawing.Point(214, 44);
  1008. this.txtPercentage.Name = "txtPercentage";
  1009. this.txtPercentage.Size = new System.Drawing.Size(42, 21);
  1010. this.txtPercentage.TabIndex = 37;
  1011. this.txtPercentage.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtPercentage_KeyPress);
  1012. //
  1013. // txtTime
  1014. //
  1015. this.txtTime.Location = new System.Drawing.Point(214, 17);
  1016. this.txtTime.Name = "txtTime";
  1017. this.txtTime.Size = new System.Drawing.Size(42, 21);
  1018. this.txtTime.TabIndex = 36;
  1019. this.txtTime.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTime_KeyPress);
  1020. //
  1021. // trackPercentage
  1022. //
  1023. this.trackPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
  1024. | System.Windows.Forms.AnchorStyles.Right)));
  1025. this.trackPercentage.AutoSize = false;
  1026. this.trackPercentage.Location = new System.Drawing.Point(78, 45);
  1027. this.trackPercentage.Maximum = 200;
  1028. this.trackPercentage.Minimum = 5;
  1029. this.trackPercentage.Name = "trackPercentage";
  1030. this.trackPercentage.Size = new System.Drawing.Size(141, 25);
  1031. this.trackPercentage.TabIndex = 5;
  1032. this.trackPercentage.TickStyle = System.Windows.Forms.TickStyle.None;
  1033. this.trackPercentage.Value = 5;
  1034. this.trackPercentage.ValueChanged += new System.EventHandler(this.trackPercentage_ValueChanged);
  1035. //
  1036. // trackTime
  1037. //
  1038. this.trackTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
  1039. | System.Windows.Forms.AnchorStyles.Right)));
  1040. this.trackTime.AutoSize = false;
  1041. this.trackTime.Location = new System.Drawing.Point(78, 19);
  1042. this.trackTime.Maximum = 1000000;
  1043. this.trackTime.Name = "trackTime";
  1044. this.trackTime.Size = new System.Drawing.Size(141, 25);
  1045. this.trackTime.TabIndex = 4;
  1046. this.trackTime.TickStyle = System.Windows.Forms.TickStyle.None;
  1047. this.trackTime.ValueChanged += new System.EventHandler(this.trackTime_ValueChanged);
  1048. //
  1049. // btnOther
  1050. //
  1051. this.btnOther.Location = new System.Drawing.Point(202, 85);
  1052. this.btnOther.Name = "btnOther";
  1053. this.btnOther.Size = new System.Drawing.Size(75, 23);
  1054. this.btnOther.TabIndex = 3;
  1055. this.btnOther.Text = "其他设置";
  1056. this.btnOther.UseVisualStyleBackColor = true;
  1057. this.btnOther.Click += new System.EventHandler(this.btnOther_Click);
  1058. //
  1059. // label6
  1060. //
  1061. this.label6.AutoSize = true;
  1062. this.label6.Location = new System.Drawing.Point(7, 47);
  1063. this.label6.Name = "label6";
  1064. this.label6.Size = new System.Drawing.Size(77, 12);
  1065. this.label6.TabIndex = 1;
  1066. this.label6.Text = "曝光百分比:";
  1067. //
  1068. // label5
  1069. //
  1070. this.label5.AutoSize = true;
  1071. this.label5.Location = new System.Drawing.Point(7, 20);
  1072. this.label5.Name = "label5";
  1073. this.label5.Size = new System.Drawing.Size(53, 12);
  1074. this.label5.TabIndex = 0;
  1075. this.label5.Text = "曝光时间";
  1076. //
  1077. // groupBox6
  1078. //
  1079. this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1080. | System.Windows.Forms.AnchorStyles.Left)
  1081. | System.Windows.Forms.AnchorStyles.Right)));
  1082. this.groupBox6.Controls.Add(this.label18);
  1083. this.groupBox6.Controls.Add(this.label17);
  1084. this.groupBox6.Controls.Add(this.label15);
  1085. this.groupBox6.Controls.Add(this.pnlSpeed);
  1086. this.groupBox6.Controls.Add(this.btnCenterDisplay);
  1087. this.groupBox6.Controls.Add(this.btnStopall);
  1088. this.groupBox6.Controls.Add(this.btnDsRocker);
  1089. this.groupBox6.Controls.Add(this.lblZPosition);
  1090. this.groupBox6.Controls.Add(this.lblYPosition);
  1091. this.groupBox6.Controls.Add(this.lblXPosition);
  1092. this.groupBox6.Controls.Add(this.btnZStop);
  1093. this.groupBox6.Controls.Add(this.btnZFree);
  1094. this.groupBox6.Controls.Add(this.label4);
  1095. this.groupBox6.Controls.Add(this.cmbStepUnit);
  1096. this.groupBox6.Controls.Add(this.txtZStep);
  1097. this.groupBox6.Controls.Add(this.txtYStep);
  1098. this.groupBox6.Controls.Add(this.txtXStep);
  1099. this.groupBox6.Controls.Add(this.label3);
  1100. this.groupBox6.Controls.Add(this.label2);
  1101. this.groupBox6.Controls.Add(this.label1);
  1102. this.groupBox6.Controls.Add(this.btnOutloadstage);
  1103. this.groupBox6.Controls.Add(this.groupBox12);
  1104. this.groupBox6.Controls.Add(this.btnFreeloadstage);
  1105. this.groupBox6.Controls.Add(this.groupBox11);
  1106. this.groupBox6.Controls.Add(this.groupBox10);
  1107. this.groupBox6.Controls.Add(this.btnInloadstage);
  1108. this.groupBox6.Controls.Add(this.groupBox9);
  1109. this.groupBox6.Controls.Add(this.btnStoploadstage);
  1110. this.groupBox6.Controls.Add(this.panelControl);
  1111. this.groupBox6.Controls.Add(this.btnResetloadstage);
  1112. this.groupBox6.Controls.Add(this.btnCenterloadstage);
  1113. this.groupBox6.Location = new System.Drawing.Point(289, 56);
  1114. this.groupBox6.Name = "groupBox6";
  1115. this.groupBox6.Size = new System.Drawing.Size(512, 731);
  1116. this.groupBox6.TabIndex = 16;
  1117. this.groupBox6.TabStop = false;
  1118. this.groupBox6.Text = "硬件控制";
  1119. this.groupBox6.Controls.SetChildIndex(this.btnCenterloadstage, 0);
  1120. this.groupBox6.Controls.SetChildIndex(this.btnResetloadstage, 0);
  1121. this.groupBox6.Controls.SetChildIndex(this.panelControl, 0);
  1122. this.groupBox6.Controls.SetChildIndex(this.btnStoploadstage, 0);
  1123. this.groupBox6.Controls.SetChildIndex(this.groupBox9, 0);
  1124. this.groupBox6.Controls.SetChildIndex(this.btnInloadstage, 0);
  1125. this.groupBox6.Controls.SetChildIndex(this.groupBox10, 0);
  1126. this.groupBox6.Controls.SetChildIndex(this.groupBox11, 0);
  1127. this.groupBox6.Controls.SetChildIndex(this.btnFreeloadstage, 0);
  1128. this.groupBox6.Controls.SetChildIndex(this.groupBox12, 0);
  1129. this.groupBox6.Controls.SetChildIndex(this.btnOutloadstage, 0);
  1130. this.groupBox6.Controls.SetChildIndex(this.label1, 0);
  1131. this.groupBox6.Controls.SetChildIndex(this.label2, 0);
  1132. this.groupBox6.Controls.SetChildIndex(this.label3, 0);
  1133. this.groupBox6.Controls.SetChildIndex(this.txtXStep, 0);
  1134. this.groupBox6.Controls.SetChildIndex(this.txtYStep, 0);
  1135. this.groupBox6.Controls.SetChildIndex(this.txtZStep, 0);
  1136. this.groupBox6.Controls.SetChildIndex(this.cmbStepUnit, 0);
  1137. this.groupBox6.Controls.SetChildIndex(this.label4, 0);
  1138. this.groupBox6.Controls.SetChildIndex(this.btnZFree, 0);
  1139. this.groupBox6.Controls.SetChildIndex(this.btnZStop, 0);
  1140. this.groupBox6.Controls.SetChildIndex(this.lblXPosition, 0);
  1141. this.groupBox6.Controls.SetChildIndex(this.lblYPosition, 0);
  1142. this.groupBox6.Controls.SetChildIndex(this.lblZPosition, 0);
  1143. this.groupBox6.Controls.SetChildIndex(this.btnDsRocker, 0);
  1144. this.groupBox6.Controls.SetChildIndex(this.btnStopall, 0);
  1145. this.groupBox6.Controls.SetChildIndex(this.btnCenterDisplay, 0);
  1146. this.groupBox6.Controls.SetChildIndex(this.pnlSpeed, 0);
  1147. this.groupBox6.Controls.SetChildIndex(this.label15, 0);
  1148. this.groupBox6.Controls.SetChildIndex(this.label17, 0);
  1149. this.groupBox6.Controls.SetChildIndex(this.label18, 0);
  1150. //
  1151. // label18
  1152. //
  1153. this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1154. this.label18.AutoSize = true;
  1155. this.label18.Font = new System.Drawing.Font("宋体", 10.5F);
  1156. this.label18.Location = new System.Drawing.Point(411, 693);
  1157. this.label18.Name = "label18";
  1158. this.label18.Size = new System.Drawing.Size(21, 14);
  1159. this.label18.TabIndex = 52;
  1160. this.label18.Text = "Z:";
  1161. //
  1162. // label17
  1163. //
  1164. this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1165. this.label17.AutoSize = true;
  1166. this.label17.Font = new System.Drawing.Font("宋体", 10.5F);
  1167. this.label17.Location = new System.Drawing.Point(411, 668);
  1168. this.label17.Name = "label17";
  1169. this.label17.Size = new System.Drawing.Size(21, 14);
  1170. this.label17.TabIndex = 52;
  1171. this.label17.Text = "Y:";
  1172. //
  1173. // label15
  1174. //
  1175. this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1176. this.label15.AutoSize = true;
  1177. this.label15.Font = new System.Drawing.Font("宋体", 10.5F);
  1178. this.label15.Location = new System.Drawing.Point(411, 642);
  1179. this.label15.Name = "label15";
  1180. this.label15.Size = new System.Drawing.Size(21, 14);
  1181. this.label15.TabIndex = 52;
  1182. this.label15.Text = "X:";
  1183. //
  1184. // pnlSpeed
  1185. //
  1186. this.pnlSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1187. this.pnlSpeed.Location = new System.Drawing.Point(185, 623);
  1188. this.pnlSpeed.Name = "pnlSpeed";
  1189. this.pnlSpeed.Size = new System.Drawing.Size(146, 102);
  1190. this.pnlSpeed.TabIndex = 50;
  1191. //
  1192. // label4
  1193. //
  1194. this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1195. this.label4.AutoSize = true;
  1196. this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  1197. this.label4.Location = new System.Drawing.Point(138, 642);
  1198. this.label4.Name = "label4";
  1199. this.label4.Size = new System.Drawing.Size(0, 14);
  1200. this.label4.TabIndex = 39;
  1201. //
  1202. // cmbStepUnit
  1203. //
  1204. this.cmbStepUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1205. this.cmbStepUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  1206. this.cmbStepUnit.FormattingEnabled = true;
  1207. this.cmbStepUnit.Items.AddRange(new object[] {
  1208. "μm",
  1209. "mm",
  1210. "cm"});
  1211. this.cmbStepUnit.Location = new System.Drawing.Point(427, 594);
  1212. this.cmbStepUnit.Name = "cmbStepUnit";
  1213. this.cmbStepUnit.Size = new System.Drawing.Size(69, 20);
  1214. this.cmbStepUnit.TabIndex = 38;
  1215. //
  1216. // label3
  1217. //
  1218. this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1219. this.label3.AutoSize = true;
  1220. this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  1221. this.label3.Location = new System.Drawing.Point(328, 595);
  1222. this.label3.Name = "label3";
  1223. this.label3.Size = new System.Drawing.Size(21, 14);
  1224. this.label3.TabIndex = 34;
  1225. this.label3.Text = "Z:";
  1226. //
  1227. // label2
  1228. //
  1229. this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1230. this.label2.AutoSize = true;
  1231. this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  1232. this.label2.Location = new System.Drawing.Point(231, 595);
  1233. this.label2.Name = "label2";
  1234. this.label2.Size = new System.Drawing.Size(21, 14);
  1235. this.label2.TabIndex = 33;
  1236. this.label2.Text = "Y:";
  1237. //
  1238. // label1
  1239. //
  1240. this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1241. this.label1.AutoSize = true;
  1242. this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  1243. this.label1.Location = new System.Drawing.Point(138, 595);
  1244. this.label1.Name = "label1";
  1245. this.label1.Size = new System.Drawing.Size(21, 14);
  1246. this.label1.TabIndex = 32;
  1247. this.label1.Text = "X:";
  1248. //
  1249. // groupBox12
  1250. //
  1251. this.groupBox12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1252. this.groupBox12.Controls.Add(this.btnFixedLower);
  1253. this.groupBox12.Controls.Add(this.btnFixedUp);
  1254. this.groupBox12.Location = new System.Drawing.Point(370, 420);
  1255. this.groupBox12.Name = "groupBox12";
  1256. this.groupBox12.Size = new System.Drawing.Size(56, 162);
  1257. this.groupBox12.TabIndex = 25;
  1258. this.groupBox12.TabStop = false;
  1259. this.groupBox12.Text = "定长";
  1260. //
  1261. // groupBox11
  1262. //
  1263. this.groupBox11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1264. this.groupBox11.Controls.Add(this.btnContinuityLower);
  1265. this.groupBox11.Controls.Add(this.btnContinuityUp);
  1266. this.groupBox11.Location = new System.Drawing.Point(312, 420);
  1267. this.groupBox11.Name = "groupBox11";
  1268. this.groupBox11.Size = new System.Drawing.Size(56, 162);
  1269. this.groupBox11.TabIndex = 24;
  1270. this.groupBox11.TabStop = false;
  1271. this.groupBox11.Text = "连续";
  1272. //
  1273. // groupBox10
  1274. //
  1275. this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1276. this.groupBox10.Controls.Add(this.panelVision);
  1277. this.groupBox10.Location = new System.Drawing.Point(160, 420);
  1278. this.groupBox10.Name = "groupBox10";
  1279. this.groupBox10.Size = new System.Drawing.Size(150, 162);
  1280. this.groupBox10.TabIndex = 23;
  1281. this.groupBox10.TabStop = false;
  1282. this.groupBox10.Text = "视场模式";
  1283. //
  1284. // panelVision
  1285. //
  1286. this.panelVision.Location = new System.Drawing.Point(2, 14);
  1287. this.panelVision.Name = "panelVision";
  1288. this.panelVision.Size = new System.Drawing.Size(144, 144);
  1289. this.panelVision.TabIndex = 2;
  1290. //
  1291. // groupBox9
  1292. //
  1293. this.groupBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  1294. this.groupBox9.Controls.Add(this.panelMotion);
  1295. this.groupBox9.Location = new System.Drawing.Point(6, 420);
  1296. this.groupBox9.Name = "groupBox9";
  1297. this.groupBox9.Size = new System.Drawing.Size(150, 162);
  1298. this.groupBox9.TabIndex = 22;
  1299. this.groupBox9.TabStop = false;
  1300. this.groupBox9.Text = "运动模式";
  1301. //
  1302. // panelMotion
  1303. //
  1304. this.panelMotion.Location = new System.Drawing.Point(2, 14);
  1305. this.panelMotion.Name = "panelMotion";
  1306. this.panelMotion.Size = new System.Drawing.Size(144, 144);
  1307. this.panelMotion.TabIndex = 1;
  1308. //
  1309. // panelControl
  1310. //
  1311. this.panelControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1312. | System.Windows.Forms.AnchorStyles.Left)
  1313. | System.Windows.Forms.AnchorStyles.Right)));
  1314. this.panelControl.AutoScroll = true;
  1315. this.panelControl.BackColor = System.Drawing.SystemColors.Control;
  1316. this.panelControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  1317. this.panelControl.Location = new System.Drawing.Point(6, 17);
  1318. this.panelControl.Name = "panelControl";
  1319. this.panelControl.Size = new System.Drawing.Size(500, 394);
  1320. this.panelControl.TabIndex = 14;
  1321. //
  1322. // groupBox1
  1323. //
  1324. this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
  1325. | System.Windows.Forms.AnchorStyles.Right)));
  1326. this.groupBox1.Controls.Add(this.btnSetting);
  1327. this.groupBox1.Controls.Add(this.btnStop);
  1328. this.groupBox1.Controls.Add(this.btnCreatImgFile);
  1329. this.groupBox1.Controls.Add(this.btnWorking);
  1330. this.groupBox1.Location = new System.Drawing.Point(3, 3);
  1331. this.groupBox1.Name = "groupBox1";
  1332. this.groupBox1.Size = new System.Drawing.Size(1241, 47);
  1333. this.groupBox1.TabIndex = 2;
  1334. this.groupBox1.TabStop = false;
  1335. this.groupBox1.Text = "操作";
  1336. this.groupBox1.Controls.SetChildIndex(this.btnWorking, 0);
  1337. this.groupBox1.Controls.SetChildIndex(this.btnCreatImgFile, 0);
  1338. this.groupBox1.Controls.SetChildIndex(this.btnStop, 0);
  1339. this.groupBox1.Controls.SetChildIndex(this.btnSetting, 0);
  1340. //
  1341. // btnStop
  1342. //
  1343. this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
  1344. this.btnStop.Location = new System.Drawing.Point(1021, 11);
  1345. this.btnStop.Name = "btnStop";
  1346. this.btnStop.Size = new System.Drawing.Size(89, 34);
  1347. this.btnStop.TabIndex = 2;
  1348. this.btnStop.Text = "停止";
  1349. this.btnStop.UseVisualStyleBackColor = true;
  1350. this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
  1351. //
  1352. // btnCreatImgFile
  1353. //
  1354. this.btnCreatImgFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
  1355. this.btnCreatImgFile.Location = new System.Drawing.Point(1129, 11);
  1356. this.btnCreatImgFile.Name = "btnCreatImgFile";
  1357. this.btnCreatImgFile.Size = new System.Drawing.Size(92, 34);
  1358. this.btnCreatImgFile.TabIndex = 1;
  1359. this.btnCreatImgFile.Text = "创建图片";
  1360. this.btnCreatImgFile.UseVisualStyleBackColor = true;
  1361. this.btnCreatImgFile.Click += new System.EventHandler(this.btnCreatImgFile_Click);
  1362. //
  1363. // btnWorking
  1364. //
  1365. this.btnWorking.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
  1366. this.btnWorking.Location = new System.Drawing.Point(913, 11);
  1367. this.btnWorking.Name = "btnWorking";
  1368. this.btnWorking.Size = new System.Drawing.Size(89, 34);
  1369. this.btnWorking.TabIndex = 0;
  1370. this.btnWorking.Text = "开始";
  1371. this.btnWorking.UseVisualStyleBackColor = true;
  1372. this.btnWorking.Click += new System.EventHandler(this.btnWorking_Click);
  1373. //
  1374. // groupBox3
  1375. //
  1376. this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1377. | System.Windows.Forms.AnchorStyles.Left)));
  1378. this.groupBox3.Location = new System.Drawing.Point(2, 498);
  1379. this.groupBox3.Name = "groupBox3";
  1380. this.groupBox3.Size = new System.Drawing.Size(254, 84);
  1381. this.groupBox3.TabIndex = 13;
  1382. this.groupBox3.TabStop = false;
  1383. //
  1384. // CameraImageStitching
  1385. //
  1386. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  1387. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  1388. this.ClientSize = new System.Drawing.Size(1251, 796);
  1389. this.Controls.Add(this.panelall);
  1390. this.Controls.Add(this.groupBox3);
  1391. this.MinimumSize = new System.Drawing.Size(1257, 750);
  1392. this.Name = "CameraImageStitching";
  1393. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  1394. this.Text = "图像拼接";
  1395. this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CameraImageStitching_FormClosing);
  1396. this.Controls.SetChildIndex(this.groupBox3, 0);
  1397. this.Controls.SetChildIndex(this.panelall, 0);
  1398. this.panelall.ResumeLayout(false);
  1399. this.groupBox13.ResumeLayout(false);
  1400. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
  1401. ((System.ComponentModel.ISupportInitialize)(this.picEffect)).EndInit();
  1402. this.groupBox8.ResumeLayout(false);
  1403. this.groupBox8.PerformLayout();
  1404. this.groupBox7.ResumeLayout(false);
  1405. this.groupBox7.PerformLayout();
  1406. this.groupBox5.ResumeLayout(false);
  1407. this.groupBox5.PerformLayout();
  1408. ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).EndInit();
  1409. this.groupBox4.ResumeLayout(false);
  1410. this.groupBox4.PerformLayout();
  1411. ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).EndInit();
  1412. this.groupBox2.ResumeLayout(false);
  1413. this.groupBox2.PerformLayout();
  1414. ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).EndInit();
  1415. ((System.ComponentModel.ISupportInitialize)(this.trackTime)).EndInit();
  1416. this.groupBox6.ResumeLayout(false);
  1417. this.groupBox6.PerformLayout();
  1418. this.groupBox12.ResumeLayout(false);
  1419. this.groupBox11.ResumeLayout(false);
  1420. this.groupBox10.ResumeLayout(false);
  1421. this.groupBox9.ResumeLayout(false);
  1422. this.groupBox1.ResumeLayout(false);
  1423. this.ResumeLayout(false);
  1424. }
  1425. #endregion
  1426. #region Controls
  1427. private System.Windows.Forms.Panel panelall;
  1428. private System.Windows.Forms.Panel panelControl;
  1429. private System.Windows.Forms.Button btnCreatImgFile;
  1430. private System.Windows.Forms.Button btnWorking;
  1431. private System.Windows.Forms.Button btnStop;
  1432. private System.Windows.Forms.GroupBox groupBox1;
  1433. private System.Windows.Forms.GroupBox groupBox6;
  1434. private System.Windows.Forms.GroupBox groupBox3;
  1435. private System.Windows.Forms.GroupBox groupBox8;
  1436. private System.Windows.Forms.GroupBox groupBox7;
  1437. private System.Windows.Forms.GroupBox groupBox5;
  1438. private System.Windows.Forms.GroupBox groupBox4;
  1439. private System.Windows.Forms.GroupBox groupBox2;
  1440. private System.Windows.Forms.GroupBox groupBox12;
  1441. private System.Windows.Forms.GroupBox groupBox11;
  1442. private System.Windows.Forms.GroupBox groupBox10;
  1443. private System.Windows.Forms.GroupBox groupBox9;
  1444. private System.Windows.Forms.GroupBox groupBox13;
  1445. private System.Windows.Forms.Label label3;
  1446. private System.Windows.Forms.Label label2;
  1447. private System.Windows.Forms.Label label1;
  1448. private System.Windows.Forms.Label label4;
  1449. private System.Windows.Forms.Label label6;
  1450. private System.Windows.Forms.Label label5;
  1451. private System.Windows.Forms.Label label8;
  1452. private System.Windows.Forms.Label label7;
  1453. private System.Windows.Forms.Label label9;
  1454. private System.Windows.Forms.Label label11;
  1455. private System.Windows.Forms.Label label10;
  1456. private System.Windows.Forms.Label label12;
  1457. private System.Windows.Forms.Label label18;
  1458. private System.Windows.Forms.Label label17;
  1459. private System.Windows.Forms.Label label15;
  1460. private System.Windows.Forms.Label label14;
  1461. private System.Windows.Forms.Label label13;
  1462. private System.Windows.Forms.Label label16;
  1463. private System.Windows.Forms.ComboBox cmbStepUnit;
  1464. private System.Windows.Forms.Button btnOther;
  1465. private System.Windows.Forms.TextBox txtPercentage;
  1466. private System.Windows.Forms.TextBox txtTime;
  1467. private System.Windows.Forms.TrackBar trackPercentage;
  1468. private System.Windows.Forms.TrackBar trackTime;
  1469. private System.Windows.Forms.RadioButton ckPolygon;
  1470. private System.Windows.Forms.RadioButton ckRectangle;
  1471. private System.Windows.Forms.RadioButton ckCircular;
  1472. private System.Windows.Forms.TextBox txtSizeX;
  1473. private System.Windows.Forms.TextBox txtTilesX;
  1474. private System.Windows.Forms.DataGridView dgvRegionTeb;
  1475. private System.Windows.Forms.Button btnDel;
  1476. private System.Windows.Forms.Button btnDetailed;
  1477. private System.Windows.Forms.Button btnEstablish;
  1478. private System.Windows.Forms.TextBox txtAreaY;
  1479. private System.Windows.Forms.TextBox txtSizeY;
  1480. private System.Windows.Forms.TextBox txtTilesY;
  1481. private System.Windows.Forms.TextBox txtAreaX;
  1482. private System.Windows.Forms.ComboBox comChoice;
  1483. private System.Windows.Forms.RadioButton ckFocusingRepair;
  1484. private System.Windows.Forms.RadioButton ckFocusingNull;
  1485. private System.Windows.Forms.RadioButton ckAtuoFocusing;
  1486. private System.Windows.Forms.RadioButton ckSeamless;
  1487. private System.Windows.Forms.RadioButton ckTile;
  1488. private System.Windows.Forms.Label lblUnit;
  1489. private System.Windows.Forms.RadioButton ckSize;
  1490. private System.Windows.Forms.RadioButton ckLockNull;
  1491. private System.Windows.Forms.RadioButton ckArea;
  1492. private System.Windows.Forms.Panel panelVision;
  1493. private System.Windows.Forms.Panel panelMotion;
  1494. private System.Windows.Forms.PictureBox picEffect;
  1495. private System.Windows.Forms.RadioButton ckOther;
  1496. private System.Windows.Forms.CheckBox chkAutoExposure;
  1497. private System.Windows.Forms.Button btnWhiteBalance;
  1498. private System.Windows.Forms.DataGridViewTextBoxColumn regionId;
  1499. private System.Windows.Forms.DataGridViewTextBoxColumn regionName;
  1500. private System.Windows.Forms.DataGridViewTextBoxColumn regionTiles;
  1501. private System.Windows.Forms.DataGridViewTextBoxColumn regionZ;
  1502. private System.Windows.Forms.DataGridViewTextBoxColumn regionArea;
  1503. private System.Windows.Forms.Panel pnlSpeed;
  1504. private System.Windows.Forms.PictureBox pictureBox1;
  1505. private NumericUpDown numOverlapRate;
  1506. private CircleControl circleControl;
  1507. private CircleControl circleSportControl;
  1508. #endregion
  1509. private float m_overlapRate => (float)numOverlapRate.Value; // 拼接率
  1510. private System.Timers.Timer m_aeTimer;
  1511. private Thread m_stitchingThread;
  1512. private Label label19;
  1513. private ComboBox cmbStitchList;
  1514. private bool _isDoing;
  1515. private bool IsDoing
  1516. {
  1517. get => _isDoing;
  1518. set
  1519. {
  1520. _isDoing = value;
  1521. if (value)
  1522. {
  1523. this.Invoke(new Action(() =>
  1524. {
  1525. btnWorking.Enabled = false;
  1526. btnStop.Enabled = true;
  1527. }));
  1528. }
  1529. else
  1530. {
  1531. this.Invoke(new Action(() =>
  1532. {
  1533. btnWorking.Enabled = true;
  1534. btnStop.Enabled = false;
  1535. }));
  1536. }
  1537. }
  1538. }
  1539. #region Step Length
  1540. /// <summary>
  1541. /// X轴單次长度
  1542. /// </summary>
  1543. protected override double StepLenthX
  1544. {
  1545. get
  1546. {
  1547. string text = txtXStep.Text.Trim();
  1548. if (string.IsNullOrEmpty(text))
  1549. {
  1550. throw new Exception("X" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
  1551. }
  1552. var value = double.Parse(text);
  1553. if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
  1554. {
  1555. value *= 1000;
  1556. }
  1557. return value;
  1558. }
  1559. }
  1560. /// <summary>
  1561. /// Y轴單次进长度
  1562. /// </summary>
  1563. protected override double StepLenthY
  1564. {
  1565. get
  1566. {
  1567. string text = txtYStep.Text.Trim();
  1568. if (string.IsNullOrEmpty(text))
  1569. {
  1570. throw new Exception("Y" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
  1571. }
  1572. var value = double.Parse(text);
  1573. if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
  1574. {
  1575. value *= 1000;
  1576. }
  1577. return value;
  1578. }
  1579. }
  1580. /// <summary>
  1581. /// Z轴步进长度
  1582. /// </summary>
  1583. protected override double StepLenthZ
  1584. {
  1585. get
  1586. {
  1587. string text = txtZStep.Text.Trim();
  1588. if (string.IsNullOrEmpty(text))
  1589. {
  1590. throw new Exception("Z" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
  1591. }
  1592. var value = double.Parse(text);
  1593. if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
  1594. {
  1595. value *= 1000;
  1596. }
  1597. return value;
  1598. }
  1599. }
  1600. #endregion
  1601. public CameraImageStitching() : base()
  1602. {
  1603. InitializeComponent();
  1604. }
  1605. public CameraImageStitching(AppWorkspace appWorkspace) : base(appWorkspace)
  1606. {
  1607. InitializeComponent();
  1608. InitializeLanguageText();
  1609. m_aeTimer = new System.Timers.Timer(1000);
  1610. m_aeTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimerAutoExposure);
  1611. m_aeTimer.AutoReset = true;
  1612. m_aeTimer.SynchronizingObject = this;
  1613. this.panelControl.Controls.Add(this.m_documentWorkspace);
  1614. this.m_documentWorkspace.GraphicsList.SelectChanged += GraphicsList_SelectChanged;
  1615. circleControl = initViewCircal(71);
  1616. circleSportControl = initSportCircal(71);
  1617. this.panelVision.Controls.Add(this.circleControl);
  1618. this.panelMotion.Controls.Add(this.circleSportControl);
  1619. // 初始化步长单位
  1620. this.cmbStepUnit.Items.Clear();
  1621. this.cmbStepUnit.Items.AddRange(m_unit);
  1622. this.cmbStepUnit.SelectedIndex = 1;
  1623. this.btnStop.Enabled = false;
  1624. }
  1625. protected override void ReinitSpeedUI()
  1626. {
  1627. InitGroupSpeed(pnlSpeed, SpeedChanged);
  1628. (pnlSpeed.Controls[1] as RadioButton).Checked = true;
  1629. }
  1630. protected void SpeedChanged(object sender, EventArgs e)
  1631. {
  1632. RadioButton radio = (RadioButton)sender;
  1633. if (radio.Checked)
  1634. {
  1635. int index = (int)radio.Tag;
  1636. m_Stage.SetSpeedXY(m_speedLists[index].LSpeed);
  1637. m_Stage.SetSpeedZ(m_speedLists[index].ZSpeed);
  1638. }
  1639. }
  1640. #region 拼图方式
  1641. /// <summary>
  1642. /// 矩形
  1643. /// </summary>
  1644. /// <param name="sender"></param>
  1645. /// <param name="e"></param>
  1646. private void ckRectangle_CheckedChanged(object sender, EventArgs e)
  1647. {
  1648. if (ckRectangle.Checked)
  1649. {
  1650. DrawStitchingRectangle.ViewWidth = m_viewWidth;
  1651. DrawStitchingRectangle.ViewHeight = m_viewHeight;
  1652. DrawStitchingRectangle.Interval = m_overlapRate;
  1653. if (ckArea.Checked)
  1654. {
  1655. DrawStitchingRectangle.lockType = LockType.AREA;
  1656. }
  1657. else if (ckSize.Checked)
  1658. {
  1659. DrawStitchingRectangle.lockType = LockType.SIZE;
  1660. }
  1661. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
  1662. btnEstablish.Enabled = false;
  1663. }
  1664. }
  1665. /// <summary>
  1666. /// 圆
  1667. /// </summary>
  1668. /// <param name="sender"></param>
  1669. /// <param name="e"></param>
  1670. private void ckCircular_CheckedChanged(object sender, EventArgs e)
  1671. {
  1672. if (ckCircular.Checked)
  1673. {
  1674. DrawStitchingCircle.ViewWidth = m_viewWidth;
  1675. DrawStitchingCircle.ViewHeight = m_viewHeight;
  1676. DrawStitchingRectangle.Interval = m_overlapRate;
  1677. if (ckArea.Checked)
  1678. {
  1679. DrawStitchingCircle.lockType = LockType.AREA;
  1680. }
  1681. else if (ckSize.Checked)
  1682. {
  1683. DrawStitchingCircle.lockType = LockType.SIZE;
  1684. }
  1685. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingCircle;
  1686. btnEstablish.Enabled = false;
  1687. }
  1688. }
  1689. /// <summary>
  1690. /// 多边形
  1691. /// </summary>
  1692. /// <param name="sender"></param>
  1693. /// <param name="e"></param>
  1694. private void ckPolygon_CheckedChanged(object sender, EventArgs e)
  1695. {
  1696. if (ckPolygon.Checked)
  1697. {
  1698. DrawStitchingPolygon.ViewWidth = m_viewWidth;
  1699. DrawStitchingPolygon.ViewHeight = m_viewHeight;
  1700. DrawStitchingRectangle.Interval = m_overlapRate;
  1701. if (ckArea.Checked)
  1702. {
  1703. DrawStitchingPolygon.lockType = LockType.AREA;
  1704. }
  1705. else if (ckSize.Checked)
  1706. {
  1707. DrawStitchingPolygon.lockType = LockType.SIZE;
  1708. }
  1709. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingPolygon;
  1710. btnEstablish.Enabled = false;
  1711. }
  1712. }
  1713. /// <summary>
  1714. /// 自定义
  1715. /// </summary>
  1716. /// <param name="sender"></param>
  1717. /// <param name="e"></param>
  1718. private void ckOther_CheckedChanged(object sender, EventArgs e)
  1719. {
  1720. btnEstablish.Enabled = true;
  1721. }
  1722. /// <summary>
  1723. /// 创建自定义矩形
  1724. /// </summary>
  1725. /// <param name="sender"></param>
  1726. /// <param name="e"></param>
  1727. private void btnEstablish_Click(object sender, EventArgs e)
  1728. {
  1729. DrawStitchingRectangle.ViewWidth = m_viewWidth;
  1730. DrawStitchingRectangle.ViewHeight = m_viewHeight;
  1731. DrawStitchingRectangle.Interval = m_overlapRate;
  1732. if (ckArea.Checked)
  1733. {
  1734. DrawStitchingRectangle.lockType = LockType.AREA;
  1735. }
  1736. else if (ckSize.Checked)
  1737. {
  1738. DrawStitchingRectangle.lockType = LockType.SIZE;
  1739. }
  1740. string tilesX = txtTilesX.Text.Trim();
  1741. string tilesY = txtTilesY.Text.Trim();
  1742. string sizeX = txtSizeX.Text.Trim();
  1743. string sizeY = txtSizeY.Text.Trim();
  1744. string areaX = txtAreaX.Text.Trim();
  1745. if (!string.IsNullOrEmpty(tilesX) && !string.IsNullOrEmpty(tilesY))
  1746. {
  1747. int x = Int32.Parse(tilesX);
  1748. int y = Int32.Parse(tilesY);
  1749. if (x <= 0 || y <= 0)
  1750. {
  1751. MessageBox.Show(PdnResources.GetString("Menu.Tilesmusthavavalue.Text"));
  1752. return;
  1753. }
  1754. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
  1755. int width = (int)Math.Floor(Convert.ToDouble(((x - (x + 1) * m_overlapRate) * m_viewWidth))) - 1;
  1756. int height = (int)Math.Floor(Convert.ToDouble(((y - (y + 1) * m_overlapRate) * m_viewHeight))) - 1;
  1757. Console.WriteLine(width + " " + height + " " + m_viewHeight);
  1758. m_documentWorkspace.CreateStitchingRectangle(width, height);
  1759. UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
  1760. }
  1761. else if (!string.IsNullOrEmpty(sizeX) && !string.IsNullOrEmpty(sizeY))
  1762. {
  1763. float w = float.Parse(sizeX);
  1764. float h = float.Parse(sizeY);
  1765. if (w <= 0 || h <= 0)
  1766. {
  1767. MessageBox.Show(PdnResources.GetString("Menu.Sizevaluemustbegreaterthan0.Text"));
  1768. return;
  1769. }
  1770. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
  1771. m_documentWorkspace.CreateStitchingRectangle((int)(w * 1000 / m_PxLength), (int)(h * 1000 / m_PxLength));
  1772. UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
  1773. }
  1774. else if (!string.IsNullOrEmpty(areaX))
  1775. {
  1776. double area = double.Parse(areaX);
  1777. if (area <= 0)
  1778. {
  1779. MessageBox.Show(PdnResources.GetString("Menu.TheAreavaluemustbegreaterthan0.Text"));
  1780. return;
  1781. }
  1782. double side = Math.Round(Math.Sqrt(area), 2);
  1783. m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
  1784. m_documentWorkspace.CreateStitchingRectangle((int)(side * 1000 / m_PxLength), (int)(side * 1000 / m_PxLength));
  1785. UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
  1786. }
  1787. else return;
  1788. if (CurvedSurfaceList != null)
  1789. {
  1790. CurvedSurfaceList.Insert(0, null);
  1791. }
  1792. }
  1793. #endregion
  1794. #region 拼图区域列表
  1795. private void GraphicsList_SelectChanged(object sender, EventArgs e)
  1796. {
  1797. UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
  1798. dgvRegionTeb.Rows.Clear();
  1799. List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
  1800. int count = graphicsList.Count;
  1801. for (int i = 0; i < count; i++)
  1802. {
  1803. int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
  1804. double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
  1805. graphicsList[i].PropertyChanged += CameraImageStitching_PropertyChanged;
  1806. string name = "";
  1807. if (graphicsList[i] is DrawStitchingRectangle)
  1808. {
  1809. name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
  1810. }
  1811. else if (graphicsList[i] is DrawStitchingPolygon)
  1812. {
  1813. name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
  1814. }
  1815. else
  1816. {
  1817. name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
  1818. }
  1819. dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], 0, area);
  1820. if (graphicsList[i].Selected)
  1821. {
  1822. dgvRegionTeb.Rows[i].Selected = true;
  1823. dgvRegionTeb.CurrentCell = dgvRegionTeb.Rows[i].Cells[0];
  1824. }
  1825. }
  1826. }
  1827. private void CameraImageStitching_PropertyChanged(object sender, EventArgs e)
  1828. {
  1829. UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
  1830. this.DgvRegionTebRefresh();
  1831. }
  1832. private void DgvRegionTebRefresh()
  1833. {
  1834. dgvRegionTeb.Rows.Clear();
  1835. List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
  1836. int count = graphicsList.Count;
  1837. for (int i = 0; i < count; i++)
  1838. {
  1839. int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
  1840. double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
  1841. string name = "";
  1842. if (graphicsList[i] is DrawStitchingRectangle)
  1843. {
  1844. name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
  1845. }
  1846. else if (graphicsList[i] is DrawStitchingPolygon)
  1847. {
  1848. name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
  1849. }
  1850. else
  1851. {
  1852. name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
  1853. }
  1854. dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], 0, area);
  1855. }
  1856. }
  1857. private void UpdateActiveTool(DrawToolType activeTool)
  1858. {
  1859. switch (activeTool)
  1860. {
  1861. case DrawToolType.DrawStitchingRectangle:
  1862. this.ckRectangle.Checked = true;
  1863. break;
  1864. case DrawToolType.DrawStitchingCircle:
  1865. this.ckCircular.Checked = true;
  1866. break;
  1867. case DrawToolType.DrawStitchingPolygon:
  1868. this.ckPolygon.Checked = true;
  1869. break;
  1870. case DrawToolType.Pointer:
  1871. this.ckOther.Checked = true;
  1872. break;
  1873. }
  1874. }
  1875. /// <summary>
  1876. /// 无锁定
  1877. /// </summary>
  1878. /// <param name="sender"></param>
  1879. /// <param name="e"></param>
  1880. private void ckLockNull_CheckedChanged(object sender, EventArgs e)
  1881. {
  1882. int count = this.m_documentWorkspace.GraphicsList.Count;
  1883. for (int i = 0; i < count; i++)
  1884. {
  1885. ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.NULL);
  1886. }
  1887. this.m_documentWorkspace.Refresh();
  1888. }
  1889. /// <summary>
  1890. /// 面积锁定
  1891. /// </summary>
  1892. /// <param name="sender"></param>
  1893. /// <param name="e"></param>
  1894. private void ckArea_CheckedChanged(object sender, EventArgs e)
  1895. {
  1896. int count = this.m_documentWorkspace.GraphicsList.Count;
  1897. for (int i = 0; i < count; i++)
  1898. {
  1899. ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.AREA);
  1900. }
  1901. this.m_documentWorkspace.Refresh();
  1902. }
  1903. /// <summary>
  1904. /// 大小锁定
  1905. /// </summary>
  1906. /// <param name="sender"></param>
  1907. /// <param name="e"></param>
  1908. private void ckSize_CheckedChanged(object sender, EventArgs e)
  1909. {
  1910. int count = this.m_documentWorkspace.GraphicsList.Count;
  1911. for (int i = 0; i < count; i++)
  1912. {
  1913. ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.SIZE);
  1914. }
  1915. this.m_documentWorkspace.Refresh();
  1916. }
  1917. private void btnDel_Click(object sender, EventArgs e)
  1918. {
  1919. if (dgvRegionTeb.SelectedRows.Count <= 0)
  1920. {
  1921. MessageBox.Show(PdnResources.GetString("Menu.Selectthedatatoelete0.Text"));
  1922. return;
  1923. }
  1924. DialogResult result = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretodelete.Text") + "?", PdnResources.GetString("Menu.Tips.text"), MessageBoxButtons.OKCancel);
  1925. if (result == DialogResult.OK)
  1926. {
  1927. //执行删除
  1928. foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
  1929. {
  1930. if (!r.IsNewRow)
  1931. {
  1932. this.m_documentWorkspace.GraphicsList.RemoveAt(r.Index);
  1933. if (CurvedSurfaceList != null && CurvedSurfaceList.Count > r.Index)
  1934. CurvedSurfaceList.RemoveAt(r.Index);
  1935. }
  1936. }
  1937. this.DgvRegionTebRefresh();
  1938. foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
  1939. {
  1940. if (!r.IsNewRow)
  1941. {
  1942. this.m_documentWorkspace.GraphicsList[r.Index].Selected = true;
  1943. }
  1944. }
  1945. this.m_documentWorkspace.Refresh();
  1946. }
  1947. }
  1948. private void dgvRegionTeb_SelectionChanged(object sender, EventArgs e)
  1949. {
  1950. }
  1951. private void dgvRegionTeb_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  1952. {
  1953. this.m_documentWorkspace.GraphicsList.UnselectAll();
  1954. for (int i = 0; i < dgvRegionTeb.Rows.Count; i++)
  1955. {
  1956. if (dgvRegionTeb.Rows[i].Selected)
  1957. {
  1958. this.m_documentWorkspace.GraphicsList[i].Selected = true;
  1959. }
  1960. else
  1961. {
  1962. this.m_documentWorkspace.GraphicsList[i].Selected = false;
  1963. }
  1964. }
  1965. this.m_documentWorkspace.Refresh();
  1966. }
  1967. private void dgvRegionTeb_CellContentClick(object sender, DataGridViewCellEventArgs e)
  1968. {
  1969. }
  1970. /// <summary>
  1971. /// 详细
  1972. /// </summary>
  1973. /// <param name="sender"></param>
  1974. /// <param name="e"></param>
  1975. private void btnDetailed_Click(object sender, EventArgs e)
  1976. {
  1977. if (dgvRegionTeb.SelectedRows.Count > 1 || dgvRegionTeb.SelectedRows.Count <= 0)
  1978. {
  1979. MessageBox.Show(PdnResources.GetString("Menu.Pleasselectandselecnlyoneuzzlearea0.Text"));
  1980. return;
  1981. }
  1982. foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
  1983. {
  1984. if (!r.IsNewRow)
  1985. {
  1986. ImageStitchingDetailDialog detailDialog = new ImageStitchingDetailDialog(((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[r.Index]).GetViewPoints(), r.Index);
  1987. detailDialog.Deleted += DetailDialog_Deleted;
  1988. detailDialog.ShowDialog();
  1989. }
  1990. }
  1991. }
  1992. /// <summary>
  1993. /// 删除拼图区域
  1994. /// </summary>
  1995. /// <param name="vIndex"></param>
  1996. /// <param name="pIndex"></param>
  1997. private void DetailDialog_Deleted(int vIndex, int pIndex)
  1998. {
  1999. ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[vIndex]).DeletePoint(pIndex);
  2000. this.m_documentWorkspace.Refresh();
  2001. }
  2002. #endregion
  2003. #region 相机设置
  2004. /// <summary>
  2005. /// 初始化相机设置相关控件
  2006. /// </summary>
  2007. protected override void initCameraSetting()
  2008. {
  2009. int exposureVal = (int)(m_cameraParamModel.parame.LNExposure);
  2010. if (exposureVal >= trackTime.Minimum && exposureVal <= trackTime.Maximum)
  2011. {
  2012. trackTime.Value = exposureVal;
  2013. }
  2014. // 曝光百分比
  2015. int preExposure = m_cameraParamModel.parame.PreExposure;
  2016. if (preExposure < 5)
  2017. {
  2018. trackPercentage.Value = 5;
  2019. }
  2020. else if (preExposure > 200)
  2021. {
  2022. trackPercentage.Value = 200;
  2023. }
  2024. else
  2025. {
  2026. trackPercentage.Value = m_cameraParamModel.parame.PreExposure;
  2027. }
  2028. this.txtPercentage.Text = this.trackPercentage.Value.ToString();
  2029. UpdateExposureUI(m_cameraParamModel.parame.ATExposure);
  2030. }
  2031. /// <summary>
  2032. /// 其它设置
  2033. /// </summary>
  2034. /// <param name="sender"></param>
  2035. /// <param name="e"></param>
  2036. private void btnOther_Click(object sender, EventArgs e)
  2037. {
  2038. using (CameraSettingDialog af = new CameraSettingDialog())
  2039. {
  2040. af.ShowDialog();
  2041. }
  2042. }
  2043. /// <summary>
  2044. /// 自动曝光
  2045. /// </summary>
  2046. /// <param name="sender"></param>
  2047. /// <param name="e"></param>
  2048. private void chkAutoExposure_Click(object sender, EventArgs e)
  2049. {
  2050. int autoExposure = chkAutoExposure.Checked ? 1 : 0;
  2051. m_cameraParamModel.parame.ATExposure = autoExposure;
  2052. if (autoExposure == 0)
  2053. {
  2054. trackPercentage.Value = 100;
  2055. }
  2056. UpdateExposureUI(autoExposure);
  2057. }
  2058. private void UpdateExposureUI(int autoExposure)
  2059. {
  2060. if (autoExposure == 1)
  2061. {
  2062. // 自动曝光
  2063. trackTime.Enabled = false;
  2064. txtTime.Enabled = false;
  2065. trackPercentage.Enabled = false;
  2066. txtPercentage.Enabled = false;
  2067. chkAutoExposure.Checked = true;
  2068. trackPercentage.Value = 100;
  2069. m_aeTimer.Start();
  2070. }
  2071. else
  2072. {
  2073. trackTime.Enabled = true;
  2074. txtTime.Enabled = true;
  2075. trackPercentage.Enabled = true;
  2076. txtPercentage.Enabled = true;
  2077. chkAutoExposure.Checked = false;
  2078. m_aeTimer.Stop();
  2079. }
  2080. }
  2081. public void OnTimerAutoExposure(object source, System.Timers.ElapsedEventArgs e)
  2082. {
  2083. double paramValue = m_camera.GetExposureTime();
  2084. int expValue = (int)(paramValue * 1000);
  2085. if (expValue < 137)
  2086. {
  2087. expValue = 130;
  2088. }
  2089. if (expValue > 15000000)
  2090. {
  2091. expValue = 15000000;
  2092. }
  2093. trackTime.Value = expValue;
  2094. decimal txtVale = 0;
  2095. int sec = 0;
  2096. int msec = 0;
  2097. int usec = 0;
  2098. m_camera.UpdateExposureTime(ref sec, ref msec, ref usec, (UInt64)(paramValue * 1000));
  2099. if (sec > 0)
  2100. {
  2101. this.lblUnit.Text = "s";
  2102. txtVale += sec;
  2103. }
  2104. if (msec > 0)
  2105. {
  2106. if (txtVale > 0)
  2107. {
  2108. txtVale += ((decimal)msec / 1000);
  2109. this.lblUnit.Text = "s";
  2110. usec = 0; // 微秒舍掉不显示了
  2111. }
  2112. else
  2113. {
  2114. this.lblUnit.Text = "ms";
  2115. txtVale += msec;
  2116. }
  2117. }
  2118. if (usec > 0)
  2119. {
  2120. if (txtVale > 0)
  2121. {
  2122. txtVale += ((decimal)usec / 1000);
  2123. }
  2124. else
  2125. {
  2126. this.lblUnit.Text = "μs";
  2127. txtVale = usec;
  2128. }
  2129. }
  2130. this.txtTime.Text = txtVale.ToString();
  2131. }
  2132. private void trackTime_ValueChanged(object sender, EventArgs e)
  2133. {
  2134. //规划为微秒值存储到model
  2135. double atExpValue = (double)(this.trackTime.Value);
  2136. int exposureTimeUSec = (int)atExpValue;
  2137. this.m_cameraParamModel.parame.LNExposure = exposureTimeUSec;
  2138. // 设置到相机
  2139. m_camera.SetExposureTime((ulong)(exposureTimeUSec * (trackPercentage.Value / 100))); //usec
  2140. decimal txtVale = 0;
  2141. int sec = 0;
  2142. int msec = 0;
  2143. int usec = 0;
  2144. m_camera.UpdateExposureTime(ref sec, ref msec, ref usec, (UInt64)exposureTimeUSec);
  2145. if (sec > 0)
  2146. {
  2147. this.lblUnit.Text = "s";
  2148. txtVale += sec;
  2149. }
  2150. if (msec > 0)
  2151. {
  2152. if (txtVale > 0)
  2153. {
  2154. txtVale += ((decimal)msec / 1000);
  2155. this.lblUnit.Text = "s";
  2156. usec = 0; // 微秒舍掉不显示了
  2157. }
  2158. else
  2159. {
  2160. this.lblUnit.Text = "ms";
  2161. txtVale += msec;
  2162. }
  2163. }
  2164. if (usec > 0)
  2165. {
  2166. if (txtVale > 0)
  2167. {
  2168. txtVale += ((decimal)usec / 1000);
  2169. }
  2170. else
  2171. {
  2172. this.lblUnit.Text = "μs";
  2173. txtVale = usec;
  2174. }
  2175. }
  2176. this.txtTime.Text = txtVale.ToString();
  2177. }
  2178. private void txtTime_KeyPress(object sender, KeyPressEventArgs e)
  2179. {
  2180. if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
  2181. {
  2182. e.Handled = true;
  2183. return;
  2184. }
  2185. if (e.KeyChar == (char)Keys.Enter)
  2186. {
  2187. try
  2188. {
  2189. int baoGuangTBarVal = Convert.ToInt32(txtTime.Text);
  2190. switch (lblUnit.Text)
  2191. {
  2192. case "s":
  2193. baoGuangTBarVal = baoGuangTBarVal * 1000 * 1000;
  2194. break;
  2195. case "ms":
  2196. baoGuangTBarVal = baoGuangTBarVal * 1000;
  2197. break;
  2198. }
  2199. if (baoGuangTBarVal > trackTime.Maximum)
  2200. {
  2201. baoGuangTBarVal = trackTime.Maximum;
  2202. }
  2203. if (baoGuangTBarVal < trackTime.Minimum)
  2204. {
  2205. baoGuangTBarVal = trackTime.Minimum;
  2206. }
  2207. trackTime.Value = baoGuangTBarVal;
  2208. }
  2209. catch (Exception ex)
  2210. {
  2211. MessageBox.Show(ex.Message);
  2212. }
  2213. }
  2214. }
  2215. private void trackPercentage_ValueChanged(object sender, EventArgs e)
  2216. {
  2217. double atExpValue = (double)(this.trackTime.Value) * (double)this.trackPercentage.Value / 100.0;
  2218. this.txtPercentage.Text = this.trackPercentage.Value + "";
  2219. m_cameraParamModel.parame.PreExposure = this.trackPercentage.Value;
  2220. if (m_cameraParamModel.parame.ATExposure == 0)
  2221. {
  2222. // 设置到相机
  2223. m_camera.SetExposureTime((ulong)atExpValue); //usec
  2224. }
  2225. }
  2226. private void txtPercentage_KeyPress(object sender, KeyPressEventArgs e)
  2227. {
  2228. if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
  2229. {
  2230. e.Handled = true;
  2231. return;
  2232. }
  2233. if (e.KeyChar == (char)Keys.Enter)
  2234. {
  2235. try
  2236. {
  2237. int baoGuangPerTBarVal = Convert.ToInt32(txtPercentage.Text);
  2238. if (baoGuangPerTBarVal < 5)
  2239. {
  2240. baoGuangPerTBarVal = 5;
  2241. }
  2242. if (baoGuangPerTBarVal > 200)
  2243. {
  2244. baoGuangPerTBarVal = 200;
  2245. }
  2246. trackPercentage.Value = baoGuangPerTBarVal;
  2247. }
  2248. catch (Exception ex)
  2249. {
  2250. MessageBox.Show(ex.Message);
  2251. }
  2252. }
  2253. }
  2254. /// <summary>
  2255. /// 白平衡
  2256. /// </summary>
  2257. /// <param name="sender"></param>
  2258. /// <param name="e"></param>
  2259. private void btnWhiteBalance_Click(object sender, EventArgs e)
  2260. {
  2261. m_cameraParamModel.parame.WhiteBalance = 1;
  2262. // 自动白平衡
  2263. m_camera.SetWhiteBalanceMode(WhiteBalanceMode.AUTO);
  2264. }
  2265. #endregion
  2266. #region 拼图
  2267. private void btnStop_Click(object sender, EventArgs e)
  2268. {
  2269. IsDoing = false;
  2270. _stitching.Stop();
  2271. m_Stage.LockStage();
  2272. m_Stage.LockZ();
  2273. }
  2274. /// <summary>
  2275. /// 拼图开始
  2276. /// </summary>
  2277. /// <param name="sender"></param>
  2278. /// <param name="e"></param>
  2279. private void btnWorking_Click(object sender, EventArgs e)
  2280. {
  2281. if (!m_camera.IsOpen())
  2282. {
  2283. MessageBox.Show(PdnResources.GetString("Menu.Pleaseconfirmwhetherthecameraisconnected.Text"));
  2284. return;
  2285. }
  2286. if (!m_isReset)
  2287. {
  2288. MessageBox.Show(PdnResources.GetString("Menu.Pleaseresetfirst.Text"));
  2289. return;
  2290. }
  2291. if (this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch).Count <= 0)
  2292. {
  2293. MessageBox.Show(PdnResources.GetString("Menu.Pleasereatethepuzzleareafirst.Text"));
  2294. return;
  2295. }
  2296. _stchCtlrList = new List<StitchingController>();
  2297. IsDoing = true;
  2298. m_stitchingThread = new Thread(new ThreadStart(StitchingMoveThreadEntry));
  2299. m_stitchingThread.IsBackground = true;
  2300. m_stitchingThread.Start();
  2301. ///展示拼图成果
  2302. new Task(() =>
  2303. {
  2304. do
  2305. {
  2306. if (_stitching != null)
  2307. {
  2308. if (_stitching.Result != null)
  2309. this.BeginInvoke(new Action(() =>
  2310. {
  2311. pictureBox1.Image = _stitching.Result;
  2312. pictureBox1.Invalidate();
  2313. }));
  2314. }
  2315. Thread.Sleep(300);
  2316. } while ((IsDoing || (_stitching != null && !_stitching.IsDone)));
  2317. }).Start();
  2318. }
  2319. private StitchingController _stitching;
  2320. private List<StitchingController> _stchCtlrList;
  2321. /// <summary>
  2322. /// 拼图流程控制
  2323. /// </summary>
  2324. private void StitchingMoveThreadEntry()
  2325. {
  2326. int num = 0;
  2327. CurvedSurface curveSuf = null;
  2328. List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
  2329. for (int i = 0; i < graphicsList.Count; i++)
  2330. {
  2331. var draw = (DrawStithchingBase)graphicsList[i];
  2332. List<Dictionary<int, object>> list = draw.GetViewPoints();
  2333. this.Invoke(new Action(() =>
  2334. {
  2335. if (i == 0)
  2336. cmbStitchList.Items.Clear();
  2337. cmbStitchList.Items.Add(i);
  2338. cmbStitchList.Visible = i > 0;
  2339. }));
  2340. _stitching?.Wait();
  2341. _stitching = new StitchingController(draw.ColumnNum, draw.RowNum, m_overlapRate);
  2342. _stitching.MathSelect = ckTile.Checked ? 0 : ckSeamless.Checked ? 3 : 0;
  2343. _stchCtlrList.Add(_stitching);
  2344. _stitching.Start();
  2345. if (CurvedSurfaceList != null && CurvedSurfaceList.Count > i)
  2346. curveSuf = CurvedSurfaceList[i];
  2347. for (int j = 0; j < list.Count; j++)
  2348. {
  2349. if (!IsDoing)
  2350. {
  2351. return;
  2352. }
  2353. Dictionary<int, object> point = list[j];
  2354. if (point[1].ToString().Equals("0"))
  2355. {
  2356. PointF nextP = (PointF)point[0];
  2357. var x = ConvertPXToUm(nextP.X);
  2358. var y = ConvertPXToUm(nextP.Y);
  2359. base.m_Stage.To(x, y);
  2360. var times = DateTime.Now;
  2361. m_Stage.WaitMoveDone();
  2362. Console.WriteLine("WaitMoveDone:" + (DateTime.Now - times).TotalMilliseconds.ToString("f1"));
  2363. Thread.Sleep(150);
  2364. //自动聚焦
  2365. if (ckAtuoFocusing.Checked)
  2366. {
  2367. AutoFocus(num);
  2368. num++;
  2369. }
  2370. //聚焦补偿
  2371. if (ckFocusingRepair.Checked && curveSuf != null)
  2372. {
  2373. var p3d = curveSuf.Points.FirstOrDefault((p) => Math.Abs(p.X - x) < 1 && Math.Abs(p.Y - y) < 1);
  2374. var zpos = 0.0;
  2375. if (p3d == null)
  2376. {
  2377. zpos = curveSuf.GetValue(x, y);
  2378. }
  2379. else
  2380. {
  2381. zpos = p3d.Z;
  2382. }
  2383. m_Stage.UpTo(zpos);
  2384. m_Stage.WaitMoveDone();
  2385. }
  2386. _stitching.Add(m_BitmapCurrent);
  2387. //_stitching.SynRun();
  2388. }
  2389. else
  2390. {
  2391. var black = new Bitmap(m_BitmapCurrent.Width, m_BitmapCurrent.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
  2392. _stitching.Add(black);
  2393. }
  2394. }
  2395. }
  2396. _stitching?.Wait();
  2397. IsDoing = false;
  2398. this.Invoke(new Action(() =>
  2399. {
  2400. cmbStitchList.SelectedIndex = cmbStitchList.Items.Count - 1;
  2401. }));
  2402. //if (success)
  2403. //{
  2404. // MessageBox.Show(PdnResources.GetString("Menu.Jigsawpuzzlefailure.Text"));
  2405. //}
  2406. //else
  2407. {
  2408. MessageBox.Show(PdnResources.GetString("Menu.Thepuzzletocomplete.Text"));
  2409. }
  2410. }
  2411. private void AutoFocus(int num)
  2412. {
  2413. switch (_comChoiceSelected)
  2414. {
  2415. case 0:
  2416. AutoFocusStart();
  2417. break;
  2418. case 1:
  2419. if (num % 2 == 0)
  2420. {
  2421. AutoFocusStart();
  2422. }
  2423. break;
  2424. case 2:
  2425. if (num % 3 == 0)
  2426. {
  2427. AutoFocusStart();
  2428. }
  2429. break;
  2430. case 3:
  2431. if (num % 5 == 0)
  2432. {
  2433. AutoFocusStart();
  2434. }
  2435. break;
  2436. case 4:
  2437. if (num % 7 == 0)
  2438. {
  2439. AutoFocusStart();
  2440. }
  2441. break;
  2442. case 5:
  2443. if (num % 9 == 0)
  2444. {
  2445. AutoFocusStart();
  2446. }
  2447. break;
  2448. case 6:
  2449. if (num % 10 == 0)
  2450. {
  2451. AutoFocusStart();
  2452. }
  2453. break;
  2454. }
  2455. }
  2456. /// <summary>
  2457. /// 调用预览窗口的自动聚焦
  2458. /// </summary>
  2459. private void AutoFocusStart()
  2460. {
  2461. try
  2462. {
  2463. AutoFocusWorkflow.AutoFocus(m_Stage, () => { return m_BitmapCurrent; });
  2464. }
  2465. catch (Exception ex)
  2466. {
  2467. MessageBox.Show(ex.Message);
  2468. }
  2469. }
  2470. #endregion
  2471. private void btnCreatImgFile_Click(object sender, EventArgs e)
  2472. {
  2473. if (_stitching == null)
  2474. {
  2475. MessageBox.Show(PdnResources.GetString("Menu.NoMosaicimagefound.Text"));
  2476. return;
  2477. }
  2478. //获取命名
  2479. string photoName;
  2480. if (Startup.instance.ruleDB == null)
  2481. {
  2482. photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, "默认标尺", "0");
  2483. }
  2484. else
  2485. {
  2486. photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, Startup.instance.ruleDB.ruler_name, Startup.instance.ruleDB.gain_multiple.ToString());
  2487. }
  2488. DocumentWorkspace dw = m_appWorkspace.AddNewDocumentWorkspace();
  2489. Document document = Document.FromImage(_stitching.Result);
  2490. document.Dirty = true;
  2491. dw.Document = document;
  2492. dw.fileText = photoName;
  2493. dw.xmlSaveModel = Startup.instance.ruleDB;
  2494. dw.InitRulerInfo();
  2495. //激活
  2496. m_appWorkspace.ActiveDocumentWorkspace = dw;
  2497. //锁定扩缩
  2498. if (m_appWorkspace.isLockZoom && m_appWorkspace.lockScaleRatio > 0)
  2499. {
  2500. m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.ScaleFactor;
  2501. m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor = ScaleFactor.FromDouble(m_appWorkspace.lockScaleRatio);
  2502. m_appWorkspace.SetZoonTrackValue(m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor);
  2503. }
  2504. else
  2505. {
  2506. m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.FitToWindow;
  2507. }
  2508. m_appWorkspace.Refresh();
  2509. }
  2510. int _comChoiceSelected = -1;
  2511. private void comChoice_SelectedIndexChanged(object sender, EventArgs e)
  2512. {
  2513. _comChoiceSelected = comChoice.SelectedIndex;
  2514. }
  2515. protected override void GetMouseLeftClickPoint(object sender, EventArgs e)
  2516. {
  2517. if (!IsDoing)
  2518. base.GetMouseLeftClickPoint(sender, e);
  2519. }
  2520. private void cmbStitchList_SelectedIndexChanged(object sender, EventArgs e)
  2521. {
  2522. int i = cmbStitchList.SelectedIndex;
  2523. _stitching = _stchCtlrList[i];
  2524. pictureBox1.Image = _stitching.Result;
  2525. }
  2526. private void CameraImageStitching_FormClosing(object sender, FormClosingEventArgs e)
  2527. {
  2528. if (_stchCtlrList == null) return;
  2529. foreach (var item in _stchCtlrList)
  2530. {
  2531. item.Dispose();
  2532. }
  2533. _stchCtlrList.Clear();
  2534. GC.Collect();
  2535. }
  2536. List<CurvedSurface> CurvedSurfaceList;
  2537. private void ckFocusingRepair_Click(object sender, EventArgs e)
  2538. {
  2539. List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
  2540. List<DrawStithchingBase> graphicsList1 = new List<DrawStithchingBase>();
  2541. foreach (var item in graphicsList)
  2542. {
  2543. graphicsList1.Add(item as DrawStithchingBase);
  2544. }
  2545. var form = new ImageStitchingFocusDialog(m_Stage, graphicsList1);
  2546. form.CallbackResult = (result) =>
  2547. {
  2548. CurvedSurfaceList = result.ToList();
  2549. };
  2550. form.ShowDialog();
  2551. }
  2552. }
  2553. }