CameraImageStitching.cs 117 KB

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