GeneralSettingDialog.cs 158 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550
  1. using PaintDotNet.Base.CommTool;
  2. using PaintDotNet.DbOpreate.DbBll;
  3. using PaintDotNet.Base.SettingModel;
  4. using System;
  5. using System.Drawing;
  6. using System.IO;
  7. using System.Text.RegularExpressions;
  8. using System.Windows.Forms;
  9. using System.Linq;
  10. using System.Collections;
  11. using PaintDotNet.Instrument;
  12. namespace PaintDotNet.Setting
  13. {
  14. /// <summary>
  15. /// 设置->常规设置
  16. /// </summary>
  17. internal partial class GeneralSettingDialog : PdnBaseForm
  18. {
  19. private UserInfoModel userInfo = Startup.instance.userInfo;
  20. private ConfigModel config = Startup.instance.configModel;
  21. private GroupBox groupBox10;
  22. private Button button8;
  23. private TextBox textBox6;
  24. private Button button7;
  25. private TextBox textBox5;
  26. private Button button6;
  27. private TextBox textBox4;
  28. private Label label20;
  29. private Label label19;
  30. private Label label18;
  31. private string pattern = @"^\d+(\.\d)?$";
  32. private ListView listView3;
  33. private Label label21;
  34. private Label label22;
  35. private Label label23;
  36. private Label label24;
  37. private Label label25;
  38. private Panel panel1;
  39. private RadioButton radioButton7;
  40. private RadioButton radioButton6;
  41. private Panel panel2;
  42. private RadioButton radioButton8;
  43. private RadioButton radioButton9;
  44. private Panel panel3;
  45. private RadioButton radioButton10;
  46. private RadioButton radioButton11;
  47. private Panel panel4;
  48. private RadioButton radioButton12;
  49. private RadioButton radioButton13;
  50. private Panel panel5;
  51. private RadioButton radioButton14;
  52. private RadioButton radioButton15;
  53. private GroupBox groupBox15;
  54. private GroupBox groupBox16;
  55. private Label label28;
  56. private Label label27;
  57. private Label label26;
  58. private NumericUpDown numericUpDown1;
  59. private ComboBox comboBox2;
  60. private Button panel6;
  61. private AppWorkspace appWorkspace;
  62. private Button button17;
  63. private Button button16;
  64. private Button button15;
  65. private Button button14;
  66. private GroupBox groupBox13;
  67. private Button button19;
  68. private Button button18;
  69. private GroupBox groupBox14;
  70. private GroupBox groupBox17;
  71. private Button button20;
  72. private Button button21;
  73. private GroupBox groupBoxCaptureSave;
  74. private GroupBox groupBox18;
  75. private Button button22;
  76. private CheckBox ckbSaveAndOpen;
  77. private CheckBox ckbSave;
  78. public GroupBox groupBox19;
  79. private Button btn_Del;
  80. private ComboBox comboBox_Name;
  81. private Label label29;
  82. private Button btn_SaveAs;
  83. private Button btn_Save;
  84. private TextBox textBox8;
  85. private TextBox textBox7;
  86. private Label label31;
  87. private Label label30;
  88. PaintDotNet.ColorsForm colorsForm;
  89. public GeneralSettingDialog(AppWorkspace appWorkspace, int status = 0)
  90. {
  91. this.appWorkspace = appWorkspace;
  92. InitializeComponent();
  93. InitializeLanguageText();
  94. BasicSettings();
  95. UserInformation();
  96. NameRules();
  97. ChooseLanguage();
  98. LeftMenu(status);
  99. PointList();
  100. CameraSettings();
  101. OrientationSetting();
  102. GuideSetting();
  103. //
  104. //画板
  105. //
  106. this.colorsForm = new ColorsForm();
  107. this.colorsForm.StartPosition = FormStartPosition.CenterScreen;
  108. this.colorsForm.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  109. }
  110. #region [左侧菜单]
  111. public void LeftMenu(int status = 0)
  112. {
  113. //
  114. // 设置Dialog属性
  115. //
  116. ShowInTaskbar = false;
  117. //
  118. // 设置listbox的集合和属性
  119. //
  120. listBox1.Items.AddRange(InvariantData.settingName);
  121. if (status == 1)
  122. {
  123. listBox1.SetSelected(2, true);
  124. }
  125. else
  126. {
  127. listBox1.SetSelected(0, true);
  128. }
  129. }
  130. #endregion
  131. #region [命名规则]
  132. public void NameRules()
  133. {
  134. //
  135. // 设置comboBox1的集合和属性
  136. //
  137. comboBox1.Items.AddRange(InvariantData.numberNum);
  138. comboBox_Name_SelectedIndex();
  139. //当前使用
  140. comboBox_Name_Refresh();
  141. #region [设置listView1]
  142. listView1.View = View.Details;
  143. listView1.Columns.Add("1", 0, HorizontalAlignment.Center);
  144. listView1.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.format.text"), 60, HorizontalAlignment.Center);
  145. listView1.Columns.Add(PdnResources.GetString("Menu.instruction.text"), 316, HorizontalAlignment.Center);
  146. listView1.BeginUpdate();
  147. var dict = InvariantData.parameterList;
  148. foreach (var s in dict)
  149. {
  150. ListViewItem lvi1 = new ListViewItem();
  151. lvi1.Text = s.Key;
  152. lvi1.SubItems.Add(s.Key);
  153. lvi1.SubItems.Add(s.Value);
  154. listView1.Items.Add(lvi1);
  155. }
  156. listView1.EndUpdate();
  157. #endregion [设置listView1]
  158. }
  159. CreateNameDialog dialog;
  160. /// <summary>
  161. /// 命名空间另存
  162. /// </summary>
  163. /// <param name="sender"></param>
  164. /// <param name="e"></param>
  165. private void btn_SaveAs_Click(object sender, EventArgs e)
  166. {
  167. dialog = new CreateNameDialog(this);
  168. dialog.Text = PdnResources.GetString("Menu.Set.Watermarksettings.Newstyle.text");
  169. dialog.StartPosition = FormStartPosition.CenterParent;
  170. dialog.ShowDialog();
  171. }
  172. public override void GetCreateName(string name)
  173. {
  174. string[] lstName = config.LstNaming.Select(a => a.name).ToArray();
  175. bool exists = ((IList)lstName).Contains(name);
  176. if (exists)
  177. {
  178. MessageBox.Show("名称重复!");
  179. return;
  180. }
  181. if (Inspect()) return;
  182. NamingMethod namingMethod = new NamingMethod();
  183. namingMethod.name = name;
  184. namingMethod.NamePrefix = textBox1.Text;
  185. namingMethod.NameFormat = textBox2.Text;
  186. namingMethod.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
  187. namingMethod.NameStatus = radioButton1.Checked == true ? 1 : 2;
  188. namingMethod.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
  189. namingMethod.CharZ1 = textBox7.Text;
  190. namingMethod.CharZ2 = textBox8.Text;
  191. config.LstNaming.Add(namingMethod);
  192. config.CurrentName = name;
  193. //string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%");
  194. //if (((IList)arrs).Contains("T1")) config.customTxt = "T1";
  195. //else if (((IList)arrs).Contains("T2")) config.customTxt = "T2";
  196. //else if (((IList)arrs).Contains("T3")) config.customTxt = "T3";
  197. //else config.customTxt = "";
  198. //config.CurrentName = name;
  199. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  200. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  201. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  202. MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  203. comboBox_Name_Refresh();
  204. if (ImageIndexDialog.imageIndexDialog != null)
  205. ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
  206. comboBox_Name_SelectedIndexChanged(null,null);
  207. dialog.Close();
  208. }
  209. private bool Inspect()
  210. {
  211. bool chek = false;
  212. //if (string.IsNullOrEmpty(textBox1.Text))
  213. //{
  214. // MessageBox.Show(PdnResources.GetString("Menu.pleasewriteNameprefix.text"));
  215. // chek = true;
  216. //}
  217. if (string.IsNullOrEmpty(textBox2.Text))
  218. {
  219. MessageBox.Show(PdnResources.GetString("Menu.pleaseNameformat.text"));
  220. chek = true;
  221. }
  222. else
  223. {
  224. string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%"/*@"(?<=\G.{2})(?!$)"*/);
  225. foreach (string text in arrs)
  226. {
  227. if (text == "") continue;
  228. //if (!text.Equals("%P") && !text.Equals("%I") && !text.Equals("%h") && !text.Equals("%m")
  229. // && !text.Equals("%s") && !text.Equals("%Y") && !text.Equals("%M") && !text.Equals("%D")
  230. // && !text.Equals("%G") && !text.Equals("%U") && !text.Equals("%T1") && !text.Equals("%T2") && !text.Equals("%T3"))
  231. if (!text.Equals("P") && !text.Equals("I") && !text.Equals("h") && !text.Equals("m")
  232. && !text.Equals("s") && !text.Equals("Y") && !text.Equals("M") && !text.Equals("D")
  233. && !text.Equals("G") && !text.Equals("U") && !text.Equals("N") && !text.Equals("E")
  234. && !text.Equals("T1") && !text.Equals("T2") && !text.Equals("T3")
  235. && !text.Equals("Z1") && !text.Equals("Z2"))
  236. {
  237. MessageBox.Show("名称格式不合法, 请检查");
  238. chek = true;
  239. }
  240. }
  241. if (Islegal())
  242. {
  243. MessageBox.Show("文件名称中不能包含 \\ / : * ? \" < > | ");
  244. chek = true;
  245. }
  246. }
  247. if (radioButton1.Checked && !(Regex.IsMatch(textBox3.Text, pattern)))
  248. {
  249. MessageBox.Show(PdnResources.GetString("Menu.Numberscanbeentet.text") + "!");
  250. chek = true;
  251. }
  252. return chek;
  253. }
  254. /// <summary>
  255. /// 刷新名称
  256. /// </summary>
  257. private void comboBox_Name_Refresh()
  258. {
  259. this.comboBox_Name.SelectedIndexChanged -= new System.EventHandler(this.comboBox_Name_SelectedIndexChanged);
  260. string[] lstName = config.LstNaming.Select(a => a.name).ToArray();
  261. this.comboBox_Name.DataSource = lstName;
  262. this.comboBox_Name.Text = config.CurrentName;
  263. this.comboBox_Name.SelectedIndexChanged += new System.EventHandler(this.comboBox_Name_SelectedIndexChanged);
  264. }
  265. /// <summary>
  266. /// 条目选择后刷新
  267. /// </summary>
  268. private void comboBox_Name_SelectedIndex()
  269. {
  270. string CurrentName = config.CurrentName;
  271. if (config.LstNaming.Count > 0)
  272. {
  273. foreach (NamingMethod item in config.LstNaming)
  274. {
  275. if (CurrentName.Equals(item.name))
  276. {
  277. textBox1.Text = item.NamePrefix;
  278. textBox1.MaxLength = 20;
  279. textBox2.Text = item.NameFormat;
  280. //radioButton1.Checked = config.NameStatus == 1 ? true : false;
  281. //radioButton2.Checked = config.NameStatus == 2 ? true : false;
  282. radioButton1.Checked = true;
  283. radioButton2.Checked = false;
  284. textBox3.Text = item.ContinueNum.ToString();
  285. comboBox1.SelectedIndex = item.NumberNum - 1;
  286. textBox7.Text = item.CharZ1;
  287. textBox8.Text = item.CharZ2;
  288. config.NamePrefix = item.NamePrefix;
  289. config.NameFormat = item.NameFormat;
  290. config.NumberNum = item.NumberNum;
  291. config.NameStatus = item.NameStatus;
  292. config.ContinueNum = item.ContinueNum;
  293. config.CharZ1 = item.CharZ1;
  294. config.CharZ2 = item.CharZ2;
  295. }
  296. }
  297. }
  298. else
  299. {
  300. NamingMethod namingMethod = new NamingMethod();
  301. namingMethod.name = "default";
  302. namingMethod.NamePrefix = config.NamePrefix;
  303. namingMethod.NameFormat = config.NameFormat;
  304. namingMethod.NumberNum = config.NumberNum;
  305. namingMethod.NameStatus = config.NameStatus;
  306. namingMethod.ContinueNum = config.ContinueNum;
  307. namingMethod.CharZ1 = config.CharZ1;
  308. namingMethod.CharZ2 = config.CharZ2;
  309. config.LstNaming.Add(namingMethod);
  310. config.CurrentName = "default";
  311. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  312. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  313. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  314. MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  315. comboBox_Name_Refresh();
  316. comboBox_Name_SelectedIndex();
  317. }
  318. }
  319. /// <summary>
  320. /// 条目选择
  321. /// </summary>
  322. /// <param name="sender"></param>
  323. /// <param name="e"></param>
  324. private void comboBox_Name_SelectedIndexChanged(object sender, EventArgs e)
  325. {
  326. config.CurrentName = this.comboBox_Name.Text.Trim();
  327. comboBox_Name_SelectedIndex();
  328. if (Inspect()) return;
  329. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  330. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  331. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  332. MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  333. if (ImageIndexDialog.imageIndexDialog != null)
  334. ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
  335. }
  336. /// <summary>
  337. /// 删除
  338. /// </summary>
  339. /// <param name="sender"></param>
  340. /// <param name="e"></param>
  341. private void btn_Del_Click(object sender, EventArgs e)
  342. {
  343. DialogResult dr = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretcteddata.text") + "?", PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
  344. if (dr == DialogResult.Cancel) return;
  345. if (this.comboBox_Name.Text.Trim() != "")
  346. {
  347. if (config.LstNaming.Count > 1)
  348. {
  349. foreach (NamingMethod item in config.LstNaming)
  350. {
  351. if (this.comboBox_Name.Text.Trim().Equals(item.name))
  352. {
  353. config.LstNaming.Remove(item);
  354. break;
  355. }
  356. }
  357. }
  358. else
  359. {
  360. MessageBox.Show("只有一条数据,不可删除!");
  361. return;
  362. }
  363. if (config.LstNaming.Count > 0)
  364. {
  365. config.CurrentName = config.LstNaming[0].name;
  366. comboBox_Name_Refresh();
  367. }
  368. else
  369. {
  370. comboBox_Name_Refresh();
  371. config.CurrentName = "";
  372. }
  373. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  374. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  375. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  376. MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  377. if (ImageIndexDialog.imageIndexDialog != null)
  378. ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
  379. }
  380. }
  381. /// <summary>
  382. /// 保存
  383. /// </summary>
  384. /// <param name="sender"></param>
  385. /// <param name="e"></param>
  386. private void btn_Save_Click(object sender, EventArgs e)
  387. {
  388. if (Inspect()) return;
  389. string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%");
  390. string CurrentName = this.comboBox_Name.Text.Trim();
  391. NamingMethod namingMethod = new NamingMethod();
  392. namingMethod.name = CurrentName;
  393. namingMethod.NamePrefix = textBox1.Text;
  394. namingMethod.NameFormat = textBox2.Text;
  395. namingMethod.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
  396. namingMethod.NameStatus = radioButton1.Checked == true ? 1 : 2;
  397. namingMethod.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
  398. namingMethod.CharZ1 = textBox7.Text;
  399. namingMethod.CharZ2 = textBox8.Text;
  400. bool save = false;
  401. if (config.LstNaming.Count > 0)
  402. {
  403. for (int i = 0; i < config.LstNaming.Count; i++)
  404. {
  405. if (CurrentName.Equals(config.LstNaming[i].name))
  406. {
  407. config.LstNaming[i] = namingMethod;
  408. save = true;
  409. break;
  410. }
  411. }
  412. if (save)
  413. {
  414. if (((IList)arrs).Contains("T1")) config.customTxt = "T1";
  415. else if (((IList)arrs).Contains("T2")) config.customTxt = "T2";
  416. else if (((IList)arrs).Contains("T3")) config.customTxt = "T3";
  417. else config.customTxt = "";
  418. config.NamePrefix = textBox1.Text;
  419. config.NameFormat = textBox2.Text;
  420. config.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
  421. config.NameStatus = radioButton1.Checked == true ? 1 : 2;
  422. config.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
  423. config.CharZ1 = textBox7.Text;
  424. config.CharZ2 = textBox8.Text;
  425. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  426. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  427. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  428. MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  429. Startup.instance.configModel = config;
  430. }
  431. if (ImageIndexDialog.imageIndexDialog != null)
  432. ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
  433. }
  434. else
  435. {
  436. this.btn_SaveAs.PerformClick();
  437. }
  438. }
  439. //是否符合window命名规则不
  440. public bool Islegal()
  441. {
  442. //Regex regExp = new Regex("[\\/:*?\"<>|]");
  443. //bool isLegal = regExp.IsMatch(textBox7.Text.Trim()) || regExp.IsMatch(textBox8.Text.Trim());
  444. //return isLegal;
  445. char[] charstr = { '\\', '/', ':', '*', '?', '"', '<', '>', '|'};
  446. char[] textstr = (textBox7.Text.Trim()+ textBox8.Text.Trim()).ToString().Trim().ToCharArray();
  447. int count = 0;/*统计非法字符的个数*/
  448. for (int i = 0; i < charstr.Length; i++)
  449. {
  450. for (int j = 0; j < textstr.Length; j++)
  451. {
  452. if (charstr[i] == textstr[j])
  453. {
  454. count++;
  455. }
  456. }
  457. }
  458. if (count > 0)
  459. return true;
  460. else
  461. return false;
  462. }
  463. #endregion
  464. #region [点距列表]
  465. public void PointList()
  466. {
  467. listView2.View = View.Details;
  468. listView2.Columns.Add("0", 0, HorizontalAlignment.Center);
  469. listView2.Columns.Add(PdnResources.GetString("Menu.LabelAction.MarkAction.Text"), 60, HorizontalAlignment.Center);
  470. listView2.Columns.Add(PdnResources.GetString("Menu.sizeed.text"), 120, HorizontalAlignment.Center);
  471. listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Maximum(pixels).text"), 120, HorizontalAlignment.Center);
  472. listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.dotspacing(mm).text"), 120, HorizontalAlignment.Center);
  473. listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Screenwidth(mm).text"), 120, HorizontalAlignment.Center);
  474. var screenList = mic_screen_rules_BLL.FindAll();
  475. var screenRulesId = config.DotPitchId;
  476. listView2.BeginUpdate();
  477. foreach (var s in screenList)
  478. {
  479. var lv = new ListViewItem();
  480. lv.Text = "1";
  481. lv.SubItems.Add(screenRulesId == s.id ? "√" : "×");
  482. lv.SubItems.Add(s.size);
  483. lv.SubItems.Add(s.max_resolution);
  484. lv.SubItems.Add(s.point_pitch);
  485. lv.SubItems.Add(s.screen_width);
  486. lv.SubItems.Add(s.id.ToString());
  487. listView2.Items.Add(lv);
  488. }
  489. if (listView2.Items.Count > 0)
  490. {
  491. listView2.Items[0].Selected = true;
  492. listView2.Select();
  493. }
  494. listView2.EndUpdate();
  495. }
  496. #endregion
  497. #region [语言内容]
  498. public void ChooseLanguage()
  499. {
  500. radioButton3.Checked = config.Language == 1 ? true : false;
  501. radioButton4.Checked = config.Language == 3 ? true : false;
  502. radioButton5.Checked = config.Language == 2 ? true : false;
  503. }
  504. #endregion
  505. #region [控件相关]
  506. public GroupBox groupBox1;
  507. public GroupBox groupBox2;
  508. private Button button1;
  509. private Button button2;
  510. private ListBox listBox1;
  511. private GroupBox groupBox3;
  512. private GroupBox groupBox4;
  513. private TextBox textBox_Email;
  514. private TextBox textBox_Phone;
  515. private TextBox textBox_Contact;
  516. private TextBox textBox_Address;
  517. private TextBox textBox_City;
  518. private TextBox textBox_Province;
  519. private TextBox textBox_CompanyName;
  520. private Label label1;
  521. private TextBox textBox_Interface;
  522. private TextBox textBox_Camera;
  523. private TextBox textBox_SN;
  524. private TextBox textBox_Model;
  525. private Label label2;
  526. private Label label3;
  527. private Label label4;
  528. private Label label5;
  529. private Label label6;
  530. private Label label7;
  531. private Label label8;
  532. private Label label9;
  533. private Label label10;
  534. private Label label11;
  535. private Label label12;
  536. public GroupBox groupBox5;
  537. private GroupBox groupBox6;
  538. private GroupBox groupBox7;
  539. private GroupBox groupBox8;
  540. private GroupBox groupBox9;
  541. private GroupBox groupBox11;
  542. private Label label13;
  543. private TextBox textBox1;
  544. private TextBox textBox2;
  545. private Label label14;
  546. private Label label15;
  547. private ComboBox comboBox1;
  548. private RadioButton radioButton1;
  549. private RadioButton radioButton2;
  550. private TextBox textBox3;
  551. private ListView listView1;
  552. private RadioButton radioButton3;
  553. private Label label16;
  554. private RadioButton radioButton5;
  555. private RadioButton radioButton4;
  556. private CheckBox checkBox6;
  557. private CheckBox checkBox5;
  558. private CheckBox checkBox4;
  559. private CheckBox checkBox3;
  560. private CheckBox checkBox2;
  561. private CheckBox checkBox1;
  562. private Label label17;
  563. private ListView listView2;
  564. private GroupBox groupBox12;
  565. private Button button5;
  566. private Button button4;
  567. private Button button3;
  568. private CheckBox checkBox7;
  569. private CheckBox checkBox9;
  570. private CheckBox checkBox8;
  571. private PictureBox pictureBox1;
  572. private Button button10;
  573. private Button button9;
  574. private Button button11;
  575. private PictureBox pictureBox2;
  576. private Button button12;
  577. private Button button13;
  578. private void InitializeLanguageText()
  579. {
  580. this.groupBox1.Text = PdnResources.GetString("Menu.Type.text");
  581. this.groupBox8.Text = PdnResources.GetString("Menu.information.text");
  582. this.radioButton5.Text = PdnResources.GetString("Menu.Set.Generalsettings.English.text");
  583. this.radioButton4.Text = PdnResources.GetString("Menu.Set.Generalsettings.German.text");
  584. this.label16.Text = PdnResources.GetString("Menu.Set.Generalsettings.Switchlanguage.text") + ":";
  585. this.radioButton3.Text = PdnResources.GetString("Menu.Set.Generalsettings.Chinese.text");
  586. this.groupBox7.Text = PdnResources.GetString("Menu.information.text");
  587. this.label17.Text = PdnResources.GetString("Menu.Set.Generalsettings.Note:Maklizing.text");
  588. this.checkBox6.Text = PdnResources.GetString("Menu.Set.Geneings.Note:Maklizing.text");
  589. this.checkBox5.Text = PdnResources.GetString("Menu.Set.Generalsettings.toolbarinit.text");
  590. this.checkBox4.Text = PdnResources.GetString("Menu.shortcutbarfunctioninit.text");
  591. this.checkBox3.Text = PdnResources.GetString("Menu.Set.Generalsettings.loginformationinit.text");
  592. this.checkBox2.Text = PdnResources.GetString("Menu.Set.Generalsettings.Measurementinfotioninit.text");
  593. this.checkBox1.Text = PdnResources.GetString("Menu.Set.Generalsettings.Annotatitioninit.text");
  594. this.groupBox10.Text = PdnResources.GetString("Menu.Set.Generalsettings.Thearchivefilesavesthepath.text");
  595. this.button8.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
  596. this.button7.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
  597. this.button6.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
  598. this.label20.Text = PdnResources.GetString("Menu.DedicatedAnalysis.Text") + ":";
  599. this.label19.Text = PdnResources.GetString("Menu.GeneralAnalysis.Text") + ":";
  600. this.label18.Text = PdnResources.GetString("Menu.Normaloperation.text") + ":";
  601. this.groupBox6.Text = PdnResources.GetString("Menu.Set.Generalsettings.dotspacinglist.text");
  602. this.groupBox9.Text = PdnResources.GetString("Menu.Set.Generalsettings.Startimage.text");
  603. this.button10.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
  604. this.checkBox7.Text = PdnResources.GetString("Menu.Set.Generalsettings.Startimage.text") + ":";
  605. this.groupBox2.Text = PdnResources.GetString("Menu.operation.text");
  606. this.button2.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
  607. this.button1.Text = PdnResources.GetString("Menu.application.text");
  608. this.groupBox12.Text = PdnResources.GetString("Menu.operation.text");
  609. this.button13.Text = PdnResources.GetString("Menu.application.text");
  610. this.button5.Text = PdnResources.GetString("Menu.Edit.Text");
  611. this.button4.Text = PdnResources.GetString("Menu.New.text");
  612. this.button3.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
  613. this.groupBox3.Text = PdnResources.GetString("Menu.UserInfo.text");
  614. this.button12.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
  615. this.label7.Text = PdnResources.GetString("Menu.Set.Generalsettings.mail.text") + ":";
  616. this.label6.Text = PdnResources.GetString("Menu.Set.Generalsettings.phone.text") + ":";
  617. this.label5.Text = PdnResources.GetString("Menu.Contactperson.text") + ":";
  618. this.label4.Text = PdnResources.GetString("Menu.Set.Generalsettings.address.text") + ":";
  619. this.label3.Text = PdnResources.GetString("Menu.Set.Generalsettings.city.text") + ":";
  620. this.label2.Text = PdnResources.GetString("Menu.Set.Generalsettings.province.text") + ":";
  621. this.label1.Text = PdnResources.GetString("Menu.Set.Generalsettings.unitname.text") + ":";
  622. this.groupBox5.Text = PdnResources.GetString("Menu.information.text");
  623. this.radioButton2.Text = PdnResources.GetString("Menu.reinformation.text");
  624. this.radioButton1.Text = PdnResources.GetString("Menu.Set.Generalsettings.continue.text");
  625. this.label15.Text = PdnResources.GetString("Menu.Set.Generalsettings.Numericaldigits.text") + ":";
  626. this.label14.Text = PdnResources.GetString("Menu.Set.Generalsettings.Nameformat.text") + ":";
  627. this.label13.Text = PdnResources.GetString("Menu.LabelAction.DrawTextString.Text") + ":";
  628. this.groupBox4.Text = PdnResources.GetString("Menu.Set.Generalsettings.Microsmation.text");
  629. this.label12.Text = PdnResources.GetString("Menu.interface.text") + ":";
  630. this.label11.Text = PdnResources.GetString("Menu.thecamera.text") + ":";
  631. this.label10.Text = PdnResources.GetString("Menu.Set.Generalsettings.SNcode.text") + ":";
  632. this.label9.Text = PdnResources.GetString("Menu.model.text") + ":";
  633. this.groupBox11.Text = PdnResources.GetString("Menu.other.text");
  634. this.checkBox9.Text = PdnResources.GetString("Menu.Set.Generalsettings.autoaddAxioVisionruler.text");
  635. this.checkBox8.Text = PdnResources.GetString("Menu.Set.Generalsettings.autoaddZENruler.text");
  636. this.groupBox13.Text = PdnResources.GetString("Menu.operation.text");
  637. this.button14.Text = PdnResources.GetString("Menu.application.text");
  638. this.button15.Text = PdnResources.GetString("Menu.Edit.Text");
  639. this.button16.Text = PdnResources.GetString("Menu.New.text");
  640. this.button17.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
  641. this.groupBox14.Text = PdnResources.GetString("Menu.operation.text");
  642. this.button18.Text = PdnResources.GetString("Menu.application.text");
  643. this.button19.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
  644. this.groupBox15.Text = PdnResources.GetString("Menu.Directionsetting.text");
  645. this.radioButton14.Text = PdnResources.GetString("Menu.positive.text");
  646. this.radioButton15.Text = PdnResources.GetString("Menu.negation.text");
  647. this.radioButton12.Text = PdnResources.GetString("Menu.positive.text");
  648. this.radioButton13.Text = PdnResources.GetString("Menu.negation.text");
  649. this.radioButton10.Text = PdnResources.GetString("Menu.positive.text");
  650. this.radioButton11.Text = PdnResources.GetString("Menu.negation.text");
  651. this.radioButton8.Text = PdnResources.GetString("Menu.positive.text");
  652. this.radioButton9.Text = PdnResources.GetString("Menu.negation.text");
  653. this.radioButton7.Text = PdnResources.GetString("Menu.Set.Generalsettings.under.text");
  654. this.radioButton6.Text = PdnResources.GetString("Menu.Set.Generalsettings.up.text");
  655. this.label25.Text = PdnResources.GetString("Menu.Set.Generalsettings.Xaxismovementdirection.text") + ":" + PdnResources.GetString("Menu.Set.Generalsettings.left.text");
  656. this.label24.Text = PdnResources.GetString("Menu.Set.Generalsettings.right.text");
  657. this.label23.Text = PdnResources.GetString("Menu.Set.Generalsettings.right.text");
  658. this.label22.Text = PdnResources.GetString("Menu.Set.Generalsettings.Yaxismovementdirection.text") + ":" + PdnResources.GetString("Menu.Set.Generalsettings.left.text");
  659. this.label21.Text = PdnResources.GetString("Menu.Set.Generalsettings.Zaxismovementdirection.text") + ":";
  660. this.Text = PdnResources.GetString("Menu.Setting.GeneralSetting.Text");
  661. this.label26.Text = PdnResources.GetString("Menu.Linestyle.Text") + ":";
  662. this.label27.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linecolor.text") + ":";
  663. this.label28.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linewidth.text") + ":";
  664. this.groupBox16.Text = PdnResources.GetString("Menu.Auxiliarylinesettings.text");
  665. this.button20.Text = PdnResources.GetString("Menu.application.text");
  666. this.button21.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
  667. this.groupBox17.Text = PdnResources.GetString("Menu.operation.text");
  668. }
  669. private void InitializeComponent()
  670. {
  671. this.groupBox1 = new System.Windows.Forms.GroupBox();
  672. this.listBox1 = new System.Windows.Forms.ListBox();
  673. this.groupBox8 = new System.Windows.Forms.GroupBox();
  674. this.radioButton5 = new System.Windows.Forms.RadioButton();
  675. this.radioButton4 = new System.Windows.Forms.RadioButton();
  676. this.label16 = new System.Windows.Forms.Label();
  677. this.radioButton3 = new System.Windows.Forms.RadioButton();
  678. this.groupBox7 = new System.Windows.Forms.GroupBox();
  679. this.label17 = new System.Windows.Forms.Label();
  680. this.checkBox6 = new System.Windows.Forms.CheckBox();
  681. this.checkBox5 = new System.Windows.Forms.CheckBox();
  682. this.checkBox4 = new System.Windows.Forms.CheckBox();
  683. this.checkBox3 = new System.Windows.Forms.CheckBox();
  684. this.checkBox2 = new System.Windows.Forms.CheckBox();
  685. this.checkBox1 = new System.Windows.Forms.CheckBox();
  686. this.groupBoxCaptureSave = new System.Windows.Forms.GroupBox();
  687. this.ckbSaveAndOpen = new System.Windows.Forms.CheckBox();
  688. this.ckbSave = new System.Windows.Forms.CheckBox();
  689. this.groupBox10 = new System.Windows.Forms.GroupBox();
  690. this.button8 = new System.Windows.Forms.Button();
  691. this.textBox6 = new System.Windows.Forms.TextBox();
  692. this.button7 = new System.Windows.Forms.Button();
  693. this.textBox5 = new System.Windows.Forms.TextBox();
  694. this.button6 = new System.Windows.Forms.Button();
  695. this.textBox4 = new System.Windows.Forms.TextBox();
  696. this.label20 = new System.Windows.Forms.Label();
  697. this.label19 = new System.Windows.Forms.Label();
  698. this.label18 = new System.Windows.Forms.Label();
  699. this.groupBox6 = new System.Windows.Forms.GroupBox();
  700. this.listView2 = new System.Windows.Forms.ListView();
  701. this.groupBox9 = new System.Windows.Forms.GroupBox();
  702. this.button10 = new System.Windows.Forms.Button();
  703. this.button9 = new System.Windows.Forms.Button();
  704. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  705. this.checkBox7 = new System.Windows.Forms.CheckBox();
  706. this.groupBox2 = new System.Windows.Forms.GroupBox();
  707. this.btn_SaveAs = new System.Windows.Forms.Button();
  708. this.btn_Save = new System.Windows.Forms.Button();
  709. this.button2 = new System.Windows.Forms.Button();
  710. this.button1 = new System.Windows.Forms.Button();
  711. this.groupBox12 = new System.Windows.Forms.GroupBox();
  712. this.button13 = new System.Windows.Forms.Button();
  713. this.button5 = new System.Windows.Forms.Button();
  714. this.button4 = new System.Windows.Forms.Button();
  715. this.button3 = new System.Windows.Forms.Button();
  716. this.groupBox3 = new System.Windows.Forms.GroupBox();
  717. this.pictureBox2 = new System.Windows.Forms.PictureBox();
  718. this.button12 = new System.Windows.Forms.Button();
  719. this.button11 = new System.Windows.Forms.Button();
  720. this.label8 = new System.Windows.Forms.Label();
  721. this.label7 = new System.Windows.Forms.Label();
  722. this.label6 = new System.Windows.Forms.Label();
  723. this.label5 = new System.Windows.Forms.Label();
  724. this.label4 = new System.Windows.Forms.Label();
  725. this.label3 = new System.Windows.Forms.Label();
  726. this.label2 = new System.Windows.Forms.Label();
  727. this.textBox_Email = new System.Windows.Forms.TextBox();
  728. this.textBox_Phone = new System.Windows.Forms.TextBox();
  729. this.textBox_Contact = new System.Windows.Forms.TextBox();
  730. this.textBox_Address = new System.Windows.Forms.TextBox();
  731. this.textBox_City = new System.Windows.Forms.TextBox();
  732. this.textBox_Province = new System.Windows.Forms.TextBox();
  733. this.textBox_CompanyName = new System.Windows.Forms.TextBox();
  734. this.label1 = new System.Windows.Forms.Label();
  735. this.groupBox5 = new System.Windows.Forms.GroupBox();
  736. this.radioButton2 = new System.Windows.Forms.RadioButton();
  737. this.textBox3 = new System.Windows.Forms.TextBox();
  738. this.radioButton1 = new System.Windows.Forms.RadioButton();
  739. this.comboBox1 = new System.Windows.Forms.ComboBox();
  740. this.label15 = new System.Windows.Forms.Label();
  741. this.textBox2 = new System.Windows.Forms.TextBox();
  742. this.label14 = new System.Windows.Forms.Label();
  743. this.textBox1 = new System.Windows.Forms.TextBox();
  744. this.label13 = new System.Windows.Forms.Label();
  745. this.listView1 = new System.Windows.Forms.ListView();
  746. this.groupBox4 = new System.Windows.Forms.GroupBox();
  747. this.label12 = new System.Windows.Forms.Label();
  748. this.label11 = new System.Windows.Forms.Label();
  749. this.label10 = new System.Windows.Forms.Label();
  750. this.label9 = new System.Windows.Forms.Label();
  751. this.textBox_Interface = new System.Windows.Forms.TextBox();
  752. this.textBox_Camera = new System.Windows.Forms.TextBox();
  753. this.textBox_SN = new System.Windows.Forms.TextBox();
  754. this.textBox_Model = new System.Windows.Forms.TextBox();
  755. this.groupBox11 = new System.Windows.Forms.GroupBox();
  756. this.checkBox9 = new System.Windows.Forms.CheckBox();
  757. this.checkBox8 = new System.Windows.Forms.CheckBox();
  758. this.listView3 = new System.Windows.Forms.ListView();
  759. this.label21 = new System.Windows.Forms.Label();
  760. this.label22 = new System.Windows.Forms.Label();
  761. this.label23 = new System.Windows.Forms.Label();
  762. this.label24 = new System.Windows.Forms.Label();
  763. this.label25 = new System.Windows.Forms.Label();
  764. this.panel1 = new System.Windows.Forms.Panel();
  765. this.radioButton7 = new System.Windows.Forms.RadioButton();
  766. this.radioButton6 = new System.Windows.Forms.RadioButton();
  767. this.panel2 = new System.Windows.Forms.Panel();
  768. this.radioButton8 = new System.Windows.Forms.RadioButton();
  769. this.radioButton9 = new System.Windows.Forms.RadioButton();
  770. this.panel3 = new System.Windows.Forms.Panel();
  771. this.radioButton10 = new System.Windows.Forms.RadioButton();
  772. this.radioButton11 = new System.Windows.Forms.RadioButton();
  773. this.panel4 = new System.Windows.Forms.Panel();
  774. this.radioButton12 = new System.Windows.Forms.RadioButton();
  775. this.radioButton13 = new System.Windows.Forms.RadioButton();
  776. this.panel5 = new System.Windows.Forms.Panel();
  777. this.radioButton14 = new System.Windows.Forms.RadioButton();
  778. this.radioButton15 = new System.Windows.Forms.RadioButton();
  779. this.groupBox15 = new System.Windows.Forms.GroupBox();
  780. this.groupBox16 = new System.Windows.Forms.GroupBox();
  781. this.panel6 = new System.Windows.Forms.Button();
  782. this.label28 = new System.Windows.Forms.Label();
  783. this.label27 = new System.Windows.Forms.Label();
  784. this.label26 = new System.Windows.Forms.Label();
  785. this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
  786. this.comboBox2 = new System.Windows.Forms.ComboBox();
  787. this.button17 = new System.Windows.Forms.Button();
  788. this.button16 = new System.Windows.Forms.Button();
  789. this.button15 = new System.Windows.Forms.Button();
  790. this.button14 = new System.Windows.Forms.Button();
  791. this.groupBox13 = new System.Windows.Forms.GroupBox();
  792. this.button19 = new System.Windows.Forms.Button();
  793. this.button18 = new System.Windows.Forms.Button();
  794. this.groupBox14 = new System.Windows.Forms.GroupBox();
  795. this.groupBox17 = new System.Windows.Forms.GroupBox();
  796. this.button20 = new System.Windows.Forms.Button();
  797. this.button21 = new System.Windows.Forms.Button();
  798. this.groupBox18 = new System.Windows.Forms.GroupBox();
  799. this.button22 = new System.Windows.Forms.Button();
  800. this.groupBox19 = new System.Windows.Forms.GroupBox();
  801. this.btn_Del = new System.Windows.Forms.Button();
  802. this.comboBox_Name = new System.Windows.Forms.ComboBox();
  803. this.label29 = new System.Windows.Forms.Label();
  804. this.label30 = new System.Windows.Forms.Label();
  805. this.label31 = new System.Windows.Forms.Label();
  806. this.textBox7 = new System.Windows.Forms.TextBox();
  807. this.textBox8 = new System.Windows.Forms.TextBox();
  808. this.groupBox1.SuspendLayout();
  809. this.groupBox8.SuspendLayout();
  810. this.groupBox7.SuspendLayout();
  811. this.groupBoxCaptureSave.SuspendLayout();
  812. this.groupBox10.SuspendLayout();
  813. this.groupBox6.SuspendLayout();
  814. this.groupBox9.SuspendLayout();
  815. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
  816. this.groupBox2.SuspendLayout();
  817. this.groupBox12.SuspendLayout();
  818. this.groupBox3.SuspendLayout();
  819. ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
  820. this.groupBox5.SuspendLayout();
  821. this.groupBox4.SuspendLayout();
  822. this.groupBox11.SuspendLayout();
  823. this.panel1.SuspendLayout();
  824. this.panel2.SuspendLayout();
  825. this.panel3.SuspendLayout();
  826. this.panel4.SuspendLayout();
  827. this.panel5.SuspendLayout();
  828. this.groupBox15.SuspendLayout();
  829. this.groupBox16.SuspendLayout();
  830. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
  831. this.groupBox13.SuspendLayout();
  832. this.groupBox14.SuspendLayout();
  833. this.groupBox17.SuspendLayout();
  834. this.groupBox18.SuspendLayout();
  835. this.groupBox19.SuspendLayout();
  836. this.SuspendLayout();
  837. //
  838. // groupBox1
  839. //
  840. this.groupBox1.Controls.Add(this.listBox1);
  841. this.groupBox1.Location = new System.Drawing.Point(6, 13);
  842. this.groupBox1.Name = "groupBox1";
  843. this.groupBox1.Size = new System.Drawing.Size(105, 531);
  844. this.groupBox1.TabIndex = 1;
  845. this.groupBox1.TabStop = false;
  846. this.groupBox1.Text = "类型";
  847. //
  848. // listBox1
  849. //
  850. this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
  851. this.listBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
  852. this.listBox1.FormattingEnabled = true;
  853. this.listBox1.ItemHeight = 30;
  854. this.listBox1.Location = new System.Drawing.Point(3, 17);
  855. this.listBox1.Name = "listBox1";
  856. this.listBox1.Size = new System.Drawing.Size(99, 511);
  857. this.listBox1.TabIndex = 0;
  858. this.listBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
  859. this.listBox1.SelectedValueChanged += new System.EventHandler(this.listBox1_SelectedValueChanged);
  860. //
  861. // groupBox8
  862. //
  863. this.groupBox8.Controls.Add(this.radioButton5);
  864. this.groupBox8.Controls.Add(this.radioButton4);
  865. this.groupBox8.Controls.Add(this.label16);
  866. this.groupBox8.Controls.Add(this.radioButton3);
  867. this.groupBox8.Location = new System.Drawing.Point(117, 74);
  868. this.groupBox8.Name = "groupBox8";
  869. this.groupBox8.Size = new System.Drawing.Size(394, 470);
  870. this.groupBox8.TabIndex = 38;
  871. this.groupBox8.TabStop = false;
  872. this.groupBox8.Text = "信息";
  873. //
  874. // radioButton5
  875. //
  876. this.radioButton5.AutoSize = true;
  877. this.radioButton5.Location = new System.Drawing.Point(130, 66);
  878. this.radioButton5.Name = "radioButton5";
  879. this.radioButton5.Size = new System.Drawing.Size(47, 16);
  880. this.radioButton5.TabIndex = 8;
  881. this.radioButton5.TabStop = true;
  882. this.radioButton5.Text = "英文";
  883. this.radioButton5.UseVisualStyleBackColor = true;
  884. //
  885. // radioButton4
  886. //
  887. this.radioButton4.AutoSize = true;
  888. this.radioButton4.Location = new System.Drawing.Point(130, 98);
  889. this.radioButton4.Name = "radioButton4";
  890. this.radioButton4.Size = new System.Drawing.Size(47, 16);
  891. this.radioButton4.TabIndex = 7;
  892. this.radioButton4.TabStop = true;
  893. this.radioButton4.Text = "德文";
  894. this.radioButton4.UseVisualStyleBackColor = true;
  895. //
  896. // label16
  897. //
  898. this.label16.AutoSize = true;
  899. this.label16.Location = new System.Drawing.Point(17, 34);
  900. this.label16.Name = "label16";
  901. this.label16.Size = new System.Drawing.Size(65, 12);
  902. this.label16.TabIndex = 6;
  903. this.label16.Text = "切换语言:";
  904. //
  905. // radioButton3
  906. //
  907. this.radioButton3.AutoSize = true;
  908. this.radioButton3.Location = new System.Drawing.Point(130, 32);
  909. this.radioButton3.Name = "radioButton3";
  910. this.radioButton3.Size = new System.Drawing.Size(47, 16);
  911. this.radioButton3.TabIndex = 0;
  912. this.radioButton3.TabStop = true;
  913. this.radioButton3.Text = "中文";
  914. this.radioButton3.UseVisualStyleBackColor = true;
  915. //
  916. // groupBox7
  917. //
  918. this.groupBox7.Controls.Add(this.label17);
  919. this.groupBox7.Controls.Add(this.checkBox6);
  920. this.groupBox7.Controls.Add(this.checkBox5);
  921. this.groupBox7.Controls.Add(this.checkBox4);
  922. this.groupBox7.Controls.Add(this.checkBox3);
  923. this.groupBox7.Controls.Add(this.checkBox2);
  924. this.groupBox7.Controls.Add(this.checkBox1);
  925. this.groupBox7.Location = new System.Drawing.Point(117, 74);
  926. this.groupBox7.Name = "groupBox7";
  927. this.groupBox7.Size = new System.Drawing.Size(394, 470);
  928. this.groupBox7.TabIndex = 20;
  929. this.groupBox7.TabStop = false;
  930. this.groupBox7.Text = "信息";
  931. //
  932. // label17
  933. //
  934. this.label17.AutoSize = true;
  935. this.label17.ForeColor = System.Drawing.Color.Red;
  936. this.label17.Location = new System.Drawing.Point(15, 226);
  937. this.label17.Name = "label17";
  938. this.label17.Size = new System.Drawing.Size(269, 12);
  939. this.label17.TabIndex = 16;
  940. this.label17.Text = "注意:进行初始化前,请确保软件打开窗口均关闭";
  941. //
  942. // checkBox6
  943. //
  944. this.checkBox6.AutoSize = true;
  945. this.checkBox6.Location = new System.Drawing.Point(17, 194);
  946. this.checkBox6.Name = "checkBox6";
  947. this.checkBox6.Size = new System.Drawing.Size(120, 16);
  948. this.checkBox6.TabIndex = 16;
  949. this.checkBox6.Text = "快捷键功能初始化";
  950. this.checkBox6.UseVisualStyleBackColor = true;
  951. //
  952. // checkBox5
  953. //
  954. this.checkBox5.AutoSize = true;
  955. this.checkBox5.Location = new System.Drawing.Point(17, 162);
  956. this.checkBox5.Name = "checkBox5";
  957. this.checkBox5.Size = new System.Drawing.Size(96, 16);
  958. this.checkBox5.TabIndex = 16;
  959. this.checkBox5.Text = "工具栏初始化";
  960. this.checkBox5.UseVisualStyleBackColor = true;
  961. //
  962. // checkBox4
  963. //
  964. this.checkBox4.AutoSize = true;
  965. this.checkBox4.Location = new System.Drawing.Point(17, 130);
  966. this.checkBox4.Name = "checkBox4";
  967. this.checkBox4.Size = new System.Drawing.Size(120, 16);
  968. this.checkBox4.TabIndex = 16;
  969. this.checkBox4.Text = "快捷栏功能初始化";
  970. this.checkBox4.UseVisualStyleBackColor = true;
  971. //
  972. // checkBox3
  973. //
  974. this.checkBox3.AutoSize = true;
  975. this.checkBox3.Location = new System.Drawing.Point(17, 98);
  976. this.checkBox3.Name = "checkBox3";
  977. this.checkBox3.Size = new System.Drawing.Size(102, 16);
  978. this.checkBox3.TabIndex = 16;
  979. this.checkBox3.Text = "log信息初始化";
  980. this.checkBox3.UseVisualStyleBackColor = true;
  981. //
  982. // checkBox2
  983. //
  984. this.checkBox2.AutoSize = true;
  985. this.checkBox2.Location = new System.Drawing.Point(17, 66);
  986. this.checkBox2.Name = "checkBox2";
  987. this.checkBox2.Size = new System.Drawing.Size(132, 16);
  988. this.checkBox2.TabIndex = 16;
  989. this.checkBox2.Text = "测量信息配置初始化";
  990. this.checkBox2.UseVisualStyleBackColor = true;
  991. //
  992. // checkBox1
  993. //
  994. this.checkBox1.AutoSize = true;
  995. this.checkBox1.Location = new System.Drawing.Point(17, 34);
  996. this.checkBox1.Name = "checkBox1";
  997. this.checkBox1.Size = new System.Drawing.Size(132, 16);
  998. this.checkBox1.TabIndex = 16;
  999. this.checkBox1.Text = "标注信息配置初始化";
  1000. this.checkBox1.UseVisualStyleBackColor = true;
  1001. //
  1002. // groupBoxCaptureSave
  1003. //
  1004. this.groupBoxCaptureSave.Controls.Add(this.ckbSaveAndOpen);
  1005. this.groupBoxCaptureSave.Controls.Add(this.ckbSave);
  1006. this.groupBoxCaptureSave.Location = new System.Drawing.Point(117, 73);
  1007. this.groupBoxCaptureSave.Name = "groupBoxCaptureSave";
  1008. this.groupBoxCaptureSave.Size = new System.Drawing.Size(394, 470);
  1009. this.groupBoxCaptureSave.TabIndex = 21;
  1010. this.groupBoxCaptureSave.TabStop = false;
  1011. this.groupBoxCaptureSave.Text = "拍照保存";
  1012. //
  1013. // ckbSaveAndOpen
  1014. //
  1015. this.ckbSaveAndOpen.AutoSize = true;
  1016. this.ckbSaveAndOpen.Location = new System.Drawing.Point(40, 63);
  1017. this.ckbSaveAndOpen.Name = "ckbSaveAndOpen";
  1018. this.ckbSaveAndOpen.Size = new System.Drawing.Size(144, 16);
  1019. this.ckbSaveAndOpen.TabIndex = 0;
  1020. this.ckbSaveAndOpen.Text = "保存后打开图片到软件";
  1021. this.ckbSaveAndOpen.UseVisualStyleBackColor = true;
  1022. //
  1023. // ckbSave
  1024. //
  1025. this.ckbSave.AutoSize = true;
  1026. this.ckbSave.Location = new System.Drawing.Point(20, 36);
  1027. this.ckbSave.Name = "ckbSave";
  1028. this.ckbSave.Size = new System.Drawing.Size(84, 16);
  1029. this.ckbSave.TabIndex = 0;
  1030. this.ckbSave.Text = "保存到硬盘";
  1031. this.ckbSave.UseVisualStyleBackColor = true;
  1032. //
  1033. // groupBox10
  1034. //
  1035. this.groupBox10.Controls.Add(this.button8);
  1036. this.groupBox10.Controls.Add(this.textBox6);
  1037. this.groupBox10.Controls.Add(this.button7);
  1038. this.groupBox10.Controls.Add(this.textBox5);
  1039. this.groupBox10.Controls.Add(this.button6);
  1040. this.groupBox10.Controls.Add(this.textBox4);
  1041. this.groupBox10.Controls.Add(this.label20);
  1042. this.groupBox10.Controls.Add(this.label19);
  1043. this.groupBox10.Controls.Add(this.label18);
  1044. this.groupBox10.Location = new System.Drawing.Point(117, 188);
  1045. this.groupBox10.Name = "groupBox10";
  1046. this.groupBox10.Size = new System.Drawing.Size(394, 171);
  1047. this.groupBox10.TabIndex = 30;
  1048. this.groupBox10.TabStop = false;
  1049. this.groupBox10.Text = "存档文件保存路径";
  1050. //
  1051. // button8
  1052. //
  1053. this.button8.Location = new System.Drawing.Point(313, 95);
  1054. this.button8.Name = "button8";
  1055. this.button8.Size = new System.Drawing.Size(75, 21);
  1056. this.button8.TabIndex = 16;
  1057. this.button8.Text = "选择文件夹";
  1058. this.button8.UseVisualStyleBackColor = true;
  1059. this.button8.Click += new System.EventHandler(this.button8_Click);
  1060. //
  1061. // textBox6
  1062. //
  1063. this.textBox6.Location = new System.Drawing.Point(87, 95);
  1064. this.textBox6.Name = "textBox6";
  1065. this.textBox6.ReadOnly = true;
  1066. this.textBox6.Size = new System.Drawing.Size(209, 21);
  1067. this.textBox6.TabIndex = 15;
  1068. //
  1069. // button7
  1070. //
  1071. this.button7.Location = new System.Drawing.Point(313, 63);
  1072. this.button7.Name = "button7";
  1073. this.button7.Size = new System.Drawing.Size(75, 21);
  1074. this.button7.TabIndex = 14;
  1075. this.button7.Text = "选择文件夹";
  1076. this.button7.UseVisualStyleBackColor = true;
  1077. this.button7.Click += new System.EventHandler(this.button7_Click);
  1078. //
  1079. // textBox5
  1080. //
  1081. this.textBox5.Location = new System.Drawing.Point(87, 63);
  1082. this.textBox5.Name = "textBox5";
  1083. this.textBox5.ReadOnly = true;
  1084. this.textBox5.Size = new System.Drawing.Size(209, 21);
  1085. this.textBox5.TabIndex = 13;
  1086. //
  1087. // button6
  1088. //
  1089. this.button6.Location = new System.Drawing.Point(313, 30);
  1090. this.button6.Name = "button6";
  1091. this.button6.Size = new System.Drawing.Size(75, 21);
  1092. this.button6.TabIndex = 12;
  1093. this.button6.Text = "选择文件夹";
  1094. this.button6.UseVisualStyleBackColor = true;
  1095. this.button6.Click += new System.EventHandler(this.button6_Click);
  1096. //
  1097. // textBox4
  1098. //
  1099. this.textBox4.Location = new System.Drawing.Point(87, 30);
  1100. this.textBox4.Name = "textBox4";
  1101. this.textBox4.ReadOnly = true;
  1102. this.textBox4.Size = new System.Drawing.Size(209, 21);
  1103. this.textBox4.TabIndex = 11;
  1104. //
  1105. // label20
  1106. //
  1107. this.label20.AutoSize = true;
  1108. this.label20.Location = new System.Drawing.Point(18, 98);
  1109. this.label20.Name = "label20";
  1110. this.label20.Size = new System.Drawing.Size(65, 12);
  1111. this.label20.TabIndex = 7;
  1112. this.label20.Text = "专用分析:";
  1113. //
  1114. // label19
  1115. //
  1116. this.label19.AutoSize = true;
  1117. this.label19.Location = new System.Drawing.Point(17, 66);
  1118. this.label19.Name = "label19";
  1119. this.label19.Size = new System.Drawing.Size(65, 12);
  1120. this.label19.TabIndex = 6;
  1121. this.label19.Text = "通用分析:";
  1122. //
  1123. // label18
  1124. //
  1125. this.label18.AutoSize = true;
  1126. this.label18.Location = new System.Drawing.Point(17, 34);
  1127. this.label18.Name = "label18";
  1128. this.label18.Size = new System.Drawing.Size(65, 12);
  1129. this.label18.TabIndex = 5;
  1130. this.label18.Text = "常规操作:";
  1131. //
  1132. // groupBox6
  1133. //
  1134. this.groupBox6.Controls.Add(this.listView2);
  1135. this.groupBox6.Location = new System.Drawing.Point(117, 74);
  1136. this.groupBox6.Name = "groupBox6";
  1137. this.groupBox6.Size = new System.Drawing.Size(394, 471);
  1138. this.groupBox6.TabIndex = 25;
  1139. this.groupBox6.TabStop = false;
  1140. this.groupBox6.Text = "点距列表";
  1141. //
  1142. // listView2
  1143. //
  1144. this.listView2.FullRowSelect = true;
  1145. this.listView2.HideSelection = false;
  1146. this.listView2.Location = new System.Drawing.Point(6, 20);
  1147. this.listView2.MultiSelect = false;
  1148. this.listView2.Name = "listView2";
  1149. this.listView2.Size = new System.Drawing.Size(382, 441);
  1150. this.listView2.TabIndex = 24;
  1151. this.listView2.UseCompatibleStateImageBehavior = false;
  1152. this.listView2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView2_DoubleClick);
  1153. //
  1154. // groupBox9
  1155. //
  1156. this.groupBox9.Controls.Add(this.button10);
  1157. this.groupBox9.Controls.Add(this.button9);
  1158. this.groupBox9.Controls.Add(this.pictureBox1);
  1159. this.groupBox9.Controls.Add(this.checkBox7);
  1160. this.groupBox9.Location = new System.Drawing.Point(117, 74);
  1161. this.groupBox9.Name = "groupBox9";
  1162. this.groupBox9.Size = new System.Drawing.Size(394, 108);
  1163. this.groupBox9.TabIndex = 45;
  1164. this.groupBox9.TabStop = false;
  1165. this.groupBox9.Text = "启动图像";
  1166. //
  1167. // button10
  1168. //
  1169. this.button10.Location = new System.Drawing.Point(232, 43);
  1170. this.button10.Name = "button10";
  1171. this.button10.Size = new System.Drawing.Size(75, 23);
  1172. this.button10.TabIndex = 10;
  1173. this.button10.Text = "删除";
  1174. this.button10.UseVisualStyleBackColor = true;
  1175. this.button10.Click += new System.EventHandler(this.button10_Click);
  1176. //
  1177. // button9
  1178. //
  1179. this.button9.Font = new System.Drawing.Font("宋体", 25F);
  1180. this.button9.Location = new System.Drawing.Point(98, 14);
  1181. this.button9.Name = "button9";
  1182. this.button9.Size = new System.Drawing.Size(80, 80);
  1183. this.button9.TabIndex = 9;
  1184. this.button9.Text = "+";
  1185. this.button9.UseVisualStyleBackColor = true;
  1186. this.button9.Click += new System.EventHandler(this.button9_Click);
  1187. //
  1188. // pictureBox1
  1189. //
  1190. this.pictureBox1.Location = new System.Drawing.Point(98, 14);
  1191. this.pictureBox1.Name = "pictureBox1";
  1192. this.pictureBox1.Size = new System.Drawing.Size(80, 80);
  1193. this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
  1194. this.pictureBox1.TabIndex = 8;
  1195. this.pictureBox1.TabStop = false;
  1196. //
  1197. // checkBox7
  1198. //
  1199. this.checkBox7.AutoSize = true;
  1200. this.checkBox7.Location = new System.Drawing.Point(8, 46);
  1201. this.checkBox7.Name = "checkBox7";
  1202. this.checkBox7.Size = new System.Drawing.Size(84, 16);
  1203. this.checkBox7.TabIndex = 6;
  1204. this.checkBox7.Text = "启动图像:";
  1205. this.checkBox7.UseVisualStyleBackColor = true;
  1206. //
  1207. // groupBox2
  1208. //
  1209. this.groupBox2.Controls.Add(this.btn_SaveAs);
  1210. this.groupBox2.Controls.Add(this.btn_Save);
  1211. this.groupBox2.Controls.Add(this.button2);
  1212. this.groupBox2.Controls.Add(this.button1);
  1213. this.groupBox2.Location = new System.Drawing.Point(117, 13);
  1214. this.groupBox2.Name = "groupBox2";
  1215. this.groupBox2.Size = new System.Drawing.Size(394, 58);
  1216. this.groupBox2.TabIndex = 2;
  1217. this.groupBox2.TabStop = false;
  1218. this.groupBox2.Text = "操作";
  1219. //
  1220. // btn_SaveAs
  1221. //
  1222. this.btn_SaveAs.Location = new System.Drawing.Point(232, 20);
  1223. this.btn_SaveAs.Name = "btn_SaveAs";
  1224. this.btn_SaveAs.Size = new System.Drawing.Size(75, 23);
  1225. this.btn_SaveAs.TabIndex = 3;
  1226. this.btn_SaveAs.Text = "另存为";
  1227. this.btn_SaveAs.UseVisualStyleBackColor = true;
  1228. this.btn_SaveAs.Click += new System.EventHandler(this.btn_SaveAs_Click);
  1229. //
  1230. // btn_Save
  1231. //
  1232. this.btn_Save.Location = new System.Drawing.Point(152, 20);
  1233. this.btn_Save.Name = "btn_Save";
  1234. this.btn_Save.Size = new System.Drawing.Size(75, 23);
  1235. this.btn_Save.TabIndex = 2;
  1236. this.btn_Save.Text = "保存";
  1237. this.btn_Save.UseVisualStyleBackColor = true;
  1238. this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
  1239. //
  1240. // button2
  1241. //
  1242. this.button2.Location = new System.Drawing.Point(313, 20);
  1243. this.button2.Name = "button2";
  1244. this.button2.Size = new System.Drawing.Size(75, 23);
  1245. this.button2.TabIndex = 1;
  1246. this.button2.Text = "取消";
  1247. this.button2.UseVisualStyleBackColor = true;
  1248. this.button2.Click += new System.EventHandler(this.button2_Click);
  1249. //
  1250. // button1
  1251. //
  1252. this.button1.Location = new System.Drawing.Point(233, 20);
  1253. this.button1.Name = "button1";
  1254. this.button1.Size = new System.Drawing.Size(75, 23);
  1255. this.button1.TabIndex = 0;
  1256. this.button1.Text = "确定";
  1257. this.button1.UseVisualStyleBackColor = true;
  1258. this.button1.Click += new System.EventHandler(this.button1_Click);
  1259. //
  1260. // groupBox12
  1261. //
  1262. this.groupBox12.Controls.Add(this.button13);
  1263. this.groupBox12.Controls.Add(this.button5);
  1264. this.groupBox12.Controls.Add(this.button4);
  1265. this.groupBox12.Controls.Add(this.button3);
  1266. this.groupBox12.Location = new System.Drawing.Point(117, 12);
  1267. this.groupBox12.Name = "groupBox12";
  1268. this.groupBox12.Size = new System.Drawing.Size(394, 59);
  1269. this.groupBox12.TabIndex = 35;
  1270. this.groupBox12.TabStop = false;
  1271. this.groupBox12.Text = "操作";
  1272. //
  1273. // button13
  1274. //
  1275. this.button13.Location = new System.Drawing.Point(232, 21);
  1276. this.button13.Name = "button13";
  1277. this.button13.Size = new System.Drawing.Size(75, 23);
  1278. this.button13.TabIndex = 13;
  1279. this.button13.Text = "应用";
  1280. this.button13.UseVisualStyleBackColor = true;
  1281. this.button13.Click += new System.EventHandler(this.button13_Click);
  1282. //
  1283. // button5
  1284. //
  1285. this.button5.Location = new System.Drawing.Point(151, 21);
  1286. this.button5.Name = "button5";
  1287. this.button5.Size = new System.Drawing.Size(75, 23);
  1288. this.button5.TabIndex = 10;
  1289. this.button5.Text = "编辑";
  1290. this.button5.UseVisualStyleBackColor = true;
  1291. this.button5.Click += new System.EventHandler(this.button5_Click);
  1292. //
  1293. // button4
  1294. //
  1295. this.button4.Location = new System.Drawing.Point(70, 21);
  1296. this.button4.Name = "button4";
  1297. this.button4.Size = new System.Drawing.Size(75, 23);
  1298. this.button4.TabIndex = 9;
  1299. this.button4.Text = "新建";
  1300. this.button4.UseVisualStyleBackColor = true;
  1301. this.button4.Click += new System.EventHandler(this.button4_Click);
  1302. //
  1303. // button3
  1304. //
  1305. this.button3.Location = new System.Drawing.Point(311, 21);
  1306. this.button3.Name = "button3";
  1307. this.button3.Size = new System.Drawing.Size(75, 23);
  1308. this.button3.TabIndex = 8;
  1309. this.button3.Text = "删除";
  1310. this.button3.UseVisualStyleBackColor = true;
  1311. this.button3.Click += new System.EventHandler(this.button3_Click);
  1312. //
  1313. // groupBox3
  1314. //
  1315. this.groupBox3.Controls.Add(this.pictureBox2);
  1316. this.groupBox3.Controls.Add(this.button12);
  1317. this.groupBox3.Controls.Add(this.button11);
  1318. this.groupBox3.Controls.Add(this.label8);
  1319. this.groupBox3.Controls.Add(this.label7);
  1320. this.groupBox3.Controls.Add(this.label6);
  1321. this.groupBox3.Controls.Add(this.label5);
  1322. this.groupBox3.Controls.Add(this.label4);
  1323. this.groupBox3.Controls.Add(this.label3);
  1324. this.groupBox3.Controls.Add(this.label2);
  1325. this.groupBox3.Controls.Add(this.textBox_Email);
  1326. this.groupBox3.Controls.Add(this.textBox_Phone);
  1327. this.groupBox3.Controls.Add(this.textBox_Contact);
  1328. this.groupBox3.Controls.Add(this.textBox_Address);
  1329. this.groupBox3.Controls.Add(this.textBox_City);
  1330. this.groupBox3.Controls.Add(this.textBox_Province);
  1331. this.groupBox3.Controls.Add(this.textBox_CompanyName);
  1332. this.groupBox3.Controls.Add(this.label1);
  1333. this.groupBox3.Location = new System.Drawing.Point(117, 74);
  1334. this.groupBox3.Name = "groupBox3";
  1335. this.groupBox3.Size = new System.Drawing.Size(394, 276);
  1336. this.groupBox3.TabIndex = 35;
  1337. this.groupBox3.TabStop = false;
  1338. this.groupBox3.Text = "用户信息";
  1339. //
  1340. // pictureBox2
  1341. //
  1342. this.pictureBox2.Location = new System.Drawing.Point(280, 157);
  1343. this.pictureBox2.Name = "pictureBox2";
  1344. this.pictureBox2.Size = new System.Drawing.Size(36, 36);
  1345. this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
  1346. this.pictureBox2.TabIndex = 17;
  1347. this.pictureBox2.TabStop = false;
  1348. //
  1349. // button12
  1350. //
  1351. this.button12.Location = new System.Drawing.Point(322, 162);
  1352. this.button12.Name = "button12";
  1353. this.button12.Size = new System.Drawing.Size(45, 21);
  1354. this.button12.TabIndex = 16;
  1355. this.button12.Text = "删除";
  1356. this.button12.UseVisualStyleBackColor = true;
  1357. this.button12.Click += new System.EventHandler(this.button12_Click);
  1358. //
  1359. // button11
  1360. //
  1361. this.button11.Font = new System.Drawing.Font("宋体", 15F);
  1362. this.button11.Location = new System.Drawing.Point(280, 158);
  1363. this.button11.Name = "button11";
  1364. this.button11.Size = new System.Drawing.Size(36, 36);
  1365. this.button11.TabIndex = 15;
  1366. this.button11.Text = "+";
  1367. this.button11.UseVisualStyleBackColor = true;
  1368. this.button11.Click += new System.EventHandler(this.button11_Click);
  1369. //
  1370. // label8
  1371. //
  1372. this.label8.AutoSize = true;
  1373. this.label8.Location = new System.Drawing.Point(225, 162);
  1374. this.label8.Name = "label8";
  1375. this.label8.Size = new System.Drawing.Size(41, 12);
  1376. this.label8.TabIndex = 14;
  1377. this.label8.Text = "logo:";
  1378. //
  1379. // label7
  1380. //
  1381. this.label7.AutoSize = true;
  1382. this.label7.Location = new System.Drawing.Point(30, 162);
  1383. this.label7.Name = "label7";
  1384. this.label7.Size = new System.Drawing.Size(41, 12);
  1385. this.label7.TabIndex = 13;
  1386. this.label7.Text = "邮件:";
  1387. //
  1388. // label6
  1389. //
  1390. this.label6.AutoSize = true;
  1391. this.label6.Location = new System.Drawing.Point(225, 130);
  1392. this.label6.Name = "label6";
  1393. this.label6.Size = new System.Drawing.Size(41, 12);
  1394. this.label6.TabIndex = 12;
  1395. this.label6.Text = "电话:";
  1396. //
  1397. // label5
  1398. //
  1399. this.label5.AutoSize = true;
  1400. this.label5.Location = new System.Drawing.Point(18, 130);
  1401. this.label5.Name = "label5";
  1402. this.label5.Size = new System.Drawing.Size(53, 12);
  1403. this.label5.TabIndex = 11;
  1404. this.label5.Text = "联系人:";
  1405. //
  1406. // label4
  1407. //
  1408. this.label4.AutoSize = true;
  1409. this.label4.Location = new System.Drawing.Point(30, 98);
  1410. this.label4.Name = "label4";
  1411. this.label4.Size = new System.Drawing.Size(41, 12);
  1412. this.label4.TabIndex = 10;
  1413. this.label4.Text = "地址:";
  1414. //
  1415. // label3
  1416. //
  1417. this.label3.AutoSize = true;
  1418. this.label3.Location = new System.Drawing.Point(225, 66);
  1419. this.label3.Name = "label3";
  1420. this.label3.Size = new System.Drawing.Size(41, 12);
  1421. this.label3.TabIndex = 9;
  1422. this.label3.Text = "城市:";
  1423. //
  1424. // label2
  1425. //
  1426. this.label2.AutoSize = true;
  1427. this.label2.Cursor = System.Windows.Forms.Cursors.Default;
  1428. this.label2.Location = new System.Drawing.Point(30, 66);
  1429. this.label2.Name = "label2";
  1430. this.label2.Size = new System.Drawing.Size(41, 12);
  1431. this.label2.TabIndex = 8;
  1432. this.label2.Text = "省份:";
  1433. //
  1434. // textBox_Email
  1435. //
  1436. this.textBox_Email.Location = new System.Drawing.Point(77, 158);
  1437. this.textBox_Email.Name = "textBox_Email";
  1438. this.textBox_Email.Size = new System.Drawing.Size(140, 21);
  1439. this.textBox_Email.TabIndex = 7;
  1440. //
  1441. // textBox_Phone
  1442. //
  1443. this.textBox_Phone.Location = new System.Drawing.Point(277, 126);
  1444. this.textBox_Phone.Name = "textBox_Phone";
  1445. this.textBox_Phone.Size = new System.Drawing.Size(111, 21);
  1446. this.textBox_Phone.TabIndex = 6;
  1447. //
  1448. // textBox_Contact
  1449. //
  1450. this.textBox_Contact.Location = new System.Drawing.Point(77, 126);
  1451. this.textBox_Contact.Name = "textBox_Contact";
  1452. this.textBox_Contact.Size = new System.Drawing.Size(140, 21);
  1453. this.textBox_Contact.TabIndex = 5;
  1454. //
  1455. // textBox_Address
  1456. //
  1457. this.textBox_Address.Location = new System.Drawing.Point(77, 94);
  1458. this.textBox_Address.Name = "textBox_Address";
  1459. this.textBox_Address.Size = new System.Drawing.Size(311, 21);
  1460. this.textBox_Address.TabIndex = 4;
  1461. //
  1462. // textBox_City
  1463. //
  1464. this.textBox_City.Location = new System.Drawing.Point(277, 62);
  1465. this.textBox_City.Name = "textBox_City";
  1466. this.textBox_City.Size = new System.Drawing.Size(111, 21);
  1467. this.textBox_City.TabIndex = 3;
  1468. //
  1469. // textBox_Province
  1470. //
  1471. this.textBox_Province.Location = new System.Drawing.Point(77, 62);
  1472. this.textBox_Province.Name = "textBox_Province";
  1473. this.textBox_Province.Size = new System.Drawing.Size(140, 21);
  1474. this.textBox_Province.TabIndex = 2;
  1475. //
  1476. // textBox_CompanyName
  1477. //
  1478. this.textBox_CompanyName.Location = new System.Drawing.Point(77, 30);
  1479. this.textBox_CompanyName.Name = "textBox_CompanyName";
  1480. this.textBox_CompanyName.Size = new System.Drawing.Size(311, 21);
  1481. this.textBox_CompanyName.TabIndex = 1;
  1482. //
  1483. // label1
  1484. //
  1485. this.label1.AutoSize = true;
  1486. this.label1.Location = new System.Drawing.Point(6, 34);
  1487. this.label1.Name = "label1";
  1488. this.label1.Size = new System.Drawing.Size(65, 12);
  1489. this.label1.TabIndex = 0;
  1490. this.label1.Text = "单位名称:";
  1491. //
  1492. // groupBox5
  1493. //
  1494. this.groupBox5.Controls.Add(this.textBox8);
  1495. this.groupBox5.Controls.Add(this.textBox7);
  1496. this.groupBox5.Controls.Add(this.label31);
  1497. this.groupBox5.Controls.Add(this.label30);
  1498. this.groupBox5.Controls.Add(this.radioButton2);
  1499. this.groupBox5.Controls.Add(this.textBox3);
  1500. this.groupBox5.Controls.Add(this.radioButton1);
  1501. this.groupBox5.Controls.Add(this.comboBox1);
  1502. this.groupBox5.Controls.Add(this.label15);
  1503. this.groupBox5.Controls.Add(this.textBox2);
  1504. this.groupBox5.Controls.Add(this.label14);
  1505. this.groupBox5.Controls.Add(this.textBox1);
  1506. this.groupBox5.Controls.Add(this.label13);
  1507. this.groupBox5.Controls.Add(this.listView1);
  1508. this.groupBox5.Location = new System.Drawing.Point(117, 136);
  1509. this.groupBox5.Name = "groupBox5";
  1510. this.groupBox5.Size = new System.Drawing.Size(394, 408);
  1511. this.groupBox5.TabIndex = 1;
  1512. this.groupBox5.TabStop = false;
  1513. this.groupBox5.Text = "信息";
  1514. //
  1515. // radioButton2
  1516. //
  1517. this.radioButton2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1518. | System.Windows.Forms.AnchorStyles.Left)));
  1519. this.radioButton2.AutoSize = true;
  1520. this.radioButton2.Location = new System.Drawing.Point(9, 89);
  1521. this.radioButton2.Name = "radioButton2";
  1522. this.radioButton2.Size = new System.Drawing.Size(47, 16);
  1523. this.radioButton2.TabIndex = 11;
  1524. this.radioButton2.TabStop = true;
  1525. this.radioButton2.Text = "重置";
  1526. this.radioButton2.UseVisualStyleBackColor = true;
  1527. this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
  1528. //
  1529. // textBox3
  1530. //
  1531. this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1532. | System.Windows.Forms.AnchorStyles.Left)));
  1533. this.textBox3.Location = new System.Drawing.Point(77, 65);
  1534. this.textBox3.Name = "textBox3";
  1535. this.textBox3.Size = new System.Drawing.Size(108, 21);
  1536. this.textBox3.TabIndex = 10;
  1537. //
  1538. // radioButton1
  1539. //
  1540. this.radioButton1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1541. | System.Windows.Forms.AnchorStyles.Left)));
  1542. this.radioButton1.AutoSize = true;
  1543. this.radioButton1.Location = new System.Drawing.Point(9, 67);
  1544. this.radioButton1.Name = "radioButton1";
  1545. this.radioButton1.Size = new System.Drawing.Size(47, 16);
  1546. this.radioButton1.TabIndex = 9;
  1547. this.radioButton1.TabStop = true;
  1548. this.radioButton1.Text = "延续";
  1549. this.radioButton1.UseVisualStyleBackColor = true;
  1550. this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
  1551. //
  1552. // comboBox1
  1553. //
  1554. this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1555. | System.Windows.Forms.AnchorStyles.Left)));
  1556. this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  1557. this.comboBox1.FormattingEnabled = true;
  1558. this.comboBox1.Location = new System.Drawing.Point(77, 41);
  1559. this.comboBox1.Name = "comboBox1";
  1560. this.comboBox1.Size = new System.Drawing.Size(108, 20);
  1561. this.comboBox1.TabIndex = 8;
  1562. //
  1563. // label15
  1564. //
  1565. this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1566. | System.Windows.Forms.AnchorStyles.Left)));
  1567. this.label15.AutoSize = true;
  1568. this.label15.Location = new System.Drawing.Point(9, 45);
  1569. this.label15.Name = "label15";
  1570. this.label15.Size = new System.Drawing.Size(65, 12);
  1571. this.label15.TabIndex = 5;
  1572. this.label15.Text = "数值位数:";
  1573. //
  1574. // textBox2
  1575. //
  1576. this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1577. | System.Windows.Forms.AnchorStyles.Left)));
  1578. this.textBox2.Location = new System.Drawing.Point(280, 15);
  1579. this.textBox2.Name = "textBox2";
  1580. this.textBox2.Size = new System.Drawing.Size(108, 21);
  1581. this.textBox2.TabIndex = 4;
  1582. //
  1583. // label14
  1584. //
  1585. this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1586. | System.Windows.Forms.AnchorStyles.Left)));
  1587. this.label14.AutoSize = true;
  1588. this.label14.Location = new System.Drawing.Point(205, 20);
  1589. this.label14.Name = "label14";
  1590. this.label14.Size = new System.Drawing.Size(65, 12);
  1591. this.label14.TabIndex = 3;
  1592. this.label14.Text = "名称格式:";
  1593. //
  1594. // textBox1
  1595. //
  1596. this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1597. | System.Windows.Forms.AnchorStyles.Left)));
  1598. this.textBox1.Location = new System.Drawing.Point(77, 16);
  1599. this.textBox1.Name = "textBox1";
  1600. this.textBox1.Size = new System.Drawing.Size(108, 21);
  1601. this.textBox1.TabIndex = 2;
  1602. //
  1603. // label13
  1604. //
  1605. this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1606. | System.Windows.Forms.AnchorStyles.Left)));
  1607. this.label13.AutoSize = true;
  1608. this.label13.Location = new System.Drawing.Point(33, 21);
  1609. this.label13.Name = "label13";
  1610. this.label13.Size = new System.Drawing.Size(41, 12);
  1611. this.label13.TabIndex = 1;
  1612. this.label13.Text = "文本:";
  1613. //
  1614. // listView1
  1615. //
  1616. this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  1617. | System.Windows.Forms.AnchorStyles.Left)));
  1618. this.listView1.GridLines = true;
  1619. this.listView1.HideSelection = false;
  1620. this.listView1.Location = new System.Drawing.Point(8, 124);
  1621. this.listView1.Name = "listView1";
  1622. this.listView1.Size = new System.Drawing.Size(380, 275);
  1623. this.listView1.TabIndex = 12;
  1624. this.listView1.UseCompatibleStateImageBehavior = false;
  1625. this.listView1.View = System.Windows.Forms.View.Details;
  1626. //
  1627. // groupBox4
  1628. //
  1629. this.groupBox4.Controls.Add(this.label12);
  1630. this.groupBox4.Controls.Add(this.label11);
  1631. this.groupBox4.Controls.Add(this.label10);
  1632. this.groupBox4.Controls.Add(this.label9);
  1633. this.groupBox4.Controls.Add(this.textBox_Interface);
  1634. this.groupBox4.Controls.Add(this.textBox_Camera);
  1635. this.groupBox4.Controls.Add(this.textBox_SN);
  1636. this.groupBox4.Controls.Add(this.textBox_Model);
  1637. this.groupBox4.Location = new System.Drawing.Point(117, 359);
  1638. this.groupBox4.Name = "groupBox4";
  1639. this.groupBox4.Size = new System.Drawing.Size(394, 185);
  1640. this.groupBox4.TabIndex = 30;
  1641. this.groupBox4.TabStop = false;
  1642. this.groupBox4.Text = "显微镜信息";
  1643. //
  1644. // label12
  1645. //
  1646. this.label12.AutoSize = true;
  1647. this.label12.Location = new System.Drawing.Point(30, 130);
  1648. this.label12.Name = "label12";
  1649. this.label12.Size = new System.Drawing.Size(41, 12);
  1650. this.label12.TabIndex = 7;
  1651. this.label12.Text = "接口:";
  1652. //
  1653. // label11
  1654. //
  1655. this.label11.AutoSize = true;
  1656. this.label11.Location = new System.Drawing.Point(18, 98);
  1657. this.label11.Name = "label11";
  1658. this.label11.Size = new System.Drawing.Size(53, 12);
  1659. this.label11.TabIndex = 6;
  1660. this.label11.Text = "摄像头:";
  1661. //
  1662. // label10
  1663. //
  1664. this.label10.AutoSize = true;
  1665. this.label10.Location = new System.Drawing.Point(30, 66);
  1666. this.label10.Name = "label10";
  1667. this.label10.Size = new System.Drawing.Size(41, 12);
  1668. this.label10.TabIndex = 5;
  1669. this.label10.Text = "SN码:";
  1670. //
  1671. // label9
  1672. //
  1673. this.label9.AutoSize = true;
  1674. this.label9.Location = new System.Drawing.Point(30, 34);
  1675. this.label9.Name = "label9";
  1676. this.label9.Size = new System.Drawing.Size(41, 12);
  1677. this.label9.TabIndex = 4;
  1678. this.label9.Text = "型号:";
  1679. //
  1680. // textBox_Interface
  1681. //
  1682. this.textBox_Interface.Location = new System.Drawing.Point(77, 126);
  1683. this.textBox_Interface.Name = "textBox_Interface";
  1684. this.textBox_Interface.Size = new System.Drawing.Size(311, 21);
  1685. this.textBox_Interface.TabIndex = 3;
  1686. //
  1687. // textBox_Camera
  1688. //
  1689. this.textBox_Camera.Location = new System.Drawing.Point(77, 94);
  1690. this.textBox_Camera.Name = "textBox_Camera";
  1691. this.textBox_Camera.Size = new System.Drawing.Size(311, 21);
  1692. this.textBox_Camera.TabIndex = 2;
  1693. //
  1694. // textBox_SN
  1695. //
  1696. this.textBox_SN.Location = new System.Drawing.Point(77, 62);
  1697. this.textBox_SN.Name = "textBox_SN";
  1698. this.textBox_SN.Size = new System.Drawing.Size(311, 21);
  1699. this.textBox_SN.TabIndex = 1;
  1700. //
  1701. // textBox_Model
  1702. //
  1703. this.textBox_Model.Location = new System.Drawing.Point(77, 30);
  1704. this.textBox_Model.Name = "textBox_Model";
  1705. this.textBox_Model.Size = new System.Drawing.Size(311, 21);
  1706. this.textBox_Model.TabIndex = 0;
  1707. //
  1708. // groupBox11
  1709. //
  1710. this.groupBox11.Controls.Add(this.checkBox9);
  1711. this.groupBox11.Controls.Add(this.checkBox8);
  1712. this.groupBox11.Location = new System.Drawing.Point(117, 367);
  1713. this.groupBox11.Name = "groupBox11";
  1714. this.groupBox11.Size = new System.Drawing.Size(394, 177);
  1715. this.groupBox11.TabIndex = 40;
  1716. this.groupBox11.TabStop = false;
  1717. this.groupBox11.Text = "其他";
  1718. //
  1719. // checkBox9
  1720. //
  1721. this.checkBox9.AutoSize = true;
  1722. this.checkBox9.Location = new System.Drawing.Point(8, 66);
  1723. this.checkBox9.Name = "checkBox9";
  1724. this.checkBox9.Size = new System.Drawing.Size(156, 16);
  1725. this.checkBox9.TabIndex = 8;
  1726. this.checkBox9.Text = "自动添加AxioVision标尺";
  1727. this.checkBox9.UseVisualStyleBackColor = true;
  1728. //
  1729. // checkBox8
  1730. //
  1731. this.checkBox8.AutoSize = true;
  1732. this.checkBox8.Location = new System.Drawing.Point(8, 34);
  1733. this.checkBox8.Name = "checkBox8";
  1734. this.checkBox8.Size = new System.Drawing.Size(114, 16);
  1735. this.checkBox8.TabIndex = 7;
  1736. this.checkBox8.Text = "自动添加ZEN标尺";
  1737. this.checkBox8.UseVisualStyleBackColor = true;
  1738. //
  1739. // listView3
  1740. //
  1741. this.listView3.FullRowSelect = true;
  1742. this.listView3.GridLines = true;
  1743. this.listView3.HideSelection = false;
  1744. this.listView3.Location = new System.Drawing.Point(117, 73);
  1745. this.listView3.MultiSelect = false;
  1746. this.listView3.Name = "listView3";
  1747. this.listView3.Size = new System.Drawing.Size(394, 471);
  1748. this.listView3.TabIndex = 46;
  1749. this.listView3.UseCompatibleStateImageBehavior = false;
  1750. this.listView3.Click += new System.EventHandler(this.listView1_SelectedIndexChanged);
  1751. //
  1752. // label21
  1753. //
  1754. this.label21.AutoSize = true;
  1755. this.label21.Location = new System.Drawing.Point(12, 44);
  1756. this.label21.Name = "label21";
  1757. this.label21.Size = new System.Drawing.Size(83, 12);
  1758. this.label21.TabIndex = 10;
  1759. this.label21.Text = "Z轴运动方向:";
  1760. //
  1761. // label22
  1762. //
  1763. this.label22.AutoSize = true;
  1764. this.label22.Location = new System.Drawing.Point(12, 117);
  1765. this.label22.Name = "label22";
  1766. this.label22.Size = new System.Drawing.Size(95, 12);
  1767. this.label22.TabIndex = 11;
  1768. this.label22.Text = "Y轴运动方向:左";
  1769. //
  1770. // label23
  1771. //
  1772. this.label23.AutoSize = true;
  1773. this.label23.Location = new System.Drawing.Point(239, 117);
  1774. this.label23.Name = "label23";
  1775. this.label23.Size = new System.Drawing.Size(17, 12);
  1776. this.label23.TabIndex = 12;
  1777. this.label23.Text = "右";
  1778. //
  1779. // label24
  1780. //
  1781. this.label24.AutoSize = true;
  1782. this.label24.Location = new System.Drawing.Point(239, 82);
  1783. this.label24.Name = "label24";
  1784. this.label24.Size = new System.Drawing.Size(17, 12);
  1785. this.label24.TabIndex = 13;
  1786. this.label24.Text = "右";
  1787. //
  1788. // label25
  1789. //
  1790. this.label25.AutoSize = true;
  1791. this.label25.Location = new System.Drawing.Point(12, 82);
  1792. this.label25.Name = "label25";
  1793. this.label25.Size = new System.Drawing.Size(95, 12);
  1794. this.label25.TabIndex = 14;
  1795. this.label25.Text = "X轴运动方向:左";
  1796. //
  1797. // panel1
  1798. //
  1799. this.panel1.Controls.Add(this.radioButton7);
  1800. this.panel1.Controls.Add(this.radioButton6);
  1801. this.panel1.Location = new System.Drawing.Point(101, 39);
  1802. this.panel1.Name = "panel1";
  1803. this.panel1.Size = new System.Drawing.Size(84, 24);
  1804. this.panel1.TabIndex = 16;
  1805. //
  1806. // radioButton7
  1807. //
  1808. this.radioButton7.AutoSize = true;
  1809. this.radioButton7.Location = new System.Drawing.Point(43, 3);
  1810. this.radioButton7.Name = "radioButton7";
  1811. this.radioButton7.Size = new System.Drawing.Size(35, 16);
  1812. this.radioButton7.TabIndex = 1;
  1813. this.radioButton7.TabStop = true;
  1814. this.radioButton7.Text = "下";
  1815. this.radioButton7.UseVisualStyleBackColor = true;
  1816. //
  1817. // radioButton6
  1818. //
  1819. this.radioButton6.AutoSize = true;
  1820. this.radioButton6.Location = new System.Drawing.Point(3, 3);
  1821. this.radioButton6.Name = "radioButton6";
  1822. this.radioButton6.Size = new System.Drawing.Size(35, 16);
  1823. this.radioButton6.TabIndex = 0;
  1824. this.radioButton6.TabStop = true;
  1825. this.radioButton6.Text = "上";
  1826. this.radioButton6.UseVisualStyleBackColor = true;
  1827. //
  1828. // panel2
  1829. //
  1830. this.panel2.Controls.Add(this.radioButton8);
  1831. this.panel2.Controls.Add(this.radioButton9);
  1832. this.panel2.Location = new System.Drawing.Point(144, 75);
  1833. this.panel2.Name = "panel2";
  1834. this.panel2.Size = new System.Drawing.Size(84, 24);
  1835. this.panel2.TabIndex = 17;
  1836. //
  1837. // radioButton8
  1838. //
  1839. this.radioButton8.AutoSize = true;
  1840. this.radioButton8.Location = new System.Drawing.Point(5, 5);
  1841. this.radioButton8.Name = "radioButton8";
  1842. this.radioButton8.Size = new System.Drawing.Size(35, 16);
  1843. this.radioButton8.TabIndex = 3;
  1844. this.radioButton8.TabStop = true;
  1845. this.radioButton8.Text = "正";
  1846. this.radioButton8.UseVisualStyleBackColor = true;
  1847. //
  1848. // radioButton9
  1849. //
  1850. this.radioButton9.AutoSize = true;
  1851. this.radioButton9.Location = new System.Drawing.Point(44, 5);
  1852. this.radioButton9.Name = "radioButton9";
  1853. this.radioButton9.Size = new System.Drawing.Size(35, 16);
  1854. this.radioButton9.TabIndex = 2;
  1855. this.radioButton9.TabStop = true;
  1856. this.radioButton9.Text = "负";
  1857. this.radioButton9.UseVisualStyleBackColor = true;
  1858. //
  1859. // panel3
  1860. //
  1861. this.panel3.Controls.Add(this.radioButton10);
  1862. this.panel3.Controls.Add(this.radioButton11);
  1863. this.panel3.Location = new System.Drawing.Point(273, 76);
  1864. this.panel3.Name = "panel3";
  1865. this.panel3.Size = new System.Drawing.Size(82, 23);
  1866. this.panel3.TabIndex = 18;
  1867. //
  1868. // radioButton10
  1869. //
  1870. this.radioButton10.AutoSize = true;
  1871. this.radioButton10.Location = new System.Drawing.Point(5, 4);
  1872. this.radioButton10.Name = "radioButton10";
  1873. this.radioButton10.Size = new System.Drawing.Size(35, 16);
  1874. this.radioButton10.TabIndex = 5;
  1875. this.radioButton10.TabStop = true;
  1876. this.radioButton10.Text = "正";
  1877. this.radioButton10.UseVisualStyleBackColor = true;
  1878. //
  1879. // radioButton11
  1880. //
  1881. this.radioButton11.AutoSize = true;
  1882. this.radioButton11.Location = new System.Drawing.Point(44, 4);
  1883. this.radioButton11.Name = "radioButton11";
  1884. this.radioButton11.Size = new System.Drawing.Size(35, 16);
  1885. this.radioButton11.TabIndex = 4;
  1886. this.radioButton11.TabStop = true;
  1887. this.radioButton11.Text = "负";
  1888. this.radioButton11.UseVisualStyleBackColor = true;
  1889. //
  1890. // panel4
  1891. //
  1892. this.panel4.Controls.Add(this.radioButton12);
  1893. this.panel4.Controls.Add(this.radioButton13);
  1894. this.panel4.Location = new System.Drawing.Point(144, 110);
  1895. this.panel4.Name = "panel4";
  1896. this.panel4.Size = new System.Drawing.Size(84, 24);
  1897. this.panel4.TabIndex = 19;
  1898. //
  1899. // radioButton12
  1900. //
  1901. this.radioButton12.AutoSize = true;
  1902. this.radioButton12.Location = new System.Drawing.Point(5, 5);
  1903. this.radioButton12.Name = "radioButton12";
  1904. this.radioButton12.Size = new System.Drawing.Size(35, 16);
  1905. this.radioButton12.TabIndex = 7;
  1906. this.radioButton12.TabStop = true;
  1907. this.radioButton12.Text = "正";
  1908. this.radioButton12.UseVisualStyleBackColor = true;
  1909. //
  1910. // radioButton13
  1911. //
  1912. this.radioButton13.AutoSize = true;
  1913. this.radioButton13.Location = new System.Drawing.Point(47, 5);
  1914. this.radioButton13.Name = "radioButton13";
  1915. this.radioButton13.Size = new System.Drawing.Size(35, 16);
  1916. this.radioButton13.TabIndex = 6;
  1917. this.radioButton13.TabStop = true;
  1918. this.radioButton13.Text = "负";
  1919. this.radioButton13.UseVisualStyleBackColor = true;
  1920. //
  1921. // panel5
  1922. //
  1923. this.panel5.Controls.Add(this.radioButton14);
  1924. this.panel5.Controls.Add(this.radioButton15);
  1925. this.panel5.Location = new System.Drawing.Point(273, 112);
  1926. this.panel5.Name = "panel5";
  1927. this.panel5.Size = new System.Drawing.Size(82, 22);
  1928. this.panel5.TabIndex = 20;
  1929. //
  1930. // radioButton14
  1931. //
  1932. this.radioButton14.AutoSize = true;
  1933. this.radioButton14.Location = new System.Drawing.Point(5, 3);
  1934. this.radioButton14.Name = "radioButton14";
  1935. this.radioButton14.Size = new System.Drawing.Size(35, 16);
  1936. this.radioButton14.TabIndex = 9;
  1937. this.radioButton14.TabStop = true;
  1938. this.radioButton14.Text = "正";
  1939. this.radioButton14.UseVisualStyleBackColor = true;
  1940. //
  1941. // radioButton15
  1942. //
  1943. this.radioButton15.AutoSize = true;
  1944. this.radioButton15.Location = new System.Drawing.Point(44, 3);
  1945. this.radioButton15.Name = "radioButton15";
  1946. this.radioButton15.Size = new System.Drawing.Size(35, 16);
  1947. this.radioButton15.TabIndex = 8;
  1948. this.radioButton15.TabStop = true;
  1949. this.radioButton15.Text = "负";
  1950. this.radioButton15.UseVisualStyleBackColor = true;
  1951. //
  1952. // groupBox15
  1953. //
  1954. this.groupBox15.Controls.Add(this.panel5);
  1955. this.groupBox15.Controls.Add(this.panel4);
  1956. this.groupBox15.Controls.Add(this.panel3);
  1957. this.groupBox15.Controls.Add(this.panel2);
  1958. this.groupBox15.Controls.Add(this.panel1);
  1959. this.groupBox15.Controls.Add(this.label25);
  1960. this.groupBox15.Controls.Add(this.label24);
  1961. this.groupBox15.Controls.Add(this.label23);
  1962. this.groupBox15.Controls.Add(this.label22);
  1963. this.groupBox15.Controls.Add(this.label21);
  1964. this.groupBox15.Location = new System.Drawing.Point(117, 73);
  1965. this.groupBox15.Name = "groupBox15";
  1966. this.groupBox15.Size = new System.Drawing.Size(394, 471);
  1967. this.groupBox15.TabIndex = 47;
  1968. this.groupBox15.TabStop = false;
  1969. this.groupBox15.Text = "方向设置";
  1970. //
  1971. // groupBox16
  1972. //
  1973. this.groupBox16.Controls.Add(this.panel6);
  1974. this.groupBox16.Controls.Add(this.label28);
  1975. this.groupBox16.Controls.Add(this.label27);
  1976. this.groupBox16.Controls.Add(this.label26);
  1977. this.groupBox16.Controls.Add(this.numericUpDown1);
  1978. this.groupBox16.Controls.Add(this.comboBox2);
  1979. this.groupBox16.Location = new System.Drawing.Point(117, 73);
  1980. this.groupBox16.Name = "groupBox16";
  1981. this.groupBox16.Size = new System.Drawing.Size(394, 471);
  1982. this.groupBox16.TabIndex = 48;
  1983. this.groupBox16.TabStop = false;
  1984. this.groupBox16.Text = "辅助线设置";
  1985. //
  1986. // panel6
  1987. //
  1988. this.panel6.BackColor = System.Drawing.Color.Red;
  1989. this.panel6.Cursor = System.Windows.Forms.Cursors.AppStarting;
  1990. this.panel6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1991. this.panel6.Location = new System.Drawing.Point(135, 105);
  1992. this.panel6.Name = "panel6";
  1993. this.panel6.Size = new System.Drawing.Size(152, 20);
  1994. this.panel6.TabIndex = 18;
  1995. this.panel6.UseVisualStyleBackColor = false;
  1996. this.panel6.Click += new System.EventHandler(this.panel6_Click);
  1997. //
  1998. // label28
  1999. //
  2000. this.label28.AutoSize = true;
  2001. this.label28.Location = new System.Drawing.Point(45, 162);
  2002. this.label28.Name = "label28";
  2003. this.label28.Size = new System.Drawing.Size(59, 12);
  2004. this.label28.TabIndex = 17;
  2005. this.label28.Text = "线条宽度:";
  2006. //
  2007. // label27
  2008. //
  2009. this.label27.AutoSize = true;
  2010. this.label27.Location = new System.Drawing.Point(45, 108);
  2011. this.label27.Name = "label27";
  2012. this.label27.Size = new System.Drawing.Size(59, 12);
  2013. this.label27.TabIndex = 16;
  2014. this.label27.Text = "线条颜色:";
  2015. //
  2016. // label26
  2017. //
  2018. this.label26.AutoSize = true;
  2019. this.label26.Location = new System.Drawing.Point(45, 54);
  2020. this.label26.Name = "label26";
  2021. this.label26.Size = new System.Drawing.Size(59, 12);
  2022. this.label26.TabIndex = 15;
  2023. this.label26.Text = "线条样式:";
  2024. //
  2025. // numericUpDown1
  2026. //
  2027. this.numericUpDown1.Location = new System.Drawing.Point(135, 158);
  2028. this.numericUpDown1.Name = "numericUpDown1";
  2029. this.numericUpDown1.Size = new System.Drawing.Size(152, 21);
  2030. this.numericUpDown1.TabIndex = 14;
  2031. this.numericUpDown1.Value = new decimal(new int[] {
  2032. 1,
  2033. 0,
  2034. 0,
  2035. 0});
  2036. //
  2037. // comboBox2
  2038. //
  2039. this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  2040. this.comboBox2.FormattingEnabled = true;
  2041. this.comboBox2.Location = new System.Drawing.Point(135, 51);
  2042. this.comboBox2.Name = "comboBox2";
  2043. this.comboBox2.Size = new System.Drawing.Size(152, 20);
  2044. this.comboBox2.TabIndex = 12;
  2045. //
  2046. // button17
  2047. //
  2048. this.button17.Location = new System.Drawing.Point(311, 21);
  2049. this.button17.Name = "button17";
  2050. this.button17.Size = new System.Drawing.Size(75, 23);
  2051. this.button17.TabIndex = 8;
  2052. this.button17.Text = "删除";
  2053. this.button17.UseVisualStyleBackColor = true;
  2054. this.button17.Click += new System.EventHandler(this.button17_Click);
  2055. //
  2056. // button16
  2057. //
  2058. this.button16.Location = new System.Drawing.Point(70, 21);
  2059. this.button16.Name = "button16";
  2060. this.button16.Size = new System.Drawing.Size(75, 23);
  2061. this.button16.TabIndex = 9;
  2062. this.button16.Text = "新建";
  2063. this.button16.UseVisualStyleBackColor = true;
  2064. this.button16.Click += new System.EventHandler(this.button16_Click);
  2065. //
  2066. // button15
  2067. //
  2068. this.button15.Location = new System.Drawing.Point(151, 21);
  2069. this.button15.Name = "button15";
  2070. this.button15.Size = new System.Drawing.Size(75, 23);
  2071. this.button15.TabIndex = 10;
  2072. this.button15.Text = "编辑";
  2073. this.button15.UseVisualStyleBackColor = true;
  2074. this.button15.Click += new System.EventHandler(this.button15_Click);
  2075. //
  2076. // button14
  2077. //
  2078. this.button14.Location = new System.Drawing.Point(232, 21);
  2079. this.button14.Name = "button14";
  2080. this.button14.Size = new System.Drawing.Size(75, 23);
  2081. this.button14.TabIndex = 13;
  2082. this.button14.Text = "应用";
  2083. this.button14.UseVisualStyleBackColor = true;
  2084. this.button14.Click += new System.EventHandler(this.button14_Click);
  2085. //
  2086. // groupBox13
  2087. //
  2088. this.groupBox13.Controls.Add(this.button14);
  2089. this.groupBox13.Controls.Add(this.button15);
  2090. this.groupBox13.Controls.Add(this.button16);
  2091. this.groupBox13.Controls.Add(this.button17);
  2092. this.groupBox13.Location = new System.Drawing.Point(117, 13);
  2093. this.groupBox13.Name = "groupBox13";
  2094. this.groupBox13.Size = new System.Drawing.Size(394, 59);
  2095. this.groupBox13.TabIndex = 36;
  2096. this.groupBox13.TabStop = false;
  2097. this.groupBox13.Text = "操作";
  2098. //
  2099. // button19
  2100. //
  2101. this.button19.Location = new System.Drawing.Point(311, 21);
  2102. this.button19.Name = "button19";
  2103. this.button19.Size = new System.Drawing.Size(75, 23);
  2104. this.button19.TabIndex = 10;
  2105. this.button19.Text = "取消";
  2106. this.button19.UseVisualStyleBackColor = true;
  2107. this.button19.Click += new System.EventHandler(this.button19_Click);
  2108. //
  2109. // button18
  2110. //
  2111. this.button18.Location = new System.Drawing.Point(232, 21);
  2112. this.button18.Name = "button18";
  2113. this.button18.Size = new System.Drawing.Size(75, 23);
  2114. this.button18.TabIndex = 13;
  2115. this.button18.Text = "确定";
  2116. this.button18.UseVisualStyleBackColor = true;
  2117. this.button18.Click += new System.EventHandler(this.button18_Click);
  2118. //
  2119. // groupBox14
  2120. //
  2121. this.groupBox14.Controls.Add(this.button18);
  2122. this.groupBox14.Controls.Add(this.button19);
  2123. this.groupBox14.Location = new System.Drawing.Point(117, 13);
  2124. this.groupBox14.Name = "groupBox14";
  2125. this.groupBox14.Size = new System.Drawing.Size(394, 59);
  2126. this.groupBox14.TabIndex = 37;
  2127. this.groupBox14.TabStop = false;
  2128. this.groupBox14.Text = "操作";
  2129. //
  2130. // groupBox17
  2131. //
  2132. this.groupBox17.Controls.Add(this.button20);
  2133. this.groupBox17.Controls.Add(this.button21);
  2134. this.groupBox17.Location = new System.Drawing.Point(117, 13);
  2135. this.groupBox17.Name = "groupBox17";
  2136. this.groupBox17.Size = new System.Drawing.Size(394, 59);
  2137. this.groupBox17.TabIndex = 38;
  2138. this.groupBox17.TabStop = false;
  2139. this.groupBox17.Text = "操作";
  2140. //
  2141. // button20
  2142. //
  2143. this.button20.Location = new System.Drawing.Point(232, 21);
  2144. this.button20.Name = "button20";
  2145. this.button20.Size = new System.Drawing.Size(75, 23);
  2146. this.button20.TabIndex = 13;
  2147. this.button20.Text = "应用";
  2148. this.button20.UseVisualStyleBackColor = true;
  2149. this.button20.Click += new System.EventHandler(this.button20_Click);
  2150. //
  2151. // button21
  2152. //
  2153. this.button21.Location = new System.Drawing.Point(311, 21);
  2154. this.button21.Name = "button21";
  2155. this.button21.Size = new System.Drawing.Size(75, 23);
  2156. this.button21.TabIndex = 10;
  2157. this.button21.Text = "取消";
  2158. this.button21.UseVisualStyleBackColor = true;
  2159. this.button21.Click += new System.EventHandler(this.button21_Click);
  2160. //
  2161. // groupBox18
  2162. //
  2163. this.groupBox18.Controls.Add(this.button22);
  2164. this.groupBox18.Location = new System.Drawing.Point(117, 12);
  2165. this.groupBox18.Name = "groupBox18";
  2166. this.groupBox18.Size = new System.Drawing.Size(394, 59);
  2167. this.groupBox18.TabIndex = 39;
  2168. this.groupBox18.TabStop = false;
  2169. this.groupBox18.Text = "操作";
  2170. //
  2171. // button22
  2172. //
  2173. this.button22.Location = new System.Drawing.Point(307, 22);
  2174. this.button22.Name = "button22";
  2175. this.button22.Size = new System.Drawing.Size(75, 23);
  2176. this.button22.TabIndex = 13;
  2177. this.button22.Text = "应用";
  2178. this.button22.UseVisualStyleBackColor = true;
  2179. //
  2180. // groupBox19
  2181. //
  2182. this.groupBox19.Controls.Add(this.btn_Del);
  2183. this.groupBox19.Controls.Add(this.comboBox_Name);
  2184. this.groupBox19.Controls.Add(this.label29);
  2185. this.groupBox19.Location = new System.Drawing.Point(117, 74);
  2186. this.groupBox19.Name = "groupBox19";
  2187. this.groupBox19.Size = new System.Drawing.Size(394, 58);
  2188. this.groupBox19.TabIndex = 49;
  2189. this.groupBox19.TabStop = false;
  2190. this.groupBox19.Text = "当前使用";
  2191. //
  2192. // btn_Del
  2193. //
  2194. this.btn_Del.Location = new System.Drawing.Point(313, 23);
  2195. this.btn_Del.Name = "btn_Del";
  2196. this.btn_Del.Size = new System.Drawing.Size(75, 23);
  2197. this.btn_Del.TabIndex = 10;
  2198. this.btn_Del.Text = "删除";
  2199. this.btn_Del.UseVisualStyleBackColor = true;
  2200. this.btn_Del.Click += new System.EventHandler(this.btn_Del_Click);
  2201. //
  2202. // comboBox_Name
  2203. //
  2204. this.comboBox_Name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  2205. | System.Windows.Forms.AnchorStyles.Left)));
  2206. this.comboBox_Name.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  2207. this.comboBox_Name.FormattingEnabled = true;
  2208. this.comboBox_Name.Location = new System.Drawing.Point(77, 25);
  2209. this.comboBox_Name.Name = "comboBox_Name";
  2210. this.comboBox_Name.Size = new System.Drawing.Size(230, 20);
  2211. this.comboBox_Name.TabIndex = 9;
  2212. //
  2213. // label29
  2214. //
  2215. this.label29.AutoSize = true;
  2216. this.label29.Location = new System.Drawing.Point(30, 28);
  2217. this.label29.Name = "label29";
  2218. this.label29.Size = new System.Drawing.Size(41, 12);
  2219. this.label29.TabIndex = 0;
  2220. this.label29.Text = "名称:";
  2221. //
  2222. // label30
  2223. //
  2224. this.label30.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  2225. | System.Windows.Forms.AnchorStyles.Left)));
  2226. this.label30.AutoSize = true;
  2227. this.label30.Location = new System.Drawing.Point(241, 45);
  2228. this.label30.Name = "label30";
  2229. this.label30.Size = new System.Drawing.Size(29, 12);
  2230. this.label30.TabIndex = 13;
  2231. this.label30.Text = "Z1:";
  2232. //
  2233. // label31
  2234. //
  2235. this.label31.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  2236. | System.Windows.Forms.AnchorStyles.Left)));
  2237. this.label31.AutoSize = true;
  2238. this.label31.Location = new System.Drawing.Point(241, 68);
  2239. this.label31.Name = "label31";
  2240. this.label31.Size = new System.Drawing.Size(29, 12);
  2241. this.label31.TabIndex = 14;
  2242. this.label31.Text = "Z2:";
  2243. //
  2244. // textBox7
  2245. //
  2246. this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  2247. | System.Windows.Forms.AnchorStyles.Left)));
  2248. this.textBox7.Location = new System.Drawing.Point(280, 40);
  2249. this.textBox7.Name = "textBox7";
  2250. this.textBox7.Size = new System.Drawing.Size(108, 21);
  2251. this.textBox7.TabIndex = 15;
  2252. //
  2253. // textBox8
  2254. //
  2255. this.textBox8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  2256. | System.Windows.Forms.AnchorStyles.Left)));
  2257. this.textBox8.Location = new System.Drawing.Point(280, 65);
  2258. this.textBox8.Name = "textBox8";
  2259. this.textBox8.Size = new System.Drawing.Size(108, 21);
  2260. this.textBox8.TabIndex = 16;
  2261. //
  2262. // GeneralSettingDialog
  2263. //
  2264. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  2265. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  2266. this.AutoScroll = true;
  2267. this.ClientSize = new System.Drawing.Size(533, 561);
  2268. this.Controls.Add(this.groupBox19);
  2269. this.Controls.Add(this.groupBox5);
  2270. this.Controls.Add(this.groupBox1);
  2271. this.Controls.Add(this.groupBox2);
  2272. this.Controls.Add(this.groupBox7);
  2273. this.Controls.Add(this.groupBox10);
  2274. this.Controls.Add(this.groupBox9);
  2275. this.Controls.Add(this.groupBox11);
  2276. this.Controls.Add(this.groupBox8);
  2277. this.Controls.Add(this.groupBox6);
  2278. this.Controls.Add(this.groupBox3);
  2279. this.Controls.Add(this.groupBox4);
  2280. this.Controls.Add(this.groupBox18);
  2281. this.Controls.Add(this.groupBox17);
  2282. this.Controls.Add(this.groupBox14);
  2283. this.Controls.Add(this.groupBox13);
  2284. this.Controls.Add(this.groupBox12);
  2285. this.Controls.Add(this.groupBox16);
  2286. this.Controls.Add(this.groupBox15);
  2287. this.Controls.Add(this.listView3);
  2288. this.Controls.Add(this.groupBoxCaptureSave);
  2289. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  2290. this.MaximizeBox = false;
  2291. this.MinimizeBox = false;
  2292. this.Name = "GeneralSettingDialog";
  2293. this.Text = "常规设置";
  2294. this.Controls.SetChildIndex(this.groupBoxCaptureSave, 0);
  2295. this.Controls.SetChildIndex(this.listView3, 0);
  2296. this.Controls.SetChildIndex(this.groupBox15, 0);
  2297. this.Controls.SetChildIndex(this.groupBox16, 0);
  2298. this.Controls.SetChildIndex(this.groupBox12, 0);
  2299. this.Controls.SetChildIndex(this.groupBox13, 0);
  2300. this.Controls.SetChildIndex(this.groupBox14, 0);
  2301. this.Controls.SetChildIndex(this.groupBox17, 0);
  2302. this.Controls.SetChildIndex(this.groupBox18, 0);
  2303. this.Controls.SetChildIndex(this.groupBox4, 0);
  2304. this.Controls.SetChildIndex(this.groupBox3, 0);
  2305. this.Controls.SetChildIndex(this.groupBox6, 0);
  2306. this.Controls.SetChildIndex(this.groupBox8, 0);
  2307. this.Controls.SetChildIndex(this.groupBox11, 0);
  2308. this.Controls.SetChildIndex(this.groupBox9, 0);
  2309. this.Controls.SetChildIndex(this.groupBox10, 0);
  2310. this.Controls.SetChildIndex(this.groupBox7, 0);
  2311. this.Controls.SetChildIndex(this.groupBox2, 0);
  2312. this.Controls.SetChildIndex(this.groupBox1, 0);
  2313. this.Controls.SetChildIndex(this.groupBox5, 0);
  2314. this.Controls.SetChildIndex(this.groupBox19, 0);
  2315. this.groupBox1.ResumeLayout(false);
  2316. this.groupBox8.ResumeLayout(false);
  2317. this.groupBox8.PerformLayout();
  2318. this.groupBox7.ResumeLayout(false);
  2319. this.groupBox7.PerformLayout();
  2320. this.groupBoxCaptureSave.ResumeLayout(false);
  2321. this.groupBoxCaptureSave.PerformLayout();
  2322. this.groupBox10.ResumeLayout(false);
  2323. this.groupBox10.PerformLayout();
  2324. this.groupBox6.ResumeLayout(false);
  2325. this.groupBox9.ResumeLayout(false);
  2326. this.groupBox9.PerformLayout();
  2327. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
  2328. this.groupBox2.ResumeLayout(false);
  2329. this.groupBox12.ResumeLayout(false);
  2330. this.groupBox3.ResumeLayout(false);
  2331. this.groupBox3.PerformLayout();
  2332. ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
  2333. this.groupBox5.ResumeLayout(false);
  2334. this.groupBox5.PerformLayout();
  2335. this.groupBox4.ResumeLayout(false);
  2336. this.groupBox4.PerformLayout();
  2337. this.groupBox11.ResumeLayout(false);
  2338. this.groupBox11.PerformLayout();
  2339. this.panel1.ResumeLayout(false);
  2340. this.panel1.PerformLayout();
  2341. this.panel2.ResumeLayout(false);
  2342. this.panel2.PerformLayout();
  2343. this.panel3.ResumeLayout(false);
  2344. this.panel3.PerformLayout();
  2345. this.panel4.ResumeLayout(false);
  2346. this.panel4.PerformLayout();
  2347. this.panel5.ResumeLayout(false);
  2348. this.panel5.PerformLayout();
  2349. this.groupBox15.ResumeLayout(false);
  2350. this.groupBox15.PerformLayout();
  2351. this.groupBox16.ResumeLayout(false);
  2352. this.groupBox16.PerformLayout();
  2353. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
  2354. this.groupBox13.ResumeLayout(false);
  2355. this.groupBox14.ResumeLayout(false);
  2356. this.groupBox17.ResumeLayout(false);
  2357. this.groupBox18.ResumeLayout(false);
  2358. this.groupBox19.ResumeLayout(false);
  2359. this.groupBox19.PerformLayout();
  2360. this.ResumeLayout(false);
  2361. }
  2362. #endregion
  2363. #region [画板颜色]
  2364. /// <summary>
  2365. /// 画板点击
  2366. /// </summary>
  2367. /// <param name="sender"></param>
  2368. /// <param name="e"></param>
  2369. private void panel6_Click(object sender, EventArgs e)
  2370. {
  2371. this.colorsForm.UserPrimaryColor = ColorBgra.FromColor(this.panel6.BackColor);
  2372. this.colorsForm.setSaveBtn_Click(new System.EventHandler(this.panel6Changed));
  2373. this.colorsForm.ShowDialog();
  2374. }
  2375. private void panel6Changed(object sender, EventArgs e)
  2376. {
  2377. this.panel6.BackColor = this.colorsForm.UserPrimaryColor.ToColor();
  2378. this.colorsForm.Close();
  2379. }
  2380. private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
  2381. {
  2382. }
  2383. #endregion
  2384. #region [用户信息]
  2385. public void UserInformation()
  2386. {
  2387. textBox_CompanyName.MaxLength = 100;
  2388. textBox_CompanyName.Text = userInfo.CompanyName;
  2389. textBox_Province.MaxLength = 10;
  2390. textBox_Province.Text = userInfo.Province;
  2391. textBox_City.MaxLength = 10;
  2392. textBox_City.Text = userInfo.City;
  2393. textBox_Address.MaxLength = 100;
  2394. textBox_Address.Text = userInfo.Address;
  2395. textBox_Contact.MaxLength = 10;
  2396. textBox_Contact.Text = userInfo.Contact;
  2397. textBox_Phone.MaxLength = 20;
  2398. textBox_Phone.Text = userInfo.Phone;
  2399. textBox_Email.MaxLength = 30;
  2400. textBox_Email.Text = userInfo.Email;
  2401. textBox_Model.Text = userInfo.Model;
  2402. textBox_SN.Text = userInfo.SN;
  2403. textBox_Camera.Text = userInfo.Camera;
  2404. textBox_Interface.Text = userInfo.Interface;
  2405. if (string.IsNullOrEmpty(userInfo.Logo))
  2406. {
  2407. button11.Show();
  2408. button12.Hide();
  2409. pictureBox2.Hide();
  2410. }
  2411. else
  2412. {
  2413. button11.Hide();
  2414. button12.Show();
  2415. if (System.IO.File.Exists(userInfo.Logo))
  2416. {
  2417. pictureBox2.ImageLocation = userInfo.Logo;
  2418. FileStream userPicStream = new FileStream(userInfo.Logo, FileMode.Open, FileAccess.Read);
  2419. pictureBox2.Image = Image.FromStream(userPicStream);
  2420. userPicStream.Close();
  2421. userPicStream.Dispose();
  2422. }
  2423. pictureBox2.Show();
  2424. }
  2425. }
  2426. #endregion
  2427. #region [基础设置]
  2428. public void BasicSettings()
  2429. {
  2430. checkBox7.Checked = config.StartImgStatus == 1 ? false : true;
  2431. checkBox8.Checked = config.AddZEN == 1 ? true : false;
  2432. checkBox9.Checked = config.AddAxioVision == 1 ? true : false;
  2433. textBox4.Text = config.NormalOperation;
  2434. textBox5.Text = config.GeneralAnalysis;
  2435. textBox6.Text = config.DedicatedAnalysis;
  2436. if (string.IsNullOrEmpty(config.StartImg))
  2437. {
  2438. button9.Show();
  2439. button10.Hide();
  2440. pictureBox1.Hide();
  2441. }
  2442. else
  2443. {
  2444. button9.Hide();
  2445. button10.Show();
  2446. if (System.IO.File.Exists(config.StartImg))
  2447. {
  2448. pictureBox1.ImageLocation = config.StartImg;
  2449. FileStream imgFileStream = new FileStream(config.StartImg, FileMode.Open, FileAccess.Read);
  2450. pictureBox1.Image = Image.FromStream(imgFileStream);
  2451. imgFileStream.Close();
  2452. imgFileStream.Dispose();
  2453. }
  2454. pictureBox1.Show();
  2455. }
  2456. }
  2457. #endregion
  2458. #region [相机设置]
  2459. private void listView1_SelectedIndexChanged(object sender, EventArgs e)
  2460. {
  2461. if (listView3.FocusedItem != null)
  2462. {
  2463. int idx = listView3.FocusedItem.Index;
  2464. for (int i = 0; i < listView3.Items.Count; i++)
  2465. {
  2466. if (i == idx)
  2467. listView3.Items[i].BackColor = Color.Aqua;
  2468. else
  2469. listView3.Items[i].BackColor = Color.White;
  2470. }
  2471. listView3.Items[idx].Selected = false;
  2472. }
  2473. }
  2474. public void CameraSettings()
  2475. {
  2476. listView3.View = View.Details;
  2477. listView3.Columns.Add("0", 0, HorizontalAlignment.Center);
  2478. listView3.Columns.Add(PdnResources.GetString("Menu.LabelAction.MarkAction.Text"), 50, HorizontalAlignment.Center);
  2479. listView3.Columns.Add(PdnResources.GetString("Menu.Cameramodel.text"), 131, HorizontalAlignment.Center);
  2480. listView3.Columns.Add(PdnResources.GetString("Menu.Cameramodelweimi.text"), 300, HorizontalAlignment.Center);
  2481. listView3.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Sidelengthresolution.text"), 200, HorizontalAlignment.Center);
  2482. var screenList = mic_camerasettings_BLL.FindAll();
  2483. var screenRulesId = config.Camera;
  2484. listView3.BeginUpdate();
  2485. foreach (var s in screenList)
  2486. {
  2487. var lv = new ListViewItem();
  2488. lv.SubItems.Add(screenRulesId == s.id ? "√" : "×");
  2489. lv.SubItems.Add(s.camera_model);
  2490. lv.SubItems.Add(s.side_length);
  2491. lv.SubItems.Add(s.resolution);
  2492. lv.Tag = s.id;
  2493. listView3.Items.Add(lv);
  2494. }
  2495. if (listView3.Items.Count > 0)
  2496. {
  2497. listView3.Items[0].Selected = true;
  2498. listView3.Select();
  2499. }
  2500. else
  2501. {
  2502. var lv = new ListViewItem();
  2503. lv.SubItems.Add("2");
  2504. lv.SubItems.Add("3");
  2505. lv.SubItems.Add("4");
  2506. lv.Name = "virtualItem";
  2507. listView3.Items.Add(lv);
  2508. }
  2509. listView3.EndUpdate();
  2510. }
  2511. #endregion
  2512. #region [方向设置]
  2513. public void OrientationSetting()
  2514. {
  2515. radioButton6.Checked = config.ZMovementDirection == 0 ? true : false;
  2516. radioButton7.Checked = config.ZMovementDirection == 1 ? true : false;
  2517. radioButton8.Checked = config.XLeftMovementDirection == 0 ? true : false;
  2518. radioButton9.Checked = config.XLeftMovementDirection == 1 ? true : false;
  2519. radioButton10.Checked = config.XRighttMovementDirection == 0 ? true : false;
  2520. radioButton11.Checked = config.XRighttMovementDirection == 1 ? true : false;
  2521. radioButton12.Checked = config.YLeftMovementDirection == 0 ? true : false;
  2522. radioButton13.Checked = config.YLeftMovementDirection == 1 ? true : false;
  2523. radioButton14.Checked = config.YRighttMovementDirection == 0 ? true : false;
  2524. radioButton15.Checked = config.YRighttMovementDirection == 1 ? true : false;
  2525. }
  2526. #endregion
  2527. #region [辅助线设置]
  2528. public void GuideSetting()
  2529. {
  2530. //绑定线样式数据
  2531. this.comboBox2.Items.AddRange(InvariantData.dashStyles);
  2532. //获取xml样式信息
  2533. this.comboBox2.SelectedIndex = Startup.instance.guideStyleModel.lineStyle;
  2534. this.panel6.BackColor = Color.FromArgb(Startup.instance.guideStyleModel.lineColour);
  2535. this.numericUpDown1.Value = Startup.instance.guideStyleModel.lineWidth;
  2536. }
  2537. #endregion
  2538. #region 拍照保存
  2539. bool _isInitCaptureSave = false;
  2540. void InitCaptureSave()
  2541. {
  2542. _isInitCaptureSave = true;
  2543. //初始化字串
  2544. this.groupBox18.Text = PdnResources.GetString("Menu.operation.text");
  2545. groupBoxCaptureSave.Text = PdnResources.GetString("Menu.CaptureSave.text");
  2546. ckbSave.Text = PdnResources.GetString("SaveToDisk");
  2547. ckbSaveAndOpen.Text = PdnResources.GetString("SaveAndOpenImage");
  2548. this.button22.Text = PdnResources.GetString("Menu.application.text");
  2549. ckbSave.Checked = (config.CaptureSaveMode & 1) > 0;
  2550. ckbSaveAndOpen.Enabled = (config.CaptureSaveMode & 1) > 0;
  2551. ckbSaveAndOpen.Checked = (config.CaptureSaveMode & 2) > 0;
  2552. ckbSave.Click += CkbSave_Click;
  2553. ckbSaveAndOpen.Click += CkbSave_Click;
  2554. button22.Click += Apply_Click;
  2555. }
  2556. private void CkbSave_Click(object sender, EventArgs e)
  2557. {
  2558. ckbSaveAndOpen.Enabled = ckbSave.Checked;
  2559. config.CaptureSaveMode = (ckbSave.Checked ? 1 : 0) + (ckbSaveAndOpen.Checked ? 2 : 0);
  2560. }
  2561. private void Apply_Click(object sender, EventArgs e)
  2562. {
  2563. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2564. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2565. FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create);
  2566. }
  2567. #endregion
  2568. private void listBox1_SelectedValueChanged(object sender, EventArgs e)
  2569. {
  2570. groupBox3.Hide();
  2571. groupBox4.Hide();
  2572. groupBox5.Hide();
  2573. groupBox6.Hide();
  2574. groupBox7.Hide();
  2575. groupBox8.Hide();
  2576. groupBox9.Hide();
  2577. groupBox10.Hide();
  2578. groupBox11.Hide();
  2579. groupBox2.Hide();
  2580. groupBox12.Hide();
  2581. groupBox13.Hide();
  2582. listView3.Hide();
  2583. groupBox14.Hide();
  2584. groupBox15.Hide();
  2585. groupBox16.Hide();
  2586. groupBox17.Hide();
  2587. groupBox18.Hide();
  2588. groupBox19.Hide();
  2589. groupBoxCaptureSave.Hide();
  2590. button1.Visible = true;
  2591. btn_Save.Visible = false;
  2592. btn_SaveAs.Visible = false;
  2593. if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Namingrules.text")))
  2594. {
  2595. groupBox5.Show();
  2596. groupBox2.Show();
  2597. groupBox19.Show();
  2598. button1.Visible = false;
  2599. btn_Save.Visible = true;
  2600. btn_SaveAs.Visible = true;
  2601. }
  2602. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.UserInfo.text")))
  2603. {
  2604. groupBox3.Show();
  2605. groupBox4.Show();
  2606. groupBox2.Show();
  2607. }
  2608. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.dotspacingsetting.text")))
  2609. {
  2610. groupBox6.Show();
  2611. groupBox12.Show();
  2612. }
  2613. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Softwarelanguage.text")))
  2614. {
  2615. groupBox8.Show();
  2616. groupBox2.Show();
  2617. }
  2618. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Systemreset.text")))
  2619. {
  2620. groupBox7.Show();
  2621. groupBox2.Show();
  2622. }
  2623. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.BasicSettings.text")))
  2624. {
  2625. groupBox9.Show();
  2626. groupBox10.Show();
  2627. groupBox11.Show();
  2628. groupBox2.Show();
  2629. }
  2630. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text")))
  2631. {
  2632. groupBox13.Show();
  2633. listView3.Show();
  2634. if (listView3.Items.Count > 0)
  2635. {
  2636. listView3.Items.RemoveByKey("virtualItem");
  2637. }
  2638. }
  2639. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Directionsetting.text")))
  2640. {
  2641. groupBox14.Show();
  2642. groupBox15.Show();
  2643. }
  2644. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Auxiliarylinesettings.text")))
  2645. {
  2646. groupBox16.Show();
  2647. groupBox17.Show();
  2648. }
  2649. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.CaptureSave.text")))
  2650. {
  2651. if (!_isInitCaptureSave) InitCaptureSave();
  2652. groupBoxCaptureSave.Show();
  2653. groupBox18.Show();
  2654. }
  2655. }
  2656. private void button2_Click(object sender, EventArgs e)
  2657. {
  2658. Close();
  2659. }
  2660. private void button1_Click(object sender, EventArgs e)
  2661. {
  2662. if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Namingrules.text")))
  2663. {
  2664. //if (string.IsNullOrEmpty(textBox1.Text))
  2665. //{
  2666. // MessageBox.Show(PdnResources.GetString("Menu.pleasewriteNameprefix.text"));
  2667. // return;
  2668. //}
  2669. //if (string.IsNullOrEmpty(textBox2.Text))
  2670. //{
  2671. // MessageBox.Show(PdnResources.GetString("Menu.pleaseNameformat.text"));
  2672. // return;
  2673. //}
  2674. //else
  2675. //{
  2676. // string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text, @"(?<=\G.{2})(?!$)");
  2677. // foreach (string text in arrs)
  2678. // {
  2679. // if (!text.Equals("%P") && !text.Equals("%I") && !text.Equals("%h") && !text.Equals("%m")
  2680. // && !text.Equals("%s") && !text.Equals("%Y") && !text.Equals("%M") && !text.Equals("%D")
  2681. // && !text.Equals("%G") && !text.Equals("%U"))
  2682. // {
  2683. // MessageBox.Show("名称格式不合法, 请检查");
  2684. // return;
  2685. // }
  2686. // }
  2687. //}
  2688. //if (radioButton1.Checked && !(Regex.IsMatch(textBox3.Text, pattern)))
  2689. //{
  2690. // MessageBox.Show(PdnResources.GetString("Menu.Numberscanbeentet.text") + "!");
  2691. // return;
  2692. //}
  2693. //config.CurrentName = comboBox_Name.Text;
  2694. //config.NamePrefix = textBox1.Text;
  2695. //config.NameFormat = textBox2.Text;
  2696. //config.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
  2697. //config.NameStatus = radioButton1.Checked == true ? 1 : 2;
  2698. //config.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
  2699. //string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2700. //string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2701. //if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  2702. //{
  2703. //}
  2704. //else
  2705. //{
  2706. // MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
  2707. //}
  2708. }
  2709. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.UserInfo.text")))
  2710. {
  2711. userInfo.CompanyName = textBox_CompanyName.Text;
  2712. userInfo.Province = textBox_Province.Text;
  2713. userInfo.City = textBox_City.Text;
  2714. userInfo.Address = textBox_Address.Text;
  2715. userInfo.Contact = textBox_Contact.Text;
  2716. userInfo.Phone = textBox_Phone.Text;
  2717. userInfo.Email = textBox_Email.Text;
  2718. if (pictureBox2.ImageLocation == null)
  2719. {
  2720. if (!string.IsNullOrEmpty(userInfo.Logo))
  2721. {
  2722. if (System.IO.File.Exists(userInfo.Logo))
  2723. {
  2724. System.IO.File.Delete(userInfo.Logo);
  2725. }
  2726. }
  2727. }
  2728. userInfo.Logo = pictureBox2.ImageLocation == null ? "" : pictureBox2.ImageLocation;
  2729. userInfo.Model = textBox_Model.Text;
  2730. userInfo.SN = textBox_SN.Text;
  2731. userInfo.Camera = textBox_Camera.Text;
  2732. userInfo.Interface = textBox_Interface.Text;
  2733. string userInfoXml = XmlSerializeHelper.XmlSerialize<UserInfoModel>(userInfo);
  2734. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\UserInfo.xml";
  2735. if (FileOperationHelper.WriteStringToFile(userInfoXml, filePath, FileMode.Create))
  2736. {
  2737. }
  2738. else
  2739. {
  2740. MessageBox.Show(PdnResources.GetString("Menu.UserInfosavefiled.text"));
  2741. }
  2742. }
  2743. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.dotspacingsetting.text")))
  2744. {
  2745. }
  2746. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Softwarelanguage.text")))
  2747. {
  2748. if (radioButton3.Checked)
  2749. {
  2750. config.Language = 1;
  2751. }
  2752. else if (radioButton5.Checked)
  2753. {
  2754. config.Language = 2;
  2755. }
  2756. else if (radioButton4.Checked)
  2757. {
  2758. config.Language = 3;
  2759. }
  2760. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2761. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2762. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  2763. {
  2764. MessageBox.Show(PdnResources.GetString("Menu.nguageswitchissuccessfulthesoftware.text"));
  2765. }
  2766. else
  2767. {
  2768. MessageBox.Show(PdnResources.GetString("Menu.twarelanguageswitchfailed.text"));
  2769. }
  2770. }
  2771. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Systemreset.text")))
  2772. {
  2773. if (!checkBox1.Checked && !checkBox2.Checked && !checkBox3.Checked && !checkBox4.Checked && !checkBox5.Checked && !checkBox6.Checked)
  2774. {
  2775. MessageBox.Show(PdnResources.GetString("Menu.asefirstchecatleastoneite.text"));
  2776. return;
  2777. }
  2778. config.LabelInformationReset = checkBox1.Checked ? 1 : 0;
  2779. config.MeasurementInformationReset = checkBox2.Checked ? 1 : 0;
  2780. config.LogReset = checkBox3.Checked ? 1 : 0;
  2781. config.ShortcutBarReset = checkBox4.Checked ? 1 : 0;
  2782. config.ToolbarReset = checkBox5.Checked ? 1 : 0;
  2783. config.HotKeyReset = checkBox6.Checked ? 1 : 0;
  2784. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2785. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2786. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  2787. {
  2788. MessageBox.Show(PdnResources.GetString("Menu.emresetsuccessfulthesoftw.text") + "!");
  2789. }
  2790. else
  2791. {
  2792. MessageBox.Show(PdnResources.GetString("Menu.Systemresetfailure.text"));
  2793. }
  2794. }
  2795. else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.BasicSettings.text")))
  2796. {
  2797. config.StartImgStatus = checkBox7.Checked ? 2 : 1;
  2798. if (pictureBox1.ImageLocation == null)
  2799. {
  2800. if (!string.IsNullOrEmpty(config.StartImg))
  2801. {
  2802. if (System.IO.File.Exists(config.StartImg))
  2803. {
  2804. System.IO.File.Delete(config.StartImg);
  2805. }
  2806. }
  2807. }
  2808. config.StartImg = pictureBox1.ImageLocation == null ? "" : pictureBox1.ImageLocation;
  2809. config.NormalOperation = textBox4.Text;
  2810. config.GeneralAnalysis = textBox5.Text;
  2811. config.DedicatedAnalysis = textBox6.Text;
  2812. config.AddZEN = checkBox8.Checked ? 1 : 2;
  2813. config.AddAxioVision = checkBox9.Checked ? 1 : 2;
  2814. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2815. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2816. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  2817. {
  2818. Startup.instance.configModel.NormalOperation = config.NormalOperation;
  2819. Startup.instance.configModel.GeneralAnalysis = config.GeneralAnalysis;
  2820. Startup.instance.configModel.DedicatedAnalysis = config.DedicatedAnalysis;
  2821. if (this.appWorkspace != null && this.appWorkspace.Widgets != null && this.appWorkspace.Widgets.ProjectEngineering != null && !this.appWorkspace.Widgets.ProjectEngineering.IsDisposed)
  2822. {
  2823. this.appWorkspace.Widgets.ProjectEngineering.InitializeTreeViewDetailData();
  2824. }
  2825. }
  2826. else
  2827. {
  2828. MessageBox.Show(PdnResources.GetString("Menu.Theoperationfailure.text"));
  2829. }
  2830. }
  2831. }
  2832. private void listView2_DoubleClick(object sender, EventArgs e)
  2833. {
  2834. if (listView2.Items.Count == 0)
  2835. {
  2836. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  2837. return;
  2838. }
  2839. string id = listView2.FocusedItem.SubItems[6].Text;
  2840. if (config.DotPitchId == Convert.ToInt32(id))
  2841. {
  2842. MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
  2843. return;
  2844. }
  2845. config.DotPitchId = Convert.ToInt32(id);
  2846. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  2847. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2848. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  2849. {
  2850. //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
  2851. listView2.BeginUpdate();
  2852. int nRowOrder = 0;
  2853. int nRowOrders = listView2.Items.Count;//行数
  2854. for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
  2855. {
  2856. ListViewItem lvi = listView2.Items[nRowOrder];
  2857. if (lvi.SubItems[1].Text == "√")
  2858. {
  2859. lvi.SubItems[1].Text = "×";
  2860. }
  2861. }
  2862. var Index = listView2.SelectedItems[0].Index;
  2863. var lv = listView2.Items[Index];
  2864. lv.SubItems[1].Text = "√";
  2865. listView2.EndUpdate();
  2866. }
  2867. else
  2868. {
  2869. MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
  2870. }
  2871. }
  2872. private void button3_Click(object sender, EventArgs e)
  2873. {
  2874. if (listView2.Items.Count == 0)
  2875. {
  2876. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  2877. return;
  2878. }
  2879. DialogResult dr;
  2880. dr = MessageBox.Show(PdnResources.GetString("Menu.eyousureyouwanttodeletethisdi.text") + "?", PdnResources.GetString("Menu.Edit.Delete.Text"), MessageBoxButtons.OKCancel,
  2881. MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
  2882. if (dr == DialogResult.OK)
  2883. {
  2884. string id = string.Empty;
  2885. if (listView2.FocusedItem != null)
  2886. {
  2887. id = listView2.FocusedItem.SubItems[6].Text;
  2888. }
  2889. else
  2890. {
  2891. id = listView2.Items[0].SubItems[6].Text;
  2892. }
  2893. var point = mic_screen_rules_BLL.FindDefault(Convert.ToInt32(id));
  2894. if (point == null || point.delete_flag == 1)
  2895. {
  2896. MessageBox.Show(PdnResources.GetString("Menu.Abnormalinformation.text"));
  2897. }
  2898. point.delete_flag = 1;
  2899. mic_screen_rules_BLL.Update(point);
  2900. if (listView2.SelectedItems.Count > 0)
  2901. {
  2902. var Index = listView2.SelectedItems[0].Index;
  2903. listView2.Items[Index].Remove();
  2904. }
  2905. else
  2906. {
  2907. listView2.Items[0].Remove();
  2908. }
  2909. }
  2910. else if (dr == DialogResult.Cancel)
  2911. {
  2912. }
  2913. if (listView2.Items.Count > 0)
  2914. {
  2915. listView2.Items[0].Selected = true;
  2916. listView2.Select();
  2917. }
  2918. }
  2919. private void button4_Click(object sender, EventArgs e)
  2920. {
  2921. string id = string.Empty;
  2922. using (PointDataDialog pd = new PointDataDialog(id, listView2))
  2923. {
  2924. pd.Text = PdnResources.GetString("Menu.Set.Generalsettings.Adddotpitch.text");
  2925. pd.ShowDialog();
  2926. }
  2927. }
  2928. private void button5_Click(object sender, EventArgs e)
  2929. {
  2930. string id = string.Empty;
  2931. int thisIndex = 0;
  2932. if (listView2.Items.Count == 0)
  2933. {
  2934. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  2935. return;
  2936. }
  2937. if (listView2.FocusedItem != null)
  2938. {
  2939. id = listView2.FocusedItem.SubItems[6].Text;
  2940. thisIndex = listView2.Items.IndexOf(listView2.FocusedItem);
  2941. }
  2942. else
  2943. {
  2944. id = "1";
  2945. }
  2946. using (PointDataDialog pd = new PointDataDialog(id, listView2, thisIndex))
  2947. {
  2948. pd.Text = PdnResources.GetString("Menu.Editdistance.text");
  2949. pd.ShowDialog();
  2950. }
  2951. }
  2952. private void button6_Click(object sender, EventArgs e)
  2953. {
  2954. FolderBrowserDialog path = new FolderBrowserDialog();
  2955. path.ShowDialog();
  2956. textBox4.Text = path.SelectedPath;
  2957. }
  2958. private void button7_Click(object sender, EventArgs e)
  2959. {
  2960. FolderBrowserDialog path = new FolderBrowserDialog();
  2961. path.ShowDialog();
  2962. textBox5.Text = path.SelectedPath;
  2963. }
  2964. private void button8_Click(object sender, EventArgs e)
  2965. {
  2966. FolderBrowserDialog path = new FolderBrowserDialog();
  2967. path.ShowDialog();
  2968. textBox6.Text = path.SelectedPath;
  2969. }
  2970. private void button9_Click(object sender, EventArgs e)
  2971. {
  2972. OpenFileDialog file = new OpenFileDialog();
  2973. file.Filter = "All Image Files|*.bmp;*.jpeg;*.jpg;*.png";
  2974. DialogResult dr;
  2975. dr = file.ShowDialog();
  2976. if (dr == DialogResult.OK)
  2977. {
  2978. var lastName = Path.GetExtension(file.FileName);
  2979. if (lastName != ".png" && lastName != ".jpg" && lastName != ".jpeg" && lastName != ".bmp")
  2980. {
  2981. MessageBox.Show(PdnResources.GetString("Menu.Pleaseuploadpicturese.text"));
  2982. return;
  2983. }
  2984. var fileName = Path.GetFullPath(file.FileName);
  2985. byte[] bytes = ReadFileToByte(fileName);
  2986. var saveFilePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + $"\\{DateTime.Now.ToString("yyyyMMddHHmmss") + file.SafeFileName}";
  2987. WriteByteToFile(bytes, saveFilePath);
  2988. button9.Hide();
  2989. button10.Show();
  2990. pictureBox1.Show();
  2991. pictureBox1.ImageLocation = saveFilePath;
  2992. FileStream pFileStream = new FileStream(saveFilePath, FileMode.Open, FileAccess.Read);
  2993. pictureBox1.Image = Image.FromStream(pFileStream);
  2994. pFileStream.Close();
  2995. pFileStream.Dispose();
  2996. }
  2997. }
  2998. private void button10_Click(object sender, EventArgs e)
  2999. {
  3000. button9.Show();
  3001. button10.Hide();
  3002. pictureBox1.ImageLocation = null;
  3003. pictureBox1.Hide();
  3004. }
  3005. #region [读文件到byte数组]
  3006. /// <summary>
  3007. /// 读文件到byte[]
  3008. /// </summary>
  3009. /// <param name="fileName">硬盘文件路径</param>
  3010. /// <returns></returns>
  3011. public static byte[] ReadFileToByte(string fileName)
  3012. {
  3013. FileStream pFileStream = null;
  3014. byte[] pReadByte = new byte[0];
  3015. try
  3016. {
  3017. pFileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
  3018. BinaryReader r = new BinaryReader(pFileStream);
  3019. r.BaseStream.Seek(0, SeekOrigin.Begin); //将文件指针设置到文件开
  3020. pReadByte = r.ReadBytes((int)r.BaseStream.Length);
  3021. return pReadByte;
  3022. }
  3023. catch
  3024. {
  3025. return pReadByte;
  3026. }
  3027. finally
  3028. {
  3029. if (pFileStream != null)
  3030. pFileStream.Close();
  3031. }
  3032. }
  3033. #endregion [读文件到byte数组]
  3034. #region [写byte数组到fileName]
  3035. /// <summary>
  3036. /// 写byte[]到fileName
  3037. /// </summary>
  3038. /// <param name="pReadByte">byte[]</param>
  3039. /// <param name="fileName">保存至硬盘路径</param>
  3040. /// <returns></returns>
  3041. public static void WriteByteToFile(byte[] pReadByte, string fileName)
  3042. {
  3043. FileStream pFileStream = null;
  3044. try
  3045. {
  3046. pFileStream = new FileStream(fileName, FileMode.OpenOrCreate);
  3047. pFileStream.Write(pReadByte, 0, pReadByte.Length);
  3048. }
  3049. catch (Exception ex)
  3050. {
  3051. throw ex;
  3052. }
  3053. finally
  3054. {
  3055. if (pFileStream != null)
  3056. {
  3057. pFileStream.Flush();
  3058. pFileStream.Close();
  3059. pFileStream.Dispose();
  3060. }
  3061. }
  3062. }
  3063. #endregion [写byte数组到fileName]
  3064. private void button11_Click(object sender, EventArgs e)
  3065. {
  3066. OpenFileDialog file = new OpenFileDialog();
  3067. file.Filter = "All Image Files|*.bmp;*.jpeg;*.jpg;*.png";
  3068. DialogResult dr;
  3069. dr = file.ShowDialog();
  3070. if (dr == DialogResult.OK)
  3071. {
  3072. var lastName = Path.GetExtension(file.FileName);
  3073. if (lastName != ".png" && lastName != ".jpg" && lastName != ".jpeg" && lastName != ".bmp")
  3074. {
  3075. MessageBox.Show(PdnResources.GetString("Menu.Pleaseuploadpicturese.text"));
  3076. return;
  3077. }
  3078. var fileName = Path.GetFullPath(file.FileName);
  3079. byte[] bytes = ReadFileToByte(fileName);
  3080. var saveFilePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + $"\\{DateTime.Now.ToString("yyyyMMddHHmmss") + file.SafeFileName}";
  3081. WriteByteToFile(bytes, saveFilePath);
  3082. button11.Hide();
  3083. button12.Show();
  3084. pictureBox2.Show();
  3085. pictureBox2.ImageLocation = saveFilePath;
  3086. FileStream pFileStream = new FileStream(saveFilePath, FileMode.Open, FileAccess.Read);
  3087. pictureBox2.Image = Image.FromStream(pFileStream);
  3088. pFileStream.Close();
  3089. pFileStream.Dispose();
  3090. }
  3091. }
  3092. private void button12_Click(object sender, EventArgs e)
  3093. {
  3094. button11.Show();
  3095. button12.Hide();
  3096. pictureBox2.ImageLocation = null;
  3097. pictureBox2.Hide();
  3098. }
  3099. private void button13_Click(object sender, EventArgs e)
  3100. {
  3101. if (listView2.Items.Count == 0)
  3102. {
  3103. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  3104. return;
  3105. }
  3106. if (listView2.FocusedItem == null)
  3107. {
  3108. MessageBox.Show(PdnResources.GetString("Menu.seselecthedotditancedatafi.text"));
  3109. return;
  3110. }
  3111. string id = listView2.FocusedItem.SubItems[6].Text;
  3112. if (config.DotPitchId == Convert.ToInt32(id))
  3113. {
  3114. //MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
  3115. return;
  3116. }
  3117. config.DotPitchId = Convert.ToInt32(id);
  3118. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  3119. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  3120. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  3121. {
  3122. //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
  3123. listView2.BeginUpdate();
  3124. int nRowOrder = 0;
  3125. int nRowOrders = listView2.Items.Count;//行数
  3126. for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
  3127. {
  3128. ListViewItem lvi = listView2.Items[nRowOrder];
  3129. if (lvi.SubItems[1].Text == "√")
  3130. {
  3131. lvi.SubItems[1].Text = "×";
  3132. }
  3133. }
  3134. var Index = listView2.SelectedItems[0].Index;
  3135. var lv = listView2.Items[Index];
  3136. lv.SubItems[1].Text = "√";
  3137. listView2.EndUpdate();
  3138. }
  3139. else
  3140. {
  3141. MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
  3142. }
  3143. }
  3144. private void radioButton2_CheckedChanged(object sender, EventArgs e)
  3145. {
  3146. textBox3.ReadOnly = true;
  3147. //textBox3.Text = "";
  3148. }
  3149. private void radioButton1_CheckedChanged(object sender, EventArgs e)
  3150. {
  3151. textBox3.ReadOnly = false;
  3152. }
  3153. private void listBox1_DrawItem(object sender, DrawItemEventArgs e)
  3154. {
  3155. e.DrawBackground();
  3156. e.DrawFocusRectangle();
  3157. StringFormat strFmt = new System.Drawing.StringFormat();
  3158. strFmt.Alignment = StringAlignment.Center; //文本垂直居中
  3159. strFmt.LineAlignment = StringAlignment.Center; //文本水平居中
  3160. e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font, new SolidBrush(Color.Black), e.Bounds, strFmt);
  3161. }
  3162. /// <summary>
  3163. /// 相机设置添加按钮
  3164. /// </summary>
  3165. /// <param name="sender"></param>
  3166. /// <param name="e"></param>
  3167. private void button16_Click(object sender, EventArgs e)
  3168. {
  3169. string id = string.Empty;
  3170. using (CameraSettingsAddDialog pd = new CameraSettingsAddDialog(id, listView3))
  3171. {
  3172. pd.ShowDialog();
  3173. }
  3174. }
  3175. /// <summary>
  3176. /// 相机设置编辑按钮
  3177. /// </summary>
  3178. /// <param name="sender"></param>
  3179. /// <param name="e"></param>
  3180. private void button15_Click(object sender, EventArgs e)
  3181. {
  3182. string id = string.Empty;
  3183. int thisIndex = 0;
  3184. if (listView3.Items.Count == 0)
  3185. {
  3186. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  3187. return;
  3188. }
  3189. if (listView3.FocusedItem != null)
  3190. {
  3191. id = listView3.FocusedItem.Tag.ToString();
  3192. thisIndex = listView3.Items.IndexOf(listView3.FocusedItem);
  3193. }
  3194. else
  3195. {
  3196. MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
  3197. return;
  3198. //id = "1";
  3199. }
  3200. using (CameraSettingsAddDialog pd = new CameraSettingsAddDialog(id, listView3, thisIndex))
  3201. {
  3202. pd.ShowDialog();
  3203. }
  3204. }
  3205. /// <summary>
  3206. /// 相机设置删除按钮
  3207. /// </summary>
  3208. /// <param name="sender"></param>
  3209. /// <param name="e"></param>
  3210. private void button17_Click(object sender, EventArgs e)
  3211. {
  3212. if (listView3.Items.Count == 0)
  3213. {
  3214. MessageBox.Show(PdnResources.GetString("Menu.Dataisemptyi.text") + "!");
  3215. return;
  3216. }
  3217. if (listView3.FocusedItem == null)
  3218. {
  3219. MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
  3220. //id = listView3.Items[0].Tag.ToString();
  3221. return;
  3222. }
  3223. DialogResult dr;
  3224. dr = MessageBox.Show(PdnResources.GetString("Menu.eyousureyouwantodeletet.text"), PdnResources.GetString("Menu.Edit.Delete.Text"), MessageBoxButtons.OKCancel,
  3225. MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
  3226. if (dr == DialogResult.OK)
  3227. {
  3228. string id = string.Empty;
  3229. if (listView3.FocusedItem != null)
  3230. {
  3231. id = listView3.FocusedItem.Tag.ToString();
  3232. }
  3233. //else
  3234. //{
  3235. // MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
  3236. // //id = listView3.Items[0].Tag.ToString();
  3237. // return;
  3238. //}
  3239. var point = mic_camerasettings_BLL.FindDefault(Convert.ToInt32(id));
  3240. if (point == null || point.delete_flag == 1)
  3241. {
  3242. MessageBox.Show(PdnResources.GetString("Menu.Abnormalinformation.text"));
  3243. }
  3244. point.delete_flag = 1;
  3245. mic_camerasettings_BLL.Update(point);
  3246. if (listView3.SelectedItems.Count > 0)
  3247. {
  3248. var Index = listView3.SelectedItems[0].Index;
  3249. listView3.Items[Index].Remove();
  3250. }
  3251. else
  3252. {
  3253. listView3.Items[0].Remove();
  3254. }
  3255. }
  3256. else if (dr == DialogResult.Cancel)
  3257. {
  3258. }
  3259. if (listView3.Items.Count > 0)
  3260. {
  3261. listView3.Items[0].Selected = true;
  3262. listView3.Select();
  3263. }
  3264. }
  3265. /// <summary>
  3266. /// 应用按钮
  3267. /// </summary>
  3268. /// <param name="sender"></param>
  3269. /// <param name="e"></param>
  3270. private void button14_Click(object sender, EventArgs e)
  3271. {
  3272. if (listView3.Items.Count == 0)
  3273. {
  3274. MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
  3275. return;
  3276. }
  3277. if (listView3.FocusedItem == null)
  3278. {
  3279. MessageBox.Show("请选择要应用的数据");
  3280. return;
  3281. }
  3282. string id = listView3.FocusedItem.Tag.ToString();
  3283. if (config.Camera == Convert.ToInt32(id))
  3284. {
  3285. //MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
  3286. return;
  3287. }
  3288. config.Camera = Convert.ToInt32(id);
  3289. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  3290. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  3291. if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  3292. {
  3293. //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
  3294. listView3.BeginUpdate();
  3295. int nRowOrder = 0;
  3296. int nRowOrders = listView3.Items.Count;//行数
  3297. for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
  3298. {
  3299. ListViewItem lvi = listView3.Items[nRowOrder];
  3300. if (lvi.SubItems[1].Text == "√")
  3301. {
  3302. lvi.SubItems[1].Text = "×";
  3303. }
  3304. }
  3305. var Index = listView3.SelectedItems.Count < 1 ? listView3.FocusedItem.Index : listView3.SelectedItems[0].Index;
  3306. var lv = listView3.Items[Index];
  3307. lv.SubItems[1].Text = "√";
  3308. listView3.EndUpdate();
  3309. }
  3310. else
  3311. {
  3312. MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
  3313. }
  3314. //this.Close();
  3315. //MessageBox.Show(PdnResources.GetString("Menu.Applicationsuccessfully.Text")+ "!");
  3316. }
  3317. /// <summary>
  3318. /// 方向设置确定按钮
  3319. /// </summary>
  3320. /// <param name="sender"></param>
  3321. /// <param name="e"></param>
  3322. private void button18_Click(object sender, EventArgs e)
  3323. {
  3324. if (radioButton6.Checked)
  3325. {
  3326. config.ZMovementDirection = 0;
  3327. }
  3328. else if (radioButton7.Checked)
  3329. {
  3330. config.ZMovementDirection = 1;
  3331. }
  3332. if (radioButton8.Checked)
  3333. {
  3334. config.XLeftMovementDirection = 0;
  3335. }
  3336. else if (radioButton9.Checked)
  3337. {
  3338. config.XLeftMovementDirection = 1;
  3339. }
  3340. if (radioButton10.Checked)
  3341. {
  3342. config.XRighttMovementDirection = 0;
  3343. }
  3344. else if (radioButton11.Checked)
  3345. {
  3346. config.XRighttMovementDirection = 1;
  3347. }
  3348. if (radioButton12.Checked)
  3349. {
  3350. config.YLeftMovementDirection = 0;
  3351. }
  3352. else if (radioButton13.Checked)
  3353. {
  3354. config.YLeftMovementDirection = 1;
  3355. }
  3356. if (radioButton14.Checked)
  3357. {
  3358. config.YRighttMovementDirection = 0;
  3359. }
  3360. else if (radioButton15.Checked)
  3361. {
  3362. config.YRighttMovementDirection = 1;
  3363. }
  3364. string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
  3365. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  3366. if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
  3367. {
  3368. MessageBox.Show(PdnResources.GetString("Menu.Directionsettingfailed.text") + "!");
  3369. //MessageBox.Show(PdnResources.GetString("Menu.Directionsetsuccessfully.text")+"!");
  3370. //this.Close();
  3371. }
  3372. //else
  3373. //{
  3374. // MessageBox.Show(PdnResources.GetString("Menu.Directionsettingfailed.text")+ "!");
  3375. //}
  3376. }
  3377. /// <summary>
  3378. /// 方向设置取消按钮
  3379. /// </summary>
  3380. /// <param name="sender"></param>
  3381. /// <param name="e"></param>
  3382. private void button19_Click(object sender, EventArgs e)
  3383. {
  3384. this.Close();
  3385. }
  3386. /// <summary>
  3387. /// 辅助线样式应用按钮
  3388. /// </summary>
  3389. /// <param name="sender"></param>
  3390. /// <param name="e"></param>
  3391. private void button20_Click(object sender, EventArgs e)
  3392. {
  3393. Startup.instance.guideStyleModel.lineStyle = this.comboBox2.SelectedIndex;
  3394. Startup.instance.guideStyleModel.lineColour = this.panel6.BackColor.ToArgb();
  3395. Startup.instance.guideStyleModel.lineWidth = this.numericUpDown1.Value;
  3396. //另存为XML
  3397. string stageModelXml = XmlSerializeHelper.XmlSerialize<GuideStyleModel>(Startup.instance.guideStyleModel);
  3398. string filePath = Application.StartupPath + @"\Config\Default\SetUp\GuideStyle.xml";
  3399. FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create);
  3400. }
  3401. /// <summary>
  3402. /// 辅助线样式取消按钮
  3403. /// </summary>
  3404. /// <param name="sender"></param>
  3405. /// <param name="e"></param>
  3406. private void button21_Click(object sender, EventArgs e)
  3407. {
  3408. this.Close();
  3409. }
  3410. }
  3411. }