1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550 |
- using PaintDotNet.Base.CommTool;
- using PaintDotNet.DbOpreate.DbBll;
- using PaintDotNet.Base.SettingModel;
- using System;
- using System.Drawing;
- using System.IO;
- using System.Text.RegularExpressions;
- using System.Windows.Forms;
- using System.Linq;
- using System.Collections;
- using PaintDotNet.Instrument;
- namespace PaintDotNet.Setting
- {
- /// <summary>
- /// 设置->常规设置
- /// </summary>
- internal partial class GeneralSettingDialog : PdnBaseForm
- {
- private UserInfoModel userInfo = Startup.instance.userInfo;
- private ConfigModel config = Startup.instance.configModel;
- private GroupBox groupBox10;
- private Button button8;
- private TextBox textBox6;
- private Button button7;
- private TextBox textBox5;
- private Button button6;
- private TextBox textBox4;
- private Label label20;
- private Label label19;
- private Label label18;
- private string pattern = @"^\d+(\.\d)?$";
- private ListView listView3;
- private Label label21;
- private Label label22;
- private Label label23;
- private Label label24;
- private Label label25;
- private Panel panel1;
- private RadioButton radioButton7;
- private RadioButton radioButton6;
- private Panel panel2;
- private RadioButton radioButton8;
- private RadioButton radioButton9;
- private Panel panel3;
- private RadioButton radioButton10;
- private RadioButton radioButton11;
- private Panel panel4;
- private RadioButton radioButton12;
- private RadioButton radioButton13;
- private Panel panel5;
- private RadioButton radioButton14;
- private RadioButton radioButton15;
- private GroupBox groupBox15;
- private GroupBox groupBox16;
- private Label label28;
- private Label label27;
- private Label label26;
- private NumericUpDown numericUpDown1;
- private ComboBox comboBox2;
- private Button panel6;
- private AppWorkspace appWorkspace;
- private Button button17;
- private Button button16;
- private Button button15;
- private Button button14;
- private GroupBox groupBox13;
- private Button button19;
- private Button button18;
- private GroupBox groupBox14;
- private GroupBox groupBox17;
- private Button button20;
- private Button button21;
- private GroupBox groupBoxCaptureSave;
- private GroupBox groupBox18;
- private Button button22;
- private CheckBox ckbSaveAndOpen;
- private CheckBox ckbSave;
- public GroupBox groupBox19;
- private Button btn_Del;
- private ComboBox comboBox_Name;
- private Label label29;
- private Button btn_SaveAs;
- private Button btn_Save;
- private TextBox textBox8;
- private TextBox textBox7;
- private Label label31;
- private Label label30;
- PaintDotNet.ColorsForm colorsForm;
- public GeneralSettingDialog(AppWorkspace appWorkspace, int status = 0)
- {
- this.appWorkspace = appWorkspace;
- InitializeComponent();
- InitializeLanguageText();
- BasicSettings();
- UserInformation();
- NameRules();
- ChooseLanguage();
- LeftMenu(status);
- PointList();
- CameraSettings();
- OrientationSetting();
- GuideSetting();
- //
- //画板
- //
- this.colorsForm = new ColorsForm();
- this.colorsForm.StartPosition = FormStartPosition.CenterScreen;
- this.colorsForm.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
- }
- #region [左侧菜单]
- public void LeftMenu(int status = 0)
- {
- //
- // 设置Dialog属性
- //
- ShowInTaskbar = false;
- //
- // 设置listbox的集合和属性
- //
- listBox1.Items.AddRange(InvariantData.settingName);
- if (status == 1)
- {
- listBox1.SetSelected(2, true);
- }
- else
- {
- listBox1.SetSelected(0, true);
- }
- }
- #endregion
- #region [命名规则]
- public void NameRules()
- {
-
- //
- // 设置comboBox1的集合和属性
- //
- comboBox1.Items.AddRange(InvariantData.numberNum);
- comboBox_Name_SelectedIndex();
-
- //当前使用
- comboBox_Name_Refresh();
- #region [设置listView1]
- listView1.View = View.Details;
- listView1.Columns.Add("1", 0, HorizontalAlignment.Center);
- listView1.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.format.text"), 60, HorizontalAlignment.Center);
- listView1.Columns.Add(PdnResources.GetString("Menu.instruction.text"), 316, HorizontalAlignment.Center);
- listView1.BeginUpdate();
- var dict = InvariantData.parameterList;
- foreach (var s in dict)
- {
- ListViewItem lvi1 = new ListViewItem();
- lvi1.Text = s.Key;
- lvi1.SubItems.Add(s.Key);
- lvi1.SubItems.Add(s.Value);
- listView1.Items.Add(lvi1);
- }
- listView1.EndUpdate();
- #endregion [设置listView1]
- }
- CreateNameDialog dialog;
- /// <summary>
- /// 命名空间另存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btn_SaveAs_Click(object sender, EventArgs e)
- {
- dialog = new CreateNameDialog(this);
- dialog.Text = PdnResources.GetString("Menu.Set.Watermarksettings.Newstyle.text");
- dialog.StartPosition = FormStartPosition.CenterParent;
- dialog.ShowDialog();
- }
- public override void GetCreateName(string name)
- {
- string[] lstName = config.LstNaming.Select(a => a.name).ToArray();
- bool exists = ((IList)lstName).Contains(name);
- if (exists)
- {
- MessageBox.Show("名称重复!");
- return;
- }
- if (Inspect()) return;
- NamingMethod namingMethod = new NamingMethod();
- namingMethod.name = name;
- namingMethod.NamePrefix = textBox1.Text;
- namingMethod.NameFormat = textBox2.Text;
- namingMethod.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
- namingMethod.NameStatus = radioButton1.Checked == true ? 1 : 2;
- namingMethod.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
- namingMethod.CharZ1 = textBox7.Text;
- namingMethod.CharZ2 = textBox8.Text;
- config.LstNaming.Add(namingMethod);
- config.CurrentName = name;
- //string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%");
- //if (((IList)arrs).Contains("T1")) config.customTxt = "T1";
- //else if (((IList)arrs).Contains("T2")) config.customTxt = "T2";
- //else if (((IList)arrs).Contains("T3")) config.customTxt = "T3";
- //else config.customTxt = "";
- //config.CurrentName = name;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- comboBox_Name_Refresh();
- if (ImageIndexDialog.imageIndexDialog != null)
- ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
- comboBox_Name_SelectedIndexChanged(null,null);
- dialog.Close();
- }
- private bool Inspect()
- {
- bool chek = false;
- //if (string.IsNullOrEmpty(textBox1.Text))
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.pleasewriteNameprefix.text"));
- // chek = true;
- //}
- if (string.IsNullOrEmpty(textBox2.Text))
- {
- MessageBox.Show(PdnResources.GetString("Menu.pleaseNameformat.text"));
- chek = true;
- }
- else
- {
- string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%"/*@"(?<=\G.{2})(?!$)"*/);
- foreach (string text in arrs)
- {
- if (text == "") continue;
- //if (!text.Equals("%P") && !text.Equals("%I") && !text.Equals("%h") && !text.Equals("%m")
- // && !text.Equals("%s") && !text.Equals("%Y") && !text.Equals("%M") && !text.Equals("%D")
- // && !text.Equals("%G") && !text.Equals("%U") && !text.Equals("%T1") && !text.Equals("%T2") && !text.Equals("%T3"))
- if (!text.Equals("P") && !text.Equals("I") && !text.Equals("h") && !text.Equals("m")
- && !text.Equals("s") && !text.Equals("Y") && !text.Equals("M") && !text.Equals("D")
- && !text.Equals("G") && !text.Equals("U") && !text.Equals("N") && !text.Equals("E")
- && !text.Equals("T1") && !text.Equals("T2") && !text.Equals("T3")
- && !text.Equals("Z1") && !text.Equals("Z2"))
- {
- MessageBox.Show("名称格式不合法, 请检查");
- chek = true;
- }
- }
- if (Islegal())
- {
- MessageBox.Show("文件名称中不能包含 \\ / : * ? \" < > | ");
- chek = true;
- }
- }
- if (radioButton1.Checked && !(Regex.IsMatch(textBox3.Text, pattern)))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Numberscanbeentet.text") + "!");
- chek = true;
- }
- return chek;
- }
- /// <summary>
- /// 刷新名称
- /// </summary>
- private void comboBox_Name_Refresh()
- {
- this.comboBox_Name.SelectedIndexChanged -= new System.EventHandler(this.comboBox_Name_SelectedIndexChanged);
- string[] lstName = config.LstNaming.Select(a => a.name).ToArray();
- this.comboBox_Name.DataSource = lstName;
- this.comboBox_Name.Text = config.CurrentName;
- this.comboBox_Name.SelectedIndexChanged += new System.EventHandler(this.comboBox_Name_SelectedIndexChanged);
- }
- /// <summary>
- /// 条目选择后刷新
- /// </summary>
- private void comboBox_Name_SelectedIndex()
- {
- string CurrentName = config.CurrentName;
- if (config.LstNaming.Count > 0)
- {
- foreach (NamingMethod item in config.LstNaming)
- {
- if (CurrentName.Equals(item.name))
- {
- textBox1.Text = item.NamePrefix;
- textBox1.MaxLength = 20;
- textBox2.Text = item.NameFormat;
- //radioButton1.Checked = config.NameStatus == 1 ? true : false;
- //radioButton2.Checked = config.NameStatus == 2 ? true : false;
- radioButton1.Checked = true;
- radioButton2.Checked = false;
- textBox3.Text = item.ContinueNum.ToString();
- comboBox1.SelectedIndex = item.NumberNum - 1;
- textBox7.Text = item.CharZ1;
- textBox8.Text = item.CharZ2;
- config.NamePrefix = item.NamePrefix;
- config.NameFormat = item.NameFormat;
- config.NumberNum = item.NumberNum;
- config.NameStatus = item.NameStatus;
- config.ContinueNum = item.ContinueNum;
- config.CharZ1 = item.CharZ1;
- config.CharZ2 = item.CharZ2;
- }
- }
- }
- else
- {
- NamingMethod namingMethod = new NamingMethod();
- namingMethod.name = "default";
- namingMethod.NamePrefix = config.NamePrefix;
- namingMethod.NameFormat = config.NameFormat;
- namingMethod.NumberNum = config.NumberNum;
- namingMethod.NameStatus = config.NameStatus;
- namingMethod.ContinueNum = config.ContinueNum;
- namingMethod.CharZ1 = config.CharZ1;
- namingMethod.CharZ2 = config.CharZ2;
- config.LstNaming.Add(namingMethod);
- config.CurrentName = "default";
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- comboBox_Name_Refresh();
- comboBox_Name_SelectedIndex();
- }
- }
- /// <summary>
- /// 条目选择
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void comboBox_Name_SelectedIndexChanged(object sender, EventArgs e)
- {
- config.CurrentName = this.comboBox_Name.Text.Trim();
- comboBox_Name_SelectedIndex();
- if (Inspect()) return;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- if (ImageIndexDialog.imageIndexDialog != null)
- ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btn_Del_Click(object sender, EventArgs e)
- {
- DialogResult dr = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretcteddata.text") + "?", PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
- if (dr == DialogResult.Cancel) return;
- if (this.comboBox_Name.Text.Trim() != "")
- {
- if (config.LstNaming.Count > 1)
- {
- foreach (NamingMethod item in config.LstNaming)
- {
- if (this.comboBox_Name.Text.Trim().Equals(item.name))
- {
- config.LstNaming.Remove(item);
- break;
- }
- }
- }
- else
- {
- MessageBox.Show("只有一条数据,不可删除!");
- return;
- }
- if (config.LstNaming.Count > 0)
- {
- config.CurrentName = config.LstNaming[0].name;
- comboBox_Name_Refresh();
- }
- else
- {
- comboBox_Name_Refresh();
- config.CurrentName = "";
- }
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- if (ImageIndexDialog.imageIndexDialog != null)
- ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
- }
- }
- /// <summary>
- /// 保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btn_Save_Click(object sender, EventArgs e)
- {
- if (Inspect()) return;
- string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text.Trim(), "%");
- string CurrentName = this.comboBox_Name.Text.Trim();
- NamingMethod namingMethod = new NamingMethod();
- namingMethod.name = CurrentName;
- namingMethod.NamePrefix = textBox1.Text;
- namingMethod.NameFormat = textBox2.Text;
- namingMethod.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
- namingMethod.NameStatus = radioButton1.Checked == true ? 1 : 2;
- namingMethod.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
- namingMethod.CharZ1 = textBox7.Text;
- namingMethod.CharZ2 = textBox8.Text;
- bool save = false;
- if (config.LstNaming.Count > 0)
- {
- for (int i = 0; i < config.LstNaming.Count; i++)
- {
- if (CurrentName.Equals(config.LstNaming[i].name))
- {
- config.LstNaming[i] = namingMethod;
- save = true;
- break;
- }
- }
- if (save)
- {
- if (((IList)arrs).Contains("T1")) config.customTxt = "T1";
- else if (((IList)arrs).Contains("T2")) config.customTxt = "T2";
- else if (((IList)arrs).Contains("T3")) config.customTxt = "T3";
- else config.customTxt = "";
- config.NamePrefix = textBox1.Text;
- config.NameFormat = textBox2.Text;
- config.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
- config.NameStatus = radioButton1.Checked == true ? 1 : 2;
- config.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
- config.CharZ1 = textBox7.Text;
- config.CharZ2 = textBox8.Text;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- Startup.instance.configModel = config;
- }
- if (ImageIndexDialog.imageIndexDialog != null)
- ImageIndexDialog.imageIndexDialog.comboBox_Name_Refresh();
- }
- else
- {
- this.btn_SaveAs.PerformClick();
- }
- }
- //是否符合window命名规则不
- public bool Islegal()
- {
- //Regex regExp = new Regex("[\\/:*?\"<>|]");
- //bool isLegal = regExp.IsMatch(textBox7.Text.Trim()) || regExp.IsMatch(textBox8.Text.Trim());
- //return isLegal;
- char[] charstr = { '\\', '/', ':', '*', '?', '"', '<', '>', '|'};
- char[] textstr = (textBox7.Text.Trim()+ textBox8.Text.Trim()).ToString().Trim().ToCharArray();
- int count = 0;/*统计非法字符的个数*/
- for (int i = 0; i < charstr.Length; i++)
- {
- for (int j = 0; j < textstr.Length; j++)
- {
- if (charstr[i] == textstr[j])
- {
- count++;
- }
- }
- }
- if (count > 0)
- return true;
- else
- return false;
- }
- #endregion
- #region [点距列表]
- public void PointList()
- {
- listView2.View = View.Details;
- listView2.Columns.Add("0", 0, HorizontalAlignment.Center);
- listView2.Columns.Add(PdnResources.GetString("Menu.LabelAction.MarkAction.Text"), 60, HorizontalAlignment.Center);
- listView2.Columns.Add(PdnResources.GetString("Menu.sizeed.text"), 120, HorizontalAlignment.Center);
- listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Maximum(pixels).text"), 120, HorizontalAlignment.Center);
- listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.dotspacing(mm).text"), 120, HorizontalAlignment.Center);
- listView2.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Screenwidth(mm).text"), 120, HorizontalAlignment.Center);
- var screenList = mic_screen_rules_BLL.FindAll();
- var screenRulesId = config.DotPitchId;
- listView2.BeginUpdate();
- foreach (var s in screenList)
- {
- var lv = new ListViewItem();
- lv.Text = "1";
- lv.SubItems.Add(screenRulesId == s.id ? "√" : "×");
- lv.SubItems.Add(s.size);
- lv.SubItems.Add(s.max_resolution);
- lv.SubItems.Add(s.point_pitch);
- lv.SubItems.Add(s.screen_width);
- lv.SubItems.Add(s.id.ToString());
- listView2.Items.Add(lv);
- }
- if (listView2.Items.Count > 0)
- {
- listView2.Items[0].Selected = true;
- listView2.Select();
- }
- listView2.EndUpdate();
- }
- #endregion
- #region [语言内容]
- public void ChooseLanguage()
- {
- radioButton3.Checked = config.Language == 1 ? true : false;
- radioButton4.Checked = config.Language == 3 ? true : false;
- radioButton5.Checked = config.Language == 2 ? true : false;
- }
- #endregion
- #region [控件相关]
- public GroupBox groupBox1;
- public GroupBox groupBox2;
- private Button button1;
- private Button button2;
- private ListBox listBox1;
- private GroupBox groupBox3;
- private GroupBox groupBox4;
- private TextBox textBox_Email;
- private TextBox textBox_Phone;
- private TextBox textBox_Contact;
- private TextBox textBox_Address;
- private TextBox textBox_City;
- private TextBox textBox_Province;
- private TextBox textBox_CompanyName;
- private Label label1;
- private TextBox textBox_Interface;
- private TextBox textBox_Camera;
- private TextBox textBox_SN;
- private TextBox textBox_Model;
- private Label label2;
- private Label label3;
- private Label label4;
- private Label label5;
- private Label label6;
- private Label label7;
- private Label label8;
- private Label label9;
- private Label label10;
- private Label label11;
- private Label label12;
- public GroupBox groupBox5;
- private GroupBox groupBox6;
- private GroupBox groupBox7;
- private GroupBox groupBox8;
- private GroupBox groupBox9;
- private GroupBox groupBox11;
- private Label label13;
- private TextBox textBox1;
- private TextBox textBox2;
- private Label label14;
- private Label label15;
- private ComboBox comboBox1;
- private RadioButton radioButton1;
- private RadioButton radioButton2;
- private TextBox textBox3;
- private ListView listView1;
- private RadioButton radioButton3;
- private Label label16;
- private RadioButton radioButton5;
- private RadioButton radioButton4;
- private CheckBox checkBox6;
- private CheckBox checkBox5;
- private CheckBox checkBox4;
- private CheckBox checkBox3;
- private CheckBox checkBox2;
- private CheckBox checkBox1;
- private Label label17;
- private ListView listView2;
- private GroupBox groupBox12;
- private Button button5;
- private Button button4;
- private Button button3;
- private CheckBox checkBox7;
- private CheckBox checkBox9;
- private CheckBox checkBox8;
- private PictureBox pictureBox1;
- private Button button10;
- private Button button9;
- private Button button11;
- private PictureBox pictureBox2;
- private Button button12;
- private Button button13;
- private void InitializeLanguageText()
- {
- this.groupBox1.Text = PdnResources.GetString("Menu.Type.text");
- this.groupBox8.Text = PdnResources.GetString("Menu.information.text");
- this.radioButton5.Text = PdnResources.GetString("Menu.Set.Generalsettings.English.text");
- this.radioButton4.Text = PdnResources.GetString("Menu.Set.Generalsettings.German.text");
- this.label16.Text = PdnResources.GetString("Menu.Set.Generalsettings.Switchlanguage.text") + ":";
- this.radioButton3.Text = PdnResources.GetString("Menu.Set.Generalsettings.Chinese.text");
- this.groupBox7.Text = PdnResources.GetString("Menu.information.text");
- this.label17.Text = PdnResources.GetString("Menu.Set.Generalsettings.Note:Maklizing.text");
- this.checkBox6.Text = PdnResources.GetString("Menu.Set.Geneings.Note:Maklizing.text");
- this.checkBox5.Text = PdnResources.GetString("Menu.Set.Generalsettings.toolbarinit.text");
- this.checkBox4.Text = PdnResources.GetString("Menu.shortcutbarfunctioninit.text");
- this.checkBox3.Text = PdnResources.GetString("Menu.Set.Generalsettings.loginformationinit.text");
- this.checkBox2.Text = PdnResources.GetString("Menu.Set.Generalsettings.Measurementinfotioninit.text");
- this.checkBox1.Text = PdnResources.GetString("Menu.Set.Generalsettings.Annotatitioninit.text");
- this.groupBox10.Text = PdnResources.GetString("Menu.Set.Generalsettings.Thearchivefilesavesthepath.text");
- this.button8.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
- this.button7.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
- this.button6.Text = PdnResources.GetString("Menu.Set.Generalsettings.Selectfolder.text");
- this.label20.Text = PdnResources.GetString("Menu.DedicatedAnalysis.Text") + ":";
- this.label19.Text = PdnResources.GetString("Menu.GeneralAnalysis.Text") + ":";
- this.label18.Text = PdnResources.GetString("Menu.Normaloperation.text") + ":";
- this.groupBox6.Text = PdnResources.GetString("Menu.Set.Generalsettings.dotspacinglist.text");
- this.groupBox9.Text = PdnResources.GetString("Menu.Set.Generalsettings.Startimage.text");
- this.button10.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.checkBox7.Text = PdnResources.GetString("Menu.Set.Generalsettings.Startimage.text") + ":";
- this.groupBox2.Text = PdnResources.GetString("Menu.operation.text");
- this.button2.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
- this.button1.Text = PdnResources.GetString("Menu.application.text");
- this.groupBox12.Text = PdnResources.GetString("Menu.operation.text");
- this.button13.Text = PdnResources.GetString("Menu.application.text");
- this.button5.Text = PdnResources.GetString("Menu.Edit.Text");
- this.button4.Text = PdnResources.GetString("Menu.New.text");
- this.button3.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.groupBox3.Text = PdnResources.GetString("Menu.UserInfo.text");
- this.button12.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.label7.Text = PdnResources.GetString("Menu.Set.Generalsettings.mail.text") + ":";
- this.label6.Text = PdnResources.GetString("Menu.Set.Generalsettings.phone.text") + ":";
- this.label5.Text = PdnResources.GetString("Menu.Contactperson.text") + ":";
- this.label4.Text = PdnResources.GetString("Menu.Set.Generalsettings.address.text") + ":";
- this.label3.Text = PdnResources.GetString("Menu.Set.Generalsettings.city.text") + ":";
- this.label2.Text = PdnResources.GetString("Menu.Set.Generalsettings.province.text") + ":";
- this.label1.Text = PdnResources.GetString("Menu.Set.Generalsettings.unitname.text") + ":";
- this.groupBox5.Text = PdnResources.GetString("Menu.information.text");
- this.radioButton2.Text = PdnResources.GetString("Menu.reinformation.text");
- this.radioButton1.Text = PdnResources.GetString("Menu.Set.Generalsettings.continue.text");
- this.label15.Text = PdnResources.GetString("Menu.Set.Generalsettings.Numericaldigits.text") + ":";
- this.label14.Text = PdnResources.GetString("Menu.Set.Generalsettings.Nameformat.text") + ":";
- this.label13.Text = PdnResources.GetString("Menu.LabelAction.DrawTextString.Text") + ":";
- this.groupBox4.Text = PdnResources.GetString("Menu.Set.Generalsettings.Microsmation.text");
- this.label12.Text = PdnResources.GetString("Menu.interface.text") + ":";
- this.label11.Text = PdnResources.GetString("Menu.thecamera.text") + ":";
- this.label10.Text = PdnResources.GetString("Menu.Set.Generalsettings.SNcode.text") + ":";
- this.label9.Text = PdnResources.GetString("Menu.model.text") + ":";
- this.groupBox11.Text = PdnResources.GetString("Menu.other.text");
- this.checkBox9.Text = PdnResources.GetString("Menu.Set.Generalsettings.autoaddAxioVisionruler.text");
- this.checkBox8.Text = PdnResources.GetString("Menu.Set.Generalsettings.autoaddZENruler.text");
- this.groupBox13.Text = PdnResources.GetString("Menu.operation.text");
- this.button14.Text = PdnResources.GetString("Menu.application.text");
- this.button15.Text = PdnResources.GetString("Menu.Edit.Text");
- this.button16.Text = PdnResources.GetString("Menu.New.text");
- this.button17.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.groupBox14.Text = PdnResources.GetString("Menu.operation.text");
- this.button18.Text = PdnResources.GetString("Menu.application.text");
- this.button19.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
- this.groupBox15.Text = PdnResources.GetString("Menu.Directionsetting.text");
- this.radioButton14.Text = PdnResources.GetString("Menu.positive.text");
- this.radioButton15.Text = PdnResources.GetString("Menu.negation.text");
- this.radioButton12.Text = PdnResources.GetString("Menu.positive.text");
- this.radioButton13.Text = PdnResources.GetString("Menu.negation.text");
- this.radioButton10.Text = PdnResources.GetString("Menu.positive.text");
- this.radioButton11.Text = PdnResources.GetString("Menu.negation.text");
- this.radioButton8.Text = PdnResources.GetString("Menu.positive.text");
- this.radioButton9.Text = PdnResources.GetString("Menu.negation.text");
- this.radioButton7.Text = PdnResources.GetString("Menu.Set.Generalsettings.under.text");
- this.radioButton6.Text = PdnResources.GetString("Menu.Set.Generalsettings.up.text");
- this.label25.Text = PdnResources.GetString("Menu.Set.Generalsettings.Xaxismovementdirection.text") + ":" + PdnResources.GetString("Menu.Set.Generalsettings.left.text");
- this.label24.Text = PdnResources.GetString("Menu.Set.Generalsettings.right.text");
- this.label23.Text = PdnResources.GetString("Menu.Set.Generalsettings.right.text");
- this.label22.Text = PdnResources.GetString("Menu.Set.Generalsettings.Yaxismovementdirection.text") + ":" + PdnResources.GetString("Menu.Set.Generalsettings.left.text");
- this.label21.Text = PdnResources.GetString("Menu.Set.Generalsettings.Zaxismovementdirection.text") + ":";
- this.Text = PdnResources.GetString("Menu.Setting.GeneralSetting.Text");
- this.label26.Text = PdnResources.GetString("Menu.Linestyle.Text") + ":";
- this.label27.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linecolor.text") + ":";
- this.label28.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linewidth.text") + ":";
- this.groupBox16.Text = PdnResources.GetString("Menu.Auxiliarylinesettings.text");
- this.button20.Text = PdnResources.GetString("Menu.application.text");
- this.button21.Text = PdnResources.GetString("ConfirmLanguageDialog.CancelTB.ActionText");
- this.groupBox17.Text = PdnResources.GetString("Menu.operation.text");
- }
- private void InitializeComponent()
- {
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.listBox1 = new System.Windows.Forms.ListBox();
- this.groupBox8 = new System.Windows.Forms.GroupBox();
- this.radioButton5 = new System.Windows.Forms.RadioButton();
- this.radioButton4 = new System.Windows.Forms.RadioButton();
- this.label16 = new System.Windows.Forms.Label();
- this.radioButton3 = new System.Windows.Forms.RadioButton();
- this.groupBox7 = new System.Windows.Forms.GroupBox();
- this.label17 = new System.Windows.Forms.Label();
- this.checkBox6 = new System.Windows.Forms.CheckBox();
- this.checkBox5 = new System.Windows.Forms.CheckBox();
- this.checkBox4 = new System.Windows.Forms.CheckBox();
- this.checkBox3 = new System.Windows.Forms.CheckBox();
- this.checkBox2 = new System.Windows.Forms.CheckBox();
- this.checkBox1 = new System.Windows.Forms.CheckBox();
- this.groupBoxCaptureSave = new System.Windows.Forms.GroupBox();
- this.ckbSaveAndOpen = new System.Windows.Forms.CheckBox();
- this.ckbSave = new System.Windows.Forms.CheckBox();
- this.groupBox10 = new System.Windows.Forms.GroupBox();
- this.button8 = new System.Windows.Forms.Button();
- this.textBox6 = new System.Windows.Forms.TextBox();
- this.button7 = new System.Windows.Forms.Button();
- this.textBox5 = new System.Windows.Forms.TextBox();
- this.button6 = new System.Windows.Forms.Button();
- this.textBox4 = new System.Windows.Forms.TextBox();
- this.label20 = new System.Windows.Forms.Label();
- this.label19 = new System.Windows.Forms.Label();
- this.label18 = new System.Windows.Forms.Label();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.listView2 = new System.Windows.Forms.ListView();
- this.groupBox9 = new System.Windows.Forms.GroupBox();
- this.button10 = new System.Windows.Forms.Button();
- this.button9 = new System.Windows.Forms.Button();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.checkBox7 = new System.Windows.Forms.CheckBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.btn_SaveAs = new System.Windows.Forms.Button();
- this.btn_Save = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.groupBox12 = new System.Windows.Forms.GroupBox();
- this.button13 = new System.Windows.Forms.Button();
- this.button5 = new System.Windows.Forms.Button();
- this.button4 = new System.Windows.Forms.Button();
- this.button3 = new System.Windows.Forms.Button();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.pictureBox2 = new System.Windows.Forms.PictureBox();
- this.button12 = new System.Windows.Forms.Button();
- this.button11 = new System.Windows.Forms.Button();
- this.label8 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.textBox_Email = new System.Windows.Forms.TextBox();
- this.textBox_Phone = new System.Windows.Forms.TextBox();
- this.textBox_Contact = new System.Windows.Forms.TextBox();
- this.textBox_Address = new System.Windows.Forms.TextBox();
- this.textBox_City = new System.Windows.Forms.TextBox();
- this.textBox_Province = new System.Windows.Forms.TextBox();
- this.textBox_CompanyName = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.radioButton2 = new System.Windows.Forms.RadioButton();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.radioButton1 = new System.Windows.Forms.RadioButton();
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.label15 = new System.Windows.Forms.Label();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.label14 = new System.Windows.Forms.Label();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.label13 = new System.Windows.Forms.Label();
- this.listView1 = new System.Windows.Forms.ListView();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.label12 = new System.Windows.Forms.Label();
- this.label11 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.textBox_Interface = new System.Windows.Forms.TextBox();
- this.textBox_Camera = new System.Windows.Forms.TextBox();
- this.textBox_SN = new System.Windows.Forms.TextBox();
- this.textBox_Model = new System.Windows.Forms.TextBox();
- this.groupBox11 = new System.Windows.Forms.GroupBox();
- this.checkBox9 = new System.Windows.Forms.CheckBox();
- this.checkBox8 = new System.Windows.Forms.CheckBox();
- this.listView3 = new System.Windows.Forms.ListView();
- this.label21 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.label24 = new System.Windows.Forms.Label();
- this.label25 = new System.Windows.Forms.Label();
- this.panel1 = new System.Windows.Forms.Panel();
- this.radioButton7 = new System.Windows.Forms.RadioButton();
- this.radioButton6 = new System.Windows.Forms.RadioButton();
- this.panel2 = new System.Windows.Forms.Panel();
- this.radioButton8 = new System.Windows.Forms.RadioButton();
- this.radioButton9 = new System.Windows.Forms.RadioButton();
- this.panel3 = new System.Windows.Forms.Panel();
- this.radioButton10 = new System.Windows.Forms.RadioButton();
- this.radioButton11 = new System.Windows.Forms.RadioButton();
- this.panel4 = new System.Windows.Forms.Panel();
- this.radioButton12 = new System.Windows.Forms.RadioButton();
- this.radioButton13 = new System.Windows.Forms.RadioButton();
- this.panel5 = new System.Windows.Forms.Panel();
- this.radioButton14 = new System.Windows.Forms.RadioButton();
- this.radioButton15 = new System.Windows.Forms.RadioButton();
- this.groupBox15 = new System.Windows.Forms.GroupBox();
- this.groupBox16 = new System.Windows.Forms.GroupBox();
- this.panel6 = new System.Windows.Forms.Button();
- this.label28 = new System.Windows.Forms.Label();
- this.label27 = new System.Windows.Forms.Label();
- this.label26 = new System.Windows.Forms.Label();
- this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
- this.comboBox2 = new System.Windows.Forms.ComboBox();
- this.button17 = new System.Windows.Forms.Button();
- this.button16 = new System.Windows.Forms.Button();
- this.button15 = new System.Windows.Forms.Button();
- this.button14 = new System.Windows.Forms.Button();
- this.groupBox13 = new System.Windows.Forms.GroupBox();
- this.button19 = new System.Windows.Forms.Button();
- this.button18 = new System.Windows.Forms.Button();
- this.groupBox14 = new System.Windows.Forms.GroupBox();
- this.groupBox17 = new System.Windows.Forms.GroupBox();
- this.button20 = new System.Windows.Forms.Button();
- this.button21 = new System.Windows.Forms.Button();
- this.groupBox18 = new System.Windows.Forms.GroupBox();
- this.button22 = new System.Windows.Forms.Button();
- this.groupBox19 = new System.Windows.Forms.GroupBox();
- this.btn_Del = new System.Windows.Forms.Button();
- this.comboBox_Name = new System.Windows.Forms.ComboBox();
- this.label29 = new System.Windows.Forms.Label();
- this.label30 = new System.Windows.Forms.Label();
- this.label31 = new System.Windows.Forms.Label();
- this.textBox7 = new System.Windows.Forms.TextBox();
- this.textBox8 = new System.Windows.Forms.TextBox();
- this.groupBox1.SuspendLayout();
- this.groupBox8.SuspendLayout();
- this.groupBox7.SuspendLayout();
- this.groupBoxCaptureSave.SuspendLayout();
- this.groupBox10.SuspendLayout();
- this.groupBox6.SuspendLayout();
- this.groupBox9.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- this.groupBox2.SuspendLayout();
- this.groupBox12.SuspendLayout();
- this.groupBox3.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
- this.groupBox5.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.groupBox11.SuspendLayout();
- this.panel1.SuspendLayout();
- this.panel2.SuspendLayout();
- this.panel3.SuspendLayout();
- this.panel4.SuspendLayout();
- this.panel5.SuspendLayout();
- this.groupBox15.SuspendLayout();
- this.groupBox16.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
- this.groupBox13.SuspendLayout();
- this.groupBox14.SuspendLayout();
- this.groupBox17.SuspendLayout();
- this.groupBox18.SuspendLayout();
- this.groupBox19.SuspendLayout();
- this.SuspendLayout();
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.listBox1);
- this.groupBox1.Location = new System.Drawing.Point(6, 13);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(105, 531);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "类型";
- //
- // listBox1
- //
- this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
- this.listBox1.FormattingEnabled = true;
- this.listBox1.ItemHeight = 30;
- this.listBox1.Location = new System.Drawing.Point(3, 17);
- this.listBox1.Name = "listBox1";
- this.listBox1.Size = new System.Drawing.Size(99, 511);
- this.listBox1.TabIndex = 0;
- this.listBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
- this.listBox1.SelectedValueChanged += new System.EventHandler(this.listBox1_SelectedValueChanged);
- //
- // groupBox8
- //
- this.groupBox8.Controls.Add(this.radioButton5);
- this.groupBox8.Controls.Add(this.radioButton4);
- this.groupBox8.Controls.Add(this.label16);
- this.groupBox8.Controls.Add(this.radioButton3);
- this.groupBox8.Location = new System.Drawing.Point(117, 74);
- this.groupBox8.Name = "groupBox8";
- this.groupBox8.Size = new System.Drawing.Size(394, 470);
- this.groupBox8.TabIndex = 38;
- this.groupBox8.TabStop = false;
- this.groupBox8.Text = "信息";
- //
- // radioButton5
- //
- this.radioButton5.AutoSize = true;
- this.radioButton5.Location = new System.Drawing.Point(130, 66);
- this.radioButton5.Name = "radioButton5";
- this.radioButton5.Size = new System.Drawing.Size(47, 16);
- this.radioButton5.TabIndex = 8;
- this.radioButton5.TabStop = true;
- this.radioButton5.Text = "英文";
- this.radioButton5.UseVisualStyleBackColor = true;
- //
- // radioButton4
- //
- this.radioButton4.AutoSize = true;
- this.radioButton4.Location = new System.Drawing.Point(130, 98);
- this.radioButton4.Name = "radioButton4";
- this.radioButton4.Size = new System.Drawing.Size(47, 16);
- this.radioButton4.TabIndex = 7;
- this.radioButton4.TabStop = true;
- this.radioButton4.Text = "德文";
- this.radioButton4.UseVisualStyleBackColor = true;
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(17, 34);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(65, 12);
- this.label16.TabIndex = 6;
- this.label16.Text = "切换语言:";
- //
- // radioButton3
- //
- this.radioButton3.AutoSize = true;
- this.radioButton3.Location = new System.Drawing.Point(130, 32);
- this.radioButton3.Name = "radioButton3";
- this.radioButton3.Size = new System.Drawing.Size(47, 16);
- this.radioButton3.TabIndex = 0;
- this.radioButton3.TabStop = true;
- this.radioButton3.Text = "中文";
- this.radioButton3.UseVisualStyleBackColor = true;
- //
- // groupBox7
- //
- this.groupBox7.Controls.Add(this.label17);
- this.groupBox7.Controls.Add(this.checkBox6);
- this.groupBox7.Controls.Add(this.checkBox5);
- this.groupBox7.Controls.Add(this.checkBox4);
- this.groupBox7.Controls.Add(this.checkBox3);
- this.groupBox7.Controls.Add(this.checkBox2);
- this.groupBox7.Controls.Add(this.checkBox1);
- this.groupBox7.Location = new System.Drawing.Point(117, 74);
- this.groupBox7.Name = "groupBox7";
- this.groupBox7.Size = new System.Drawing.Size(394, 470);
- this.groupBox7.TabIndex = 20;
- this.groupBox7.TabStop = false;
- this.groupBox7.Text = "信息";
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.ForeColor = System.Drawing.Color.Red;
- this.label17.Location = new System.Drawing.Point(15, 226);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(269, 12);
- this.label17.TabIndex = 16;
- this.label17.Text = "注意:进行初始化前,请确保软件打开窗口均关闭";
- //
- // checkBox6
- //
- this.checkBox6.AutoSize = true;
- this.checkBox6.Location = new System.Drawing.Point(17, 194);
- this.checkBox6.Name = "checkBox6";
- this.checkBox6.Size = new System.Drawing.Size(120, 16);
- this.checkBox6.TabIndex = 16;
- this.checkBox6.Text = "快捷键功能初始化";
- this.checkBox6.UseVisualStyleBackColor = true;
- //
- // checkBox5
- //
- this.checkBox5.AutoSize = true;
- this.checkBox5.Location = new System.Drawing.Point(17, 162);
- this.checkBox5.Name = "checkBox5";
- this.checkBox5.Size = new System.Drawing.Size(96, 16);
- this.checkBox5.TabIndex = 16;
- this.checkBox5.Text = "工具栏初始化";
- this.checkBox5.UseVisualStyleBackColor = true;
- //
- // checkBox4
- //
- this.checkBox4.AutoSize = true;
- this.checkBox4.Location = new System.Drawing.Point(17, 130);
- this.checkBox4.Name = "checkBox4";
- this.checkBox4.Size = new System.Drawing.Size(120, 16);
- this.checkBox4.TabIndex = 16;
- this.checkBox4.Text = "快捷栏功能初始化";
- this.checkBox4.UseVisualStyleBackColor = true;
- //
- // checkBox3
- //
- this.checkBox3.AutoSize = true;
- this.checkBox3.Location = new System.Drawing.Point(17, 98);
- this.checkBox3.Name = "checkBox3";
- this.checkBox3.Size = new System.Drawing.Size(102, 16);
- this.checkBox3.TabIndex = 16;
- this.checkBox3.Text = "log信息初始化";
- this.checkBox3.UseVisualStyleBackColor = true;
- //
- // checkBox2
- //
- this.checkBox2.AutoSize = true;
- this.checkBox2.Location = new System.Drawing.Point(17, 66);
- this.checkBox2.Name = "checkBox2";
- this.checkBox2.Size = new System.Drawing.Size(132, 16);
- this.checkBox2.TabIndex = 16;
- this.checkBox2.Text = "测量信息配置初始化";
- this.checkBox2.UseVisualStyleBackColor = true;
- //
- // checkBox1
- //
- this.checkBox1.AutoSize = true;
- this.checkBox1.Location = new System.Drawing.Point(17, 34);
- this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(132, 16);
- this.checkBox1.TabIndex = 16;
- this.checkBox1.Text = "标注信息配置初始化";
- this.checkBox1.UseVisualStyleBackColor = true;
- //
- // groupBoxCaptureSave
- //
- this.groupBoxCaptureSave.Controls.Add(this.ckbSaveAndOpen);
- this.groupBoxCaptureSave.Controls.Add(this.ckbSave);
- this.groupBoxCaptureSave.Location = new System.Drawing.Point(117, 73);
- this.groupBoxCaptureSave.Name = "groupBoxCaptureSave";
- this.groupBoxCaptureSave.Size = new System.Drawing.Size(394, 470);
- this.groupBoxCaptureSave.TabIndex = 21;
- this.groupBoxCaptureSave.TabStop = false;
- this.groupBoxCaptureSave.Text = "拍照保存";
- //
- // ckbSaveAndOpen
- //
- this.ckbSaveAndOpen.AutoSize = true;
- this.ckbSaveAndOpen.Location = new System.Drawing.Point(40, 63);
- this.ckbSaveAndOpen.Name = "ckbSaveAndOpen";
- this.ckbSaveAndOpen.Size = new System.Drawing.Size(144, 16);
- this.ckbSaveAndOpen.TabIndex = 0;
- this.ckbSaveAndOpen.Text = "保存后打开图片到软件";
- this.ckbSaveAndOpen.UseVisualStyleBackColor = true;
- //
- // ckbSave
- //
- this.ckbSave.AutoSize = true;
- this.ckbSave.Location = new System.Drawing.Point(20, 36);
- this.ckbSave.Name = "ckbSave";
- this.ckbSave.Size = new System.Drawing.Size(84, 16);
- this.ckbSave.TabIndex = 0;
- this.ckbSave.Text = "保存到硬盘";
- this.ckbSave.UseVisualStyleBackColor = true;
- //
- // groupBox10
- //
- this.groupBox10.Controls.Add(this.button8);
- this.groupBox10.Controls.Add(this.textBox6);
- this.groupBox10.Controls.Add(this.button7);
- this.groupBox10.Controls.Add(this.textBox5);
- this.groupBox10.Controls.Add(this.button6);
- this.groupBox10.Controls.Add(this.textBox4);
- this.groupBox10.Controls.Add(this.label20);
- this.groupBox10.Controls.Add(this.label19);
- this.groupBox10.Controls.Add(this.label18);
- this.groupBox10.Location = new System.Drawing.Point(117, 188);
- this.groupBox10.Name = "groupBox10";
- this.groupBox10.Size = new System.Drawing.Size(394, 171);
- this.groupBox10.TabIndex = 30;
- this.groupBox10.TabStop = false;
- this.groupBox10.Text = "存档文件保存路径";
- //
- // button8
- //
- this.button8.Location = new System.Drawing.Point(313, 95);
- this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(75, 21);
- this.button8.TabIndex = 16;
- this.button8.Text = "选择文件夹";
- this.button8.UseVisualStyleBackColor = true;
- this.button8.Click += new System.EventHandler(this.button8_Click);
- //
- // textBox6
- //
- this.textBox6.Location = new System.Drawing.Point(87, 95);
- this.textBox6.Name = "textBox6";
- this.textBox6.ReadOnly = true;
- this.textBox6.Size = new System.Drawing.Size(209, 21);
- this.textBox6.TabIndex = 15;
- //
- // button7
- //
- this.button7.Location = new System.Drawing.Point(313, 63);
- this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(75, 21);
- this.button7.TabIndex = 14;
- this.button7.Text = "选择文件夹";
- this.button7.UseVisualStyleBackColor = true;
- this.button7.Click += new System.EventHandler(this.button7_Click);
- //
- // textBox5
- //
- this.textBox5.Location = new System.Drawing.Point(87, 63);
- this.textBox5.Name = "textBox5";
- this.textBox5.ReadOnly = true;
- this.textBox5.Size = new System.Drawing.Size(209, 21);
- this.textBox5.TabIndex = 13;
- //
- // button6
- //
- this.button6.Location = new System.Drawing.Point(313, 30);
- this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(75, 21);
- this.button6.TabIndex = 12;
- this.button6.Text = "选择文件夹";
- this.button6.UseVisualStyleBackColor = true;
- this.button6.Click += new System.EventHandler(this.button6_Click);
- //
- // textBox4
- //
- this.textBox4.Location = new System.Drawing.Point(87, 30);
- this.textBox4.Name = "textBox4";
- this.textBox4.ReadOnly = true;
- this.textBox4.Size = new System.Drawing.Size(209, 21);
- this.textBox4.TabIndex = 11;
- //
- // label20
- //
- this.label20.AutoSize = true;
- this.label20.Location = new System.Drawing.Point(18, 98);
- this.label20.Name = "label20";
- this.label20.Size = new System.Drawing.Size(65, 12);
- this.label20.TabIndex = 7;
- this.label20.Text = "专用分析:";
- //
- // label19
- //
- this.label19.AutoSize = true;
- this.label19.Location = new System.Drawing.Point(17, 66);
- this.label19.Name = "label19";
- this.label19.Size = new System.Drawing.Size(65, 12);
- this.label19.TabIndex = 6;
- this.label19.Text = "通用分析:";
- //
- // label18
- //
- this.label18.AutoSize = true;
- this.label18.Location = new System.Drawing.Point(17, 34);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(65, 12);
- this.label18.TabIndex = 5;
- this.label18.Text = "常规操作:";
- //
- // groupBox6
- //
- this.groupBox6.Controls.Add(this.listView2);
- this.groupBox6.Location = new System.Drawing.Point(117, 74);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(394, 471);
- this.groupBox6.TabIndex = 25;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "点距列表";
- //
- // listView2
- //
- this.listView2.FullRowSelect = true;
- this.listView2.HideSelection = false;
- this.listView2.Location = new System.Drawing.Point(6, 20);
- this.listView2.MultiSelect = false;
- this.listView2.Name = "listView2";
- this.listView2.Size = new System.Drawing.Size(382, 441);
- this.listView2.TabIndex = 24;
- this.listView2.UseCompatibleStateImageBehavior = false;
- this.listView2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView2_DoubleClick);
- //
- // groupBox9
- //
- this.groupBox9.Controls.Add(this.button10);
- this.groupBox9.Controls.Add(this.button9);
- this.groupBox9.Controls.Add(this.pictureBox1);
- this.groupBox9.Controls.Add(this.checkBox7);
- this.groupBox9.Location = new System.Drawing.Point(117, 74);
- this.groupBox9.Name = "groupBox9";
- this.groupBox9.Size = new System.Drawing.Size(394, 108);
- this.groupBox9.TabIndex = 45;
- this.groupBox9.TabStop = false;
- this.groupBox9.Text = "启动图像";
- //
- // button10
- //
- this.button10.Location = new System.Drawing.Point(232, 43);
- this.button10.Name = "button10";
- this.button10.Size = new System.Drawing.Size(75, 23);
- this.button10.TabIndex = 10;
- this.button10.Text = "删除";
- this.button10.UseVisualStyleBackColor = true;
- this.button10.Click += new System.EventHandler(this.button10_Click);
- //
- // button9
- //
- this.button9.Font = new System.Drawing.Font("宋体", 25F);
- this.button9.Location = new System.Drawing.Point(98, 14);
- this.button9.Name = "button9";
- this.button9.Size = new System.Drawing.Size(80, 80);
- this.button9.TabIndex = 9;
- this.button9.Text = "+";
- this.button9.UseVisualStyleBackColor = true;
- this.button9.Click += new System.EventHandler(this.button9_Click);
- //
- // pictureBox1
- //
- this.pictureBox1.Location = new System.Drawing.Point(98, 14);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(80, 80);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pictureBox1.TabIndex = 8;
- this.pictureBox1.TabStop = false;
- //
- // checkBox7
- //
- this.checkBox7.AutoSize = true;
- this.checkBox7.Location = new System.Drawing.Point(8, 46);
- this.checkBox7.Name = "checkBox7";
- this.checkBox7.Size = new System.Drawing.Size(84, 16);
- this.checkBox7.TabIndex = 6;
- this.checkBox7.Text = "启动图像:";
- this.checkBox7.UseVisualStyleBackColor = true;
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.btn_SaveAs);
- this.groupBox2.Controls.Add(this.btn_Save);
- this.groupBox2.Controls.Add(this.button2);
- this.groupBox2.Controls.Add(this.button1);
- this.groupBox2.Location = new System.Drawing.Point(117, 13);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(394, 58);
- this.groupBox2.TabIndex = 2;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "操作";
- //
- // btn_SaveAs
- //
- this.btn_SaveAs.Location = new System.Drawing.Point(232, 20);
- this.btn_SaveAs.Name = "btn_SaveAs";
- this.btn_SaveAs.Size = new System.Drawing.Size(75, 23);
- this.btn_SaveAs.TabIndex = 3;
- this.btn_SaveAs.Text = "另存为";
- this.btn_SaveAs.UseVisualStyleBackColor = true;
- this.btn_SaveAs.Click += new System.EventHandler(this.btn_SaveAs_Click);
- //
- // btn_Save
- //
- this.btn_Save.Location = new System.Drawing.Point(152, 20);
- this.btn_Save.Name = "btn_Save";
- this.btn_Save.Size = new System.Drawing.Size(75, 23);
- this.btn_Save.TabIndex = 2;
- this.btn_Save.Text = "保存";
- this.btn_Save.UseVisualStyleBackColor = true;
- this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(313, 20);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(75, 23);
- this.button2.TabIndex = 1;
- this.button2.Text = "取消";
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(233, 20);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(75, 23);
- this.button1.TabIndex = 0;
- this.button1.Text = "确定";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // groupBox12
- //
- this.groupBox12.Controls.Add(this.button13);
- this.groupBox12.Controls.Add(this.button5);
- this.groupBox12.Controls.Add(this.button4);
- this.groupBox12.Controls.Add(this.button3);
- this.groupBox12.Location = new System.Drawing.Point(117, 12);
- this.groupBox12.Name = "groupBox12";
- this.groupBox12.Size = new System.Drawing.Size(394, 59);
- this.groupBox12.TabIndex = 35;
- this.groupBox12.TabStop = false;
- this.groupBox12.Text = "操作";
- //
- // button13
- //
- this.button13.Location = new System.Drawing.Point(232, 21);
- this.button13.Name = "button13";
- this.button13.Size = new System.Drawing.Size(75, 23);
- this.button13.TabIndex = 13;
- this.button13.Text = "应用";
- this.button13.UseVisualStyleBackColor = true;
- this.button13.Click += new System.EventHandler(this.button13_Click);
- //
- // button5
- //
- this.button5.Location = new System.Drawing.Point(151, 21);
- this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(75, 23);
- this.button5.TabIndex = 10;
- this.button5.Text = "编辑";
- this.button5.UseVisualStyleBackColor = true;
- this.button5.Click += new System.EventHandler(this.button5_Click);
- //
- // button4
- //
- this.button4.Location = new System.Drawing.Point(70, 21);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(75, 23);
- this.button4.TabIndex = 9;
- this.button4.Text = "新建";
- this.button4.UseVisualStyleBackColor = true;
- this.button4.Click += new System.EventHandler(this.button4_Click);
- //
- // button3
- //
- this.button3.Location = new System.Drawing.Point(311, 21);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(75, 23);
- this.button3.TabIndex = 8;
- this.button3.Text = "删除";
- this.button3.UseVisualStyleBackColor = true;
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.pictureBox2);
- this.groupBox3.Controls.Add(this.button12);
- this.groupBox3.Controls.Add(this.button11);
- this.groupBox3.Controls.Add(this.label8);
- this.groupBox3.Controls.Add(this.label7);
- this.groupBox3.Controls.Add(this.label6);
- this.groupBox3.Controls.Add(this.label5);
- this.groupBox3.Controls.Add(this.label4);
- this.groupBox3.Controls.Add(this.label3);
- this.groupBox3.Controls.Add(this.label2);
- this.groupBox3.Controls.Add(this.textBox_Email);
- this.groupBox3.Controls.Add(this.textBox_Phone);
- this.groupBox3.Controls.Add(this.textBox_Contact);
- this.groupBox3.Controls.Add(this.textBox_Address);
- this.groupBox3.Controls.Add(this.textBox_City);
- this.groupBox3.Controls.Add(this.textBox_Province);
- this.groupBox3.Controls.Add(this.textBox_CompanyName);
- this.groupBox3.Controls.Add(this.label1);
- this.groupBox3.Location = new System.Drawing.Point(117, 74);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(394, 276);
- this.groupBox3.TabIndex = 35;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "用户信息";
- //
- // pictureBox2
- //
- this.pictureBox2.Location = new System.Drawing.Point(280, 157);
- this.pictureBox2.Name = "pictureBox2";
- this.pictureBox2.Size = new System.Drawing.Size(36, 36);
- this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pictureBox2.TabIndex = 17;
- this.pictureBox2.TabStop = false;
- //
- // button12
- //
- this.button12.Location = new System.Drawing.Point(322, 162);
- this.button12.Name = "button12";
- this.button12.Size = new System.Drawing.Size(45, 21);
- this.button12.TabIndex = 16;
- this.button12.Text = "删除";
- this.button12.UseVisualStyleBackColor = true;
- this.button12.Click += new System.EventHandler(this.button12_Click);
- //
- // button11
- //
- this.button11.Font = new System.Drawing.Font("宋体", 15F);
- this.button11.Location = new System.Drawing.Point(280, 158);
- this.button11.Name = "button11";
- this.button11.Size = new System.Drawing.Size(36, 36);
- this.button11.TabIndex = 15;
- this.button11.Text = "+";
- this.button11.UseVisualStyleBackColor = true;
- this.button11.Click += new System.EventHandler(this.button11_Click);
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(225, 162);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(41, 12);
- this.label8.TabIndex = 14;
- this.label8.Text = "logo:";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(30, 162);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(41, 12);
- this.label7.TabIndex = 13;
- this.label7.Text = "邮件:";
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(225, 130);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(41, 12);
- this.label6.TabIndex = 12;
- this.label6.Text = "电话:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(18, 130);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(53, 12);
- this.label5.TabIndex = 11;
- this.label5.Text = "联系人:";
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(30, 98);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(41, 12);
- this.label4.TabIndex = 10;
- this.label4.Text = "地址:";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(225, 66);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(41, 12);
- this.label3.TabIndex = 9;
- this.label3.Text = "城市:";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Cursor = System.Windows.Forms.Cursors.Default;
- this.label2.Location = new System.Drawing.Point(30, 66);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(41, 12);
- this.label2.TabIndex = 8;
- this.label2.Text = "省份:";
- //
- // textBox_Email
- //
- this.textBox_Email.Location = new System.Drawing.Point(77, 158);
- this.textBox_Email.Name = "textBox_Email";
- this.textBox_Email.Size = new System.Drawing.Size(140, 21);
- this.textBox_Email.TabIndex = 7;
- //
- // textBox_Phone
- //
- this.textBox_Phone.Location = new System.Drawing.Point(277, 126);
- this.textBox_Phone.Name = "textBox_Phone";
- this.textBox_Phone.Size = new System.Drawing.Size(111, 21);
- this.textBox_Phone.TabIndex = 6;
- //
- // textBox_Contact
- //
- this.textBox_Contact.Location = new System.Drawing.Point(77, 126);
- this.textBox_Contact.Name = "textBox_Contact";
- this.textBox_Contact.Size = new System.Drawing.Size(140, 21);
- this.textBox_Contact.TabIndex = 5;
- //
- // textBox_Address
- //
- this.textBox_Address.Location = new System.Drawing.Point(77, 94);
- this.textBox_Address.Name = "textBox_Address";
- this.textBox_Address.Size = new System.Drawing.Size(311, 21);
- this.textBox_Address.TabIndex = 4;
- //
- // textBox_City
- //
- this.textBox_City.Location = new System.Drawing.Point(277, 62);
- this.textBox_City.Name = "textBox_City";
- this.textBox_City.Size = new System.Drawing.Size(111, 21);
- this.textBox_City.TabIndex = 3;
- //
- // textBox_Province
- //
- this.textBox_Province.Location = new System.Drawing.Point(77, 62);
- this.textBox_Province.Name = "textBox_Province";
- this.textBox_Province.Size = new System.Drawing.Size(140, 21);
- this.textBox_Province.TabIndex = 2;
- //
- // textBox_CompanyName
- //
- this.textBox_CompanyName.Location = new System.Drawing.Point(77, 30);
- this.textBox_CompanyName.Name = "textBox_CompanyName";
- this.textBox_CompanyName.Size = new System.Drawing.Size(311, 21);
- this.textBox_CompanyName.TabIndex = 1;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(6, 34);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(65, 12);
- this.label1.TabIndex = 0;
- this.label1.Text = "单位名称:";
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.textBox8);
- this.groupBox5.Controls.Add(this.textBox7);
- this.groupBox5.Controls.Add(this.label31);
- this.groupBox5.Controls.Add(this.label30);
- this.groupBox5.Controls.Add(this.radioButton2);
- this.groupBox5.Controls.Add(this.textBox3);
- this.groupBox5.Controls.Add(this.radioButton1);
- this.groupBox5.Controls.Add(this.comboBox1);
- this.groupBox5.Controls.Add(this.label15);
- this.groupBox5.Controls.Add(this.textBox2);
- this.groupBox5.Controls.Add(this.label14);
- this.groupBox5.Controls.Add(this.textBox1);
- this.groupBox5.Controls.Add(this.label13);
- this.groupBox5.Controls.Add(this.listView1);
- this.groupBox5.Location = new System.Drawing.Point(117, 136);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(394, 408);
- this.groupBox5.TabIndex = 1;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "信息";
- //
- // radioButton2
- //
- this.radioButton2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.radioButton2.AutoSize = true;
- this.radioButton2.Location = new System.Drawing.Point(9, 89);
- this.radioButton2.Name = "radioButton2";
- this.radioButton2.Size = new System.Drawing.Size(47, 16);
- this.radioButton2.TabIndex = 11;
- this.radioButton2.TabStop = true;
- this.radioButton2.Text = "重置";
- this.radioButton2.UseVisualStyleBackColor = true;
- this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
- //
- // textBox3
- //
- this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox3.Location = new System.Drawing.Point(77, 65);
- this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(108, 21);
- this.textBox3.TabIndex = 10;
- //
- // radioButton1
- //
- this.radioButton1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.radioButton1.AutoSize = true;
- this.radioButton1.Location = new System.Drawing.Point(9, 67);
- this.radioButton1.Name = "radioButton1";
- this.radioButton1.Size = new System.Drawing.Size(47, 16);
- this.radioButton1.TabIndex = 9;
- this.radioButton1.TabStop = true;
- this.radioButton1.Text = "延续";
- this.radioButton1.UseVisualStyleBackColor = true;
- this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
- //
- // comboBox1
- //
- this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Location = new System.Drawing.Point(77, 41);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(108, 20);
- this.comboBox1.TabIndex = 8;
- //
- // label15
- //
- this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(9, 45);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(65, 12);
- this.label15.TabIndex = 5;
- this.label15.Text = "数值位数:";
- //
- // textBox2
- //
- this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox2.Location = new System.Drawing.Point(280, 15);
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(108, 21);
- this.textBox2.TabIndex = 4;
- //
- // label14
- //
- this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(205, 20);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(65, 12);
- this.label14.TabIndex = 3;
- this.label14.Text = "名称格式:";
- //
- // textBox1
- //
- this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox1.Location = new System.Drawing.Point(77, 16);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(108, 21);
- this.textBox1.TabIndex = 2;
- //
- // label13
- //
- this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(33, 21);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(41, 12);
- this.label13.TabIndex = 1;
- this.label13.Text = "文本:";
- //
- // listView1
- //
- this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.listView1.GridLines = true;
- this.listView1.HideSelection = false;
- this.listView1.Location = new System.Drawing.Point(8, 124);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(380, 275);
- this.listView1.TabIndex = 12;
- this.listView1.UseCompatibleStateImageBehavior = false;
- this.listView1.View = System.Windows.Forms.View.Details;
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.label12);
- this.groupBox4.Controls.Add(this.label11);
- this.groupBox4.Controls.Add(this.label10);
- this.groupBox4.Controls.Add(this.label9);
- this.groupBox4.Controls.Add(this.textBox_Interface);
- this.groupBox4.Controls.Add(this.textBox_Camera);
- this.groupBox4.Controls.Add(this.textBox_SN);
- this.groupBox4.Controls.Add(this.textBox_Model);
- this.groupBox4.Location = new System.Drawing.Point(117, 359);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(394, 185);
- this.groupBox4.TabIndex = 30;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "显微镜信息";
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(30, 130);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(41, 12);
- this.label12.TabIndex = 7;
- this.label12.Text = "接口:";
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(18, 98);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 6;
- this.label11.Text = "摄像头:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(30, 66);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(41, 12);
- this.label10.TabIndex = 5;
- this.label10.Text = "SN码:";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(30, 34);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(41, 12);
- this.label9.TabIndex = 4;
- this.label9.Text = "型号:";
- //
- // textBox_Interface
- //
- this.textBox_Interface.Location = new System.Drawing.Point(77, 126);
- this.textBox_Interface.Name = "textBox_Interface";
- this.textBox_Interface.Size = new System.Drawing.Size(311, 21);
- this.textBox_Interface.TabIndex = 3;
- //
- // textBox_Camera
- //
- this.textBox_Camera.Location = new System.Drawing.Point(77, 94);
- this.textBox_Camera.Name = "textBox_Camera";
- this.textBox_Camera.Size = new System.Drawing.Size(311, 21);
- this.textBox_Camera.TabIndex = 2;
- //
- // textBox_SN
- //
- this.textBox_SN.Location = new System.Drawing.Point(77, 62);
- this.textBox_SN.Name = "textBox_SN";
- this.textBox_SN.Size = new System.Drawing.Size(311, 21);
- this.textBox_SN.TabIndex = 1;
- //
- // textBox_Model
- //
- this.textBox_Model.Location = new System.Drawing.Point(77, 30);
- this.textBox_Model.Name = "textBox_Model";
- this.textBox_Model.Size = new System.Drawing.Size(311, 21);
- this.textBox_Model.TabIndex = 0;
- //
- // groupBox11
- //
- this.groupBox11.Controls.Add(this.checkBox9);
- this.groupBox11.Controls.Add(this.checkBox8);
- this.groupBox11.Location = new System.Drawing.Point(117, 367);
- this.groupBox11.Name = "groupBox11";
- this.groupBox11.Size = new System.Drawing.Size(394, 177);
- this.groupBox11.TabIndex = 40;
- this.groupBox11.TabStop = false;
- this.groupBox11.Text = "其他";
- //
- // checkBox9
- //
- this.checkBox9.AutoSize = true;
- this.checkBox9.Location = new System.Drawing.Point(8, 66);
- this.checkBox9.Name = "checkBox9";
- this.checkBox9.Size = new System.Drawing.Size(156, 16);
- this.checkBox9.TabIndex = 8;
- this.checkBox9.Text = "自动添加AxioVision标尺";
- this.checkBox9.UseVisualStyleBackColor = true;
- //
- // checkBox8
- //
- this.checkBox8.AutoSize = true;
- this.checkBox8.Location = new System.Drawing.Point(8, 34);
- this.checkBox8.Name = "checkBox8";
- this.checkBox8.Size = new System.Drawing.Size(114, 16);
- this.checkBox8.TabIndex = 7;
- this.checkBox8.Text = "自动添加ZEN标尺";
- this.checkBox8.UseVisualStyleBackColor = true;
- //
- // listView3
- //
- this.listView3.FullRowSelect = true;
- this.listView3.GridLines = true;
- this.listView3.HideSelection = false;
- this.listView3.Location = new System.Drawing.Point(117, 73);
- this.listView3.MultiSelect = false;
- this.listView3.Name = "listView3";
- this.listView3.Size = new System.Drawing.Size(394, 471);
- this.listView3.TabIndex = 46;
- this.listView3.UseCompatibleStateImageBehavior = false;
- this.listView3.Click += new System.EventHandler(this.listView1_SelectedIndexChanged);
- //
- // label21
- //
- this.label21.AutoSize = true;
- this.label21.Location = new System.Drawing.Point(12, 44);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(83, 12);
- this.label21.TabIndex = 10;
- this.label21.Text = "Z轴运动方向:";
- //
- // label22
- //
- this.label22.AutoSize = true;
- this.label22.Location = new System.Drawing.Point(12, 117);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(95, 12);
- this.label22.TabIndex = 11;
- this.label22.Text = "Y轴运动方向:左";
- //
- // label23
- //
- this.label23.AutoSize = true;
- this.label23.Location = new System.Drawing.Point(239, 117);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(17, 12);
- this.label23.TabIndex = 12;
- this.label23.Text = "右";
- //
- // label24
- //
- this.label24.AutoSize = true;
- this.label24.Location = new System.Drawing.Point(239, 82);
- this.label24.Name = "label24";
- this.label24.Size = new System.Drawing.Size(17, 12);
- this.label24.TabIndex = 13;
- this.label24.Text = "右";
- //
- // label25
- //
- this.label25.AutoSize = true;
- this.label25.Location = new System.Drawing.Point(12, 82);
- this.label25.Name = "label25";
- this.label25.Size = new System.Drawing.Size(95, 12);
- this.label25.TabIndex = 14;
- this.label25.Text = "X轴运动方向:左";
- //
- // panel1
- //
- this.panel1.Controls.Add(this.radioButton7);
- this.panel1.Controls.Add(this.radioButton6);
- this.panel1.Location = new System.Drawing.Point(101, 39);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(84, 24);
- this.panel1.TabIndex = 16;
- //
- // radioButton7
- //
- this.radioButton7.AutoSize = true;
- this.radioButton7.Location = new System.Drawing.Point(43, 3);
- this.radioButton7.Name = "radioButton7";
- this.radioButton7.Size = new System.Drawing.Size(35, 16);
- this.radioButton7.TabIndex = 1;
- this.radioButton7.TabStop = true;
- this.radioButton7.Text = "下";
- this.radioButton7.UseVisualStyleBackColor = true;
- //
- // radioButton6
- //
- this.radioButton6.AutoSize = true;
- this.radioButton6.Location = new System.Drawing.Point(3, 3);
- this.radioButton6.Name = "radioButton6";
- this.radioButton6.Size = new System.Drawing.Size(35, 16);
- this.radioButton6.TabIndex = 0;
- this.radioButton6.TabStop = true;
- this.radioButton6.Text = "上";
- this.radioButton6.UseVisualStyleBackColor = true;
- //
- // panel2
- //
- this.panel2.Controls.Add(this.radioButton8);
- this.panel2.Controls.Add(this.radioButton9);
- this.panel2.Location = new System.Drawing.Point(144, 75);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(84, 24);
- this.panel2.TabIndex = 17;
- //
- // radioButton8
- //
- this.radioButton8.AutoSize = true;
- this.radioButton8.Location = new System.Drawing.Point(5, 5);
- this.radioButton8.Name = "radioButton8";
- this.radioButton8.Size = new System.Drawing.Size(35, 16);
- this.radioButton8.TabIndex = 3;
- this.radioButton8.TabStop = true;
- this.radioButton8.Text = "正";
- this.radioButton8.UseVisualStyleBackColor = true;
- //
- // radioButton9
- //
- this.radioButton9.AutoSize = true;
- this.radioButton9.Location = new System.Drawing.Point(44, 5);
- this.radioButton9.Name = "radioButton9";
- this.radioButton9.Size = new System.Drawing.Size(35, 16);
- this.radioButton9.TabIndex = 2;
- this.radioButton9.TabStop = true;
- this.radioButton9.Text = "负";
- this.radioButton9.UseVisualStyleBackColor = true;
- //
- // panel3
- //
- this.panel3.Controls.Add(this.radioButton10);
- this.panel3.Controls.Add(this.radioButton11);
- this.panel3.Location = new System.Drawing.Point(273, 76);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(82, 23);
- this.panel3.TabIndex = 18;
- //
- // radioButton10
- //
- this.radioButton10.AutoSize = true;
- this.radioButton10.Location = new System.Drawing.Point(5, 4);
- this.radioButton10.Name = "radioButton10";
- this.radioButton10.Size = new System.Drawing.Size(35, 16);
- this.radioButton10.TabIndex = 5;
- this.radioButton10.TabStop = true;
- this.radioButton10.Text = "正";
- this.radioButton10.UseVisualStyleBackColor = true;
- //
- // radioButton11
- //
- this.radioButton11.AutoSize = true;
- this.radioButton11.Location = new System.Drawing.Point(44, 4);
- this.radioButton11.Name = "radioButton11";
- this.radioButton11.Size = new System.Drawing.Size(35, 16);
- this.radioButton11.TabIndex = 4;
- this.radioButton11.TabStop = true;
- this.radioButton11.Text = "负";
- this.radioButton11.UseVisualStyleBackColor = true;
- //
- // panel4
- //
- this.panel4.Controls.Add(this.radioButton12);
- this.panel4.Controls.Add(this.radioButton13);
- this.panel4.Location = new System.Drawing.Point(144, 110);
- this.panel4.Name = "panel4";
- this.panel4.Size = new System.Drawing.Size(84, 24);
- this.panel4.TabIndex = 19;
- //
- // radioButton12
- //
- this.radioButton12.AutoSize = true;
- this.radioButton12.Location = new System.Drawing.Point(5, 5);
- this.radioButton12.Name = "radioButton12";
- this.radioButton12.Size = new System.Drawing.Size(35, 16);
- this.radioButton12.TabIndex = 7;
- this.radioButton12.TabStop = true;
- this.radioButton12.Text = "正";
- this.radioButton12.UseVisualStyleBackColor = true;
- //
- // radioButton13
- //
- this.radioButton13.AutoSize = true;
- this.radioButton13.Location = new System.Drawing.Point(47, 5);
- this.radioButton13.Name = "radioButton13";
- this.radioButton13.Size = new System.Drawing.Size(35, 16);
- this.radioButton13.TabIndex = 6;
- this.radioButton13.TabStop = true;
- this.radioButton13.Text = "负";
- this.radioButton13.UseVisualStyleBackColor = true;
- //
- // panel5
- //
- this.panel5.Controls.Add(this.radioButton14);
- this.panel5.Controls.Add(this.radioButton15);
- this.panel5.Location = new System.Drawing.Point(273, 112);
- this.panel5.Name = "panel5";
- this.panel5.Size = new System.Drawing.Size(82, 22);
- this.panel5.TabIndex = 20;
- //
- // radioButton14
- //
- this.radioButton14.AutoSize = true;
- this.radioButton14.Location = new System.Drawing.Point(5, 3);
- this.radioButton14.Name = "radioButton14";
- this.radioButton14.Size = new System.Drawing.Size(35, 16);
- this.radioButton14.TabIndex = 9;
- this.radioButton14.TabStop = true;
- this.radioButton14.Text = "正";
- this.radioButton14.UseVisualStyleBackColor = true;
- //
- // radioButton15
- //
- this.radioButton15.AutoSize = true;
- this.radioButton15.Location = new System.Drawing.Point(44, 3);
- this.radioButton15.Name = "radioButton15";
- this.radioButton15.Size = new System.Drawing.Size(35, 16);
- this.radioButton15.TabIndex = 8;
- this.radioButton15.TabStop = true;
- this.radioButton15.Text = "负";
- this.radioButton15.UseVisualStyleBackColor = true;
- //
- // groupBox15
- //
- this.groupBox15.Controls.Add(this.panel5);
- this.groupBox15.Controls.Add(this.panel4);
- this.groupBox15.Controls.Add(this.panel3);
- this.groupBox15.Controls.Add(this.panel2);
- this.groupBox15.Controls.Add(this.panel1);
- this.groupBox15.Controls.Add(this.label25);
- this.groupBox15.Controls.Add(this.label24);
- this.groupBox15.Controls.Add(this.label23);
- this.groupBox15.Controls.Add(this.label22);
- this.groupBox15.Controls.Add(this.label21);
- this.groupBox15.Location = new System.Drawing.Point(117, 73);
- this.groupBox15.Name = "groupBox15";
- this.groupBox15.Size = new System.Drawing.Size(394, 471);
- this.groupBox15.TabIndex = 47;
- this.groupBox15.TabStop = false;
- this.groupBox15.Text = "方向设置";
- //
- // groupBox16
- //
- this.groupBox16.Controls.Add(this.panel6);
- this.groupBox16.Controls.Add(this.label28);
- this.groupBox16.Controls.Add(this.label27);
- this.groupBox16.Controls.Add(this.label26);
- this.groupBox16.Controls.Add(this.numericUpDown1);
- this.groupBox16.Controls.Add(this.comboBox2);
- this.groupBox16.Location = new System.Drawing.Point(117, 73);
- this.groupBox16.Name = "groupBox16";
- this.groupBox16.Size = new System.Drawing.Size(394, 471);
- this.groupBox16.TabIndex = 48;
- this.groupBox16.TabStop = false;
- this.groupBox16.Text = "辅助线设置";
- //
- // panel6
- //
- this.panel6.BackColor = System.Drawing.Color.Red;
- this.panel6.Cursor = System.Windows.Forms.Cursors.AppStarting;
- this.panel6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.panel6.Location = new System.Drawing.Point(135, 105);
- this.panel6.Name = "panel6";
- this.panel6.Size = new System.Drawing.Size(152, 20);
- this.panel6.TabIndex = 18;
- this.panel6.UseVisualStyleBackColor = false;
- this.panel6.Click += new System.EventHandler(this.panel6_Click);
- //
- // label28
- //
- this.label28.AutoSize = true;
- this.label28.Location = new System.Drawing.Point(45, 162);
- this.label28.Name = "label28";
- this.label28.Size = new System.Drawing.Size(59, 12);
- this.label28.TabIndex = 17;
- this.label28.Text = "线条宽度:";
- //
- // label27
- //
- this.label27.AutoSize = true;
- this.label27.Location = new System.Drawing.Point(45, 108);
- this.label27.Name = "label27";
- this.label27.Size = new System.Drawing.Size(59, 12);
- this.label27.TabIndex = 16;
- this.label27.Text = "线条颜色:";
- //
- // label26
- //
- this.label26.AutoSize = true;
- this.label26.Location = new System.Drawing.Point(45, 54);
- this.label26.Name = "label26";
- this.label26.Size = new System.Drawing.Size(59, 12);
- this.label26.TabIndex = 15;
- this.label26.Text = "线条样式:";
- //
- // numericUpDown1
- //
- this.numericUpDown1.Location = new System.Drawing.Point(135, 158);
- this.numericUpDown1.Name = "numericUpDown1";
- this.numericUpDown1.Size = new System.Drawing.Size(152, 21);
- this.numericUpDown1.TabIndex = 14;
- this.numericUpDown1.Value = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- //
- // comboBox2
- //
- this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox2.FormattingEnabled = true;
- this.comboBox2.Location = new System.Drawing.Point(135, 51);
- this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(152, 20);
- this.comboBox2.TabIndex = 12;
- //
- // button17
- //
- this.button17.Location = new System.Drawing.Point(311, 21);
- this.button17.Name = "button17";
- this.button17.Size = new System.Drawing.Size(75, 23);
- this.button17.TabIndex = 8;
- this.button17.Text = "删除";
- this.button17.UseVisualStyleBackColor = true;
- this.button17.Click += new System.EventHandler(this.button17_Click);
- //
- // button16
- //
- this.button16.Location = new System.Drawing.Point(70, 21);
- this.button16.Name = "button16";
- this.button16.Size = new System.Drawing.Size(75, 23);
- this.button16.TabIndex = 9;
- this.button16.Text = "新建";
- this.button16.UseVisualStyleBackColor = true;
- this.button16.Click += new System.EventHandler(this.button16_Click);
- //
- // button15
- //
- this.button15.Location = new System.Drawing.Point(151, 21);
- this.button15.Name = "button15";
- this.button15.Size = new System.Drawing.Size(75, 23);
- this.button15.TabIndex = 10;
- this.button15.Text = "编辑";
- this.button15.UseVisualStyleBackColor = true;
- this.button15.Click += new System.EventHandler(this.button15_Click);
- //
- // button14
- //
- this.button14.Location = new System.Drawing.Point(232, 21);
- this.button14.Name = "button14";
- this.button14.Size = new System.Drawing.Size(75, 23);
- this.button14.TabIndex = 13;
- this.button14.Text = "应用";
- this.button14.UseVisualStyleBackColor = true;
- this.button14.Click += new System.EventHandler(this.button14_Click);
- //
- // groupBox13
- //
- this.groupBox13.Controls.Add(this.button14);
- this.groupBox13.Controls.Add(this.button15);
- this.groupBox13.Controls.Add(this.button16);
- this.groupBox13.Controls.Add(this.button17);
- this.groupBox13.Location = new System.Drawing.Point(117, 13);
- this.groupBox13.Name = "groupBox13";
- this.groupBox13.Size = new System.Drawing.Size(394, 59);
- this.groupBox13.TabIndex = 36;
- this.groupBox13.TabStop = false;
- this.groupBox13.Text = "操作";
- //
- // button19
- //
- this.button19.Location = new System.Drawing.Point(311, 21);
- this.button19.Name = "button19";
- this.button19.Size = new System.Drawing.Size(75, 23);
- this.button19.TabIndex = 10;
- this.button19.Text = "取消";
- this.button19.UseVisualStyleBackColor = true;
- this.button19.Click += new System.EventHandler(this.button19_Click);
- //
- // button18
- //
- this.button18.Location = new System.Drawing.Point(232, 21);
- this.button18.Name = "button18";
- this.button18.Size = new System.Drawing.Size(75, 23);
- this.button18.TabIndex = 13;
- this.button18.Text = "确定";
- this.button18.UseVisualStyleBackColor = true;
- this.button18.Click += new System.EventHandler(this.button18_Click);
- //
- // groupBox14
- //
- this.groupBox14.Controls.Add(this.button18);
- this.groupBox14.Controls.Add(this.button19);
- this.groupBox14.Location = new System.Drawing.Point(117, 13);
- this.groupBox14.Name = "groupBox14";
- this.groupBox14.Size = new System.Drawing.Size(394, 59);
- this.groupBox14.TabIndex = 37;
- this.groupBox14.TabStop = false;
- this.groupBox14.Text = "操作";
- //
- // groupBox17
- //
- this.groupBox17.Controls.Add(this.button20);
- this.groupBox17.Controls.Add(this.button21);
- this.groupBox17.Location = new System.Drawing.Point(117, 13);
- this.groupBox17.Name = "groupBox17";
- this.groupBox17.Size = new System.Drawing.Size(394, 59);
- this.groupBox17.TabIndex = 38;
- this.groupBox17.TabStop = false;
- this.groupBox17.Text = "操作";
- //
- // button20
- //
- this.button20.Location = new System.Drawing.Point(232, 21);
- this.button20.Name = "button20";
- this.button20.Size = new System.Drawing.Size(75, 23);
- this.button20.TabIndex = 13;
- this.button20.Text = "应用";
- this.button20.UseVisualStyleBackColor = true;
- this.button20.Click += new System.EventHandler(this.button20_Click);
- //
- // button21
- //
- this.button21.Location = new System.Drawing.Point(311, 21);
- this.button21.Name = "button21";
- this.button21.Size = new System.Drawing.Size(75, 23);
- this.button21.TabIndex = 10;
- this.button21.Text = "取消";
- this.button21.UseVisualStyleBackColor = true;
- this.button21.Click += new System.EventHandler(this.button21_Click);
- //
- // groupBox18
- //
- this.groupBox18.Controls.Add(this.button22);
- this.groupBox18.Location = new System.Drawing.Point(117, 12);
- this.groupBox18.Name = "groupBox18";
- this.groupBox18.Size = new System.Drawing.Size(394, 59);
- this.groupBox18.TabIndex = 39;
- this.groupBox18.TabStop = false;
- this.groupBox18.Text = "操作";
- //
- // button22
- //
- this.button22.Location = new System.Drawing.Point(307, 22);
- this.button22.Name = "button22";
- this.button22.Size = new System.Drawing.Size(75, 23);
- this.button22.TabIndex = 13;
- this.button22.Text = "应用";
- this.button22.UseVisualStyleBackColor = true;
- //
- // groupBox19
- //
- this.groupBox19.Controls.Add(this.btn_Del);
- this.groupBox19.Controls.Add(this.comboBox_Name);
- this.groupBox19.Controls.Add(this.label29);
- this.groupBox19.Location = new System.Drawing.Point(117, 74);
- this.groupBox19.Name = "groupBox19";
- this.groupBox19.Size = new System.Drawing.Size(394, 58);
- this.groupBox19.TabIndex = 49;
- this.groupBox19.TabStop = false;
- this.groupBox19.Text = "当前使用";
- //
- // btn_Del
- //
- this.btn_Del.Location = new System.Drawing.Point(313, 23);
- this.btn_Del.Name = "btn_Del";
- this.btn_Del.Size = new System.Drawing.Size(75, 23);
- this.btn_Del.TabIndex = 10;
- this.btn_Del.Text = "删除";
- this.btn_Del.UseVisualStyleBackColor = true;
- this.btn_Del.Click += new System.EventHandler(this.btn_Del_Click);
- //
- // comboBox_Name
- //
- this.comboBox_Name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.comboBox_Name.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox_Name.FormattingEnabled = true;
- this.comboBox_Name.Location = new System.Drawing.Point(77, 25);
- this.comboBox_Name.Name = "comboBox_Name";
- this.comboBox_Name.Size = new System.Drawing.Size(230, 20);
- this.comboBox_Name.TabIndex = 9;
- //
- // label29
- //
- this.label29.AutoSize = true;
- this.label29.Location = new System.Drawing.Point(30, 28);
- this.label29.Name = "label29";
- this.label29.Size = new System.Drawing.Size(41, 12);
- this.label29.TabIndex = 0;
- this.label29.Text = "名称:";
- //
- // label30
- //
- this.label30.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label30.AutoSize = true;
- this.label30.Location = new System.Drawing.Point(241, 45);
- this.label30.Name = "label30";
- this.label30.Size = new System.Drawing.Size(29, 12);
- this.label30.TabIndex = 13;
- this.label30.Text = "Z1:";
- //
- // label31
- //
- this.label31.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.label31.AutoSize = true;
- this.label31.Location = new System.Drawing.Point(241, 68);
- this.label31.Name = "label31";
- this.label31.Size = new System.Drawing.Size(29, 12);
- this.label31.TabIndex = 14;
- this.label31.Text = "Z2:";
- //
- // textBox7
- //
- this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox7.Location = new System.Drawing.Point(280, 40);
- this.textBox7.Name = "textBox7";
- this.textBox7.Size = new System.Drawing.Size(108, 21);
- this.textBox7.TabIndex = 15;
- //
- // textBox8
- //
- this.textBox8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox8.Location = new System.Drawing.Point(280, 65);
- this.textBox8.Name = "textBox8";
- this.textBox8.Size = new System.Drawing.Size(108, 21);
- this.textBox8.TabIndex = 16;
- //
- // GeneralSettingDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoScroll = true;
- this.ClientSize = new System.Drawing.Size(533, 561);
- this.Controls.Add(this.groupBox19);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox7);
- this.Controls.Add(this.groupBox10);
- this.Controls.Add(this.groupBox9);
- this.Controls.Add(this.groupBox11);
- this.Controls.Add(this.groupBox8);
- this.Controls.Add(this.groupBox6);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox18);
- this.Controls.Add(this.groupBox17);
- this.Controls.Add(this.groupBox14);
- this.Controls.Add(this.groupBox13);
- this.Controls.Add(this.groupBox12);
- this.Controls.Add(this.groupBox16);
- this.Controls.Add(this.groupBox15);
- this.Controls.Add(this.listView3);
- this.Controls.Add(this.groupBoxCaptureSave);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "GeneralSettingDialog";
- this.Text = "常规设置";
- this.Controls.SetChildIndex(this.groupBoxCaptureSave, 0);
- this.Controls.SetChildIndex(this.listView3, 0);
- this.Controls.SetChildIndex(this.groupBox15, 0);
- this.Controls.SetChildIndex(this.groupBox16, 0);
- this.Controls.SetChildIndex(this.groupBox12, 0);
- this.Controls.SetChildIndex(this.groupBox13, 0);
- this.Controls.SetChildIndex(this.groupBox14, 0);
- this.Controls.SetChildIndex(this.groupBox17, 0);
- this.Controls.SetChildIndex(this.groupBox18, 0);
- this.Controls.SetChildIndex(this.groupBox4, 0);
- this.Controls.SetChildIndex(this.groupBox3, 0);
- this.Controls.SetChildIndex(this.groupBox6, 0);
- this.Controls.SetChildIndex(this.groupBox8, 0);
- this.Controls.SetChildIndex(this.groupBox11, 0);
- this.Controls.SetChildIndex(this.groupBox9, 0);
- this.Controls.SetChildIndex(this.groupBox10, 0);
- this.Controls.SetChildIndex(this.groupBox7, 0);
- this.Controls.SetChildIndex(this.groupBox2, 0);
- this.Controls.SetChildIndex(this.groupBox1, 0);
- this.Controls.SetChildIndex(this.groupBox5, 0);
- this.Controls.SetChildIndex(this.groupBox19, 0);
- this.groupBox1.ResumeLayout(false);
- this.groupBox8.ResumeLayout(false);
- this.groupBox8.PerformLayout();
- this.groupBox7.ResumeLayout(false);
- this.groupBox7.PerformLayout();
- this.groupBoxCaptureSave.ResumeLayout(false);
- this.groupBoxCaptureSave.PerformLayout();
- this.groupBox10.ResumeLayout(false);
- this.groupBox10.PerformLayout();
- this.groupBox6.ResumeLayout(false);
- this.groupBox9.ResumeLayout(false);
- this.groupBox9.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- this.groupBox2.ResumeLayout(false);
- this.groupBox12.ResumeLayout(false);
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.groupBox11.ResumeLayout(false);
- this.groupBox11.PerformLayout();
- this.panel1.ResumeLayout(false);
- this.panel1.PerformLayout();
- this.panel2.ResumeLayout(false);
- this.panel2.PerformLayout();
- this.panel3.ResumeLayout(false);
- this.panel3.PerformLayout();
- this.panel4.ResumeLayout(false);
- this.panel4.PerformLayout();
- this.panel5.ResumeLayout(false);
- this.panel5.PerformLayout();
- this.groupBox15.ResumeLayout(false);
- this.groupBox15.PerformLayout();
- this.groupBox16.ResumeLayout(false);
- this.groupBox16.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
- this.groupBox13.ResumeLayout(false);
- this.groupBox14.ResumeLayout(false);
- this.groupBox17.ResumeLayout(false);
- this.groupBox18.ResumeLayout(false);
- this.groupBox19.ResumeLayout(false);
- this.groupBox19.PerformLayout();
- this.ResumeLayout(false);
- }
- #endregion
- #region [画板颜色]
- /// <summary>
- /// 画板点击
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void panel6_Click(object sender, EventArgs e)
- {
- this.colorsForm.UserPrimaryColor = ColorBgra.FromColor(this.panel6.BackColor);
- this.colorsForm.setSaveBtn_Click(new System.EventHandler(this.panel6Changed));
- this.colorsForm.ShowDialog();
- }
- private void panel6Changed(object sender, EventArgs e)
- {
- this.panel6.BackColor = this.colorsForm.UserPrimaryColor.ToColor();
- this.colorsForm.Close();
- }
- private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
- {
- }
- #endregion
- #region [用户信息]
- public void UserInformation()
- {
- textBox_CompanyName.MaxLength = 100;
- textBox_CompanyName.Text = userInfo.CompanyName;
- textBox_Province.MaxLength = 10;
- textBox_Province.Text = userInfo.Province;
- textBox_City.MaxLength = 10;
- textBox_City.Text = userInfo.City;
- textBox_Address.MaxLength = 100;
- textBox_Address.Text = userInfo.Address;
- textBox_Contact.MaxLength = 10;
- textBox_Contact.Text = userInfo.Contact;
- textBox_Phone.MaxLength = 20;
- textBox_Phone.Text = userInfo.Phone;
- textBox_Email.MaxLength = 30;
- textBox_Email.Text = userInfo.Email;
- textBox_Model.Text = userInfo.Model;
- textBox_SN.Text = userInfo.SN;
- textBox_Camera.Text = userInfo.Camera;
- textBox_Interface.Text = userInfo.Interface;
- if (string.IsNullOrEmpty(userInfo.Logo))
- {
- button11.Show();
- button12.Hide();
- pictureBox2.Hide();
- }
- else
- {
- button11.Hide();
- button12.Show();
- if (System.IO.File.Exists(userInfo.Logo))
- {
- pictureBox2.ImageLocation = userInfo.Logo;
- FileStream userPicStream = new FileStream(userInfo.Logo, FileMode.Open, FileAccess.Read);
- pictureBox2.Image = Image.FromStream(userPicStream);
- userPicStream.Close();
- userPicStream.Dispose();
- }
- pictureBox2.Show();
- }
- }
- #endregion
- #region [基础设置]
- public void BasicSettings()
- {
- checkBox7.Checked = config.StartImgStatus == 1 ? false : true;
- checkBox8.Checked = config.AddZEN == 1 ? true : false;
- checkBox9.Checked = config.AddAxioVision == 1 ? true : false;
- textBox4.Text = config.NormalOperation;
- textBox5.Text = config.GeneralAnalysis;
- textBox6.Text = config.DedicatedAnalysis;
- if (string.IsNullOrEmpty(config.StartImg))
- {
- button9.Show();
- button10.Hide();
- pictureBox1.Hide();
- }
- else
- {
- button9.Hide();
- button10.Show();
- if (System.IO.File.Exists(config.StartImg))
- {
- pictureBox1.ImageLocation = config.StartImg;
- FileStream imgFileStream = new FileStream(config.StartImg, FileMode.Open, FileAccess.Read);
- pictureBox1.Image = Image.FromStream(imgFileStream);
- imgFileStream.Close();
- imgFileStream.Dispose();
- }
- pictureBox1.Show();
- }
- }
- #endregion
- #region [相机设置]
- private void listView1_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (listView3.FocusedItem != null)
- {
- int idx = listView3.FocusedItem.Index;
- for (int i = 0; i < listView3.Items.Count; i++)
- {
- if (i == idx)
- listView3.Items[i].BackColor = Color.Aqua;
- else
- listView3.Items[i].BackColor = Color.White;
- }
- listView3.Items[idx].Selected = false;
- }
- }
- public void CameraSettings()
- {
- listView3.View = View.Details;
- listView3.Columns.Add("0", 0, HorizontalAlignment.Center);
- listView3.Columns.Add(PdnResources.GetString("Menu.LabelAction.MarkAction.Text"), 50, HorizontalAlignment.Center);
- listView3.Columns.Add(PdnResources.GetString("Menu.Cameramodel.text"), 131, HorizontalAlignment.Center);
- listView3.Columns.Add(PdnResources.GetString("Menu.Cameramodelweimi.text"), 300, HorizontalAlignment.Center);
- listView3.Columns.Add(PdnResources.GetString("Menu.Set.Generalsettings.Sidelengthresolution.text"), 200, HorizontalAlignment.Center);
- var screenList = mic_camerasettings_BLL.FindAll();
- var screenRulesId = config.Camera;
- listView3.BeginUpdate();
- foreach (var s in screenList)
- {
- var lv = new ListViewItem();
- lv.SubItems.Add(screenRulesId == s.id ? "√" : "×");
- lv.SubItems.Add(s.camera_model);
- lv.SubItems.Add(s.side_length);
- lv.SubItems.Add(s.resolution);
- lv.Tag = s.id;
- listView3.Items.Add(lv);
- }
- if (listView3.Items.Count > 0)
- {
- listView3.Items[0].Selected = true;
- listView3.Select();
- }
- else
- {
- var lv = new ListViewItem();
- lv.SubItems.Add("2");
- lv.SubItems.Add("3");
- lv.SubItems.Add("4");
- lv.Name = "virtualItem";
- listView3.Items.Add(lv);
- }
- listView3.EndUpdate();
- }
- #endregion
- #region [方向设置]
- public void OrientationSetting()
- {
- radioButton6.Checked = config.ZMovementDirection == 0 ? true : false;
- radioButton7.Checked = config.ZMovementDirection == 1 ? true : false;
- radioButton8.Checked = config.XLeftMovementDirection == 0 ? true : false;
- radioButton9.Checked = config.XLeftMovementDirection == 1 ? true : false;
- radioButton10.Checked = config.XRighttMovementDirection == 0 ? true : false;
- radioButton11.Checked = config.XRighttMovementDirection == 1 ? true : false;
- radioButton12.Checked = config.YLeftMovementDirection == 0 ? true : false;
- radioButton13.Checked = config.YLeftMovementDirection == 1 ? true : false;
- radioButton14.Checked = config.YRighttMovementDirection == 0 ? true : false;
- radioButton15.Checked = config.YRighttMovementDirection == 1 ? true : false;
- }
- #endregion
- #region [辅助线设置]
- public void GuideSetting()
- {
- //绑定线样式数据
- this.comboBox2.Items.AddRange(InvariantData.dashStyles);
- //获取xml样式信息
- this.comboBox2.SelectedIndex = Startup.instance.guideStyleModel.lineStyle;
- this.panel6.BackColor = Color.FromArgb(Startup.instance.guideStyleModel.lineColour);
- this.numericUpDown1.Value = Startup.instance.guideStyleModel.lineWidth;
- }
- #endregion
- #region 拍照保存
- bool _isInitCaptureSave = false;
- void InitCaptureSave()
- {
- _isInitCaptureSave = true;
- //初始化字串
- this.groupBox18.Text = PdnResources.GetString("Menu.operation.text");
- groupBoxCaptureSave.Text = PdnResources.GetString("Menu.CaptureSave.text");
- ckbSave.Text = PdnResources.GetString("SaveToDisk");
- ckbSaveAndOpen.Text = PdnResources.GetString("SaveAndOpenImage");
- this.button22.Text = PdnResources.GetString("Menu.application.text");
- ckbSave.Checked = (config.CaptureSaveMode & 1) > 0;
- ckbSaveAndOpen.Enabled = (config.CaptureSaveMode & 1) > 0;
- ckbSaveAndOpen.Checked = (config.CaptureSaveMode & 2) > 0;
- ckbSave.Click += CkbSave_Click;
- ckbSaveAndOpen.Click += CkbSave_Click;
- button22.Click += Apply_Click;
- }
- private void CkbSave_Click(object sender, EventArgs e)
- {
- ckbSaveAndOpen.Enabled = ckbSave.Checked;
- config.CaptureSaveMode = (ckbSave.Checked ? 1 : 0) + (ckbSaveAndOpen.Checked ? 2 : 0);
- }
- private void Apply_Click(object sender, EventArgs e)
- {
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create);
- }
- #endregion
- private void listBox1_SelectedValueChanged(object sender, EventArgs e)
- {
- groupBox3.Hide();
- groupBox4.Hide();
- groupBox5.Hide();
- groupBox6.Hide();
- groupBox7.Hide();
- groupBox8.Hide();
- groupBox9.Hide();
- groupBox10.Hide();
- groupBox11.Hide();
- groupBox2.Hide();
- groupBox12.Hide();
- groupBox13.Hide();
- listView3.Hide();
- groupBox14.Hide();
- groupBox15.Hide();
- groupBox16.Hide();
- groupBox17.Hide();
- groupBox18.Hide();
- groupBox19.Hide();
- groupBoxCaptureSave.Hide();
- button1.Visible = true;
- btn_Save.Visible = false;
- btn_SaveAs.Visible = false;
- if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Namingrules.text")))
- {
- groupBox5.Show();
- groupBox2.Show();
- groupBox19.Show();
- button1.Visible = false;
- btn_Save.Visible = true;
- btn_SaveAs.Visible = true;
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.UserInfo.text")))
- {
- groupBox3.Show();
- groupBox4.Show();
- groupBox2.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.dotspacingsetting.text")))
- {
- groupBox6.Show();
- groupBox12.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Softwarelanguage.text")))
- {
- groupBox8.Show();
- groupBox2.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Systemreset.text")))
- {
- groupBox7.Show();
- groupBox2.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.BasicSettings.text")))
- {
- groupBox9.Show();
- groupBox10.Show();
- groupBox11.Show();
- groupBox2.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text")))
- {
- groupBox13.Show();
- listView3.Show();
- if (listView3.Items.Count > 0)
- {
- listView3.Items.RemoveByKey("virtualItem");
- }
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Directionsetting.text")))
- {
- groupBox14.Show();
- groupBox15.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Auxiliarylinesettings.text")))
- {
- groupBox16.Show();
- groupBox17.Show();
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.CaptureSave.text")))
- {
- if (!_isInitCaptureSave) InitCaptureSave();
- groupBoxCaptureSave.Show();
- groupBox18.Show();
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void button1_Click(object sender, EventArgs e)
- {
- if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Namingrules.text")))
- {
- //if (string.IsNullOrEmpty(textBox1.Text))
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.pleasewriteNameprefix.text"));
- // return;
- //}
- //if (string.IsNullOrEmpty(textBox2.Text))
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.pleaseNameformat.text"));
- // return;
- //}
- //else
- //{
- // string[] arrs = System.Text.RegularExpressions.Regex.Split(textBox2.Text, @"(?<=\G.{2})(?!$)");
- // foreach (string text in arrs)
- // {
- // if (!text.Equals("%P") && !text.Equals("%I") && !text.Equals("%h") && !text.Equals("%m")
- // && !text.Equals("%s") && !text.Equals("%Y") && !text.Equals("%M") && !text.Equals("%D")
- // && !text.Equals("%G") && !text.Equals("%U"))
- // {
- // MessageBox.Show("名称格式不合法, 请检查");
- // return;
- // }
- // }
- //}
- //if (radioButton1.Checked && !(Regex.IsMatch(textBox3.Text, pattern)))
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.Numberscanbeentet.text") + "!");
- // return;
- //}
- //config.CurrentName = comboBox_Name.Text;
- //config.NamePrefix = textBox1.Text;
- //config.NameFormat = textBox2.Text;
- //config.NumberNum = Convert.ToInt32(comboBox1.SelectedItem);
- //config.NameStatus = radioButton1.Checked == true ? 1 : 2;
- //config.ContinueNum = radioButton1.Checked ? Convert.ToInt32(textBox3.Text) : 1;
- //string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- //string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- //if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- //{
- //}
- //else
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.mingconventionsavefailed.text"));
- //}
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.UserInfo.text")))
- {
- userInfo.CompanyName = textBox_CompanyName.Text;
- userInfo.Province = textBox_Province.Text;
- userInfo.City = textBox_City.Text;
- userInfo.Address = textBox_Address.Text;
- userInfo.Contact = textBox_Contact.Text;
- userInfo.Phone = textBox_Phone.Text;
- userInfo.Email = textBox_Email.Text;
- if (pictureBox2.ImageLocation == null)
- {
- if (!string.IsNullOrEmpty(userInfo.Logo))
- {
- if (System.IO.File.Exists(userInfo.Logo))
- {
- System.IO.File.Delete(userInfo.Logo);
- }
- }
- }
- userInfo.Logo = pictureBox2.ImageLocation == null ? "" : pictureBox2.ImageLocation;
- userInfo.Model = textBox_Model.Text;
- userInfo.SN = textBox_SN.Text;
- userInfo.Camera = textBox_Camera.Text;
- userInfo.Interface = textBox_Interface.Text;
- string userInfoXml = XmlSerializeHelper.XmlSerialize<UserInfoModel>(userInfo);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\UserInfo.xml";
- if (FileOperationHelper.WriteStringToFile(userInfoXml, filePath, FileMode.Create))
- {
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.UserInfosavefiled.text"));
- }
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.dotspacingsetting.text")))
- {
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Softwarelanguage.text")))
- {
- if (radioButton3.Checked)
- {
- config.Language = 1;
- }
- else if (radioButton5.Checked)
- {
- config.Language = 2;
- }
- else if (radioButton4.Checked)
- {
- config.Language = 3;
- }
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- MessageBox.Show(PdnResources.GetString("Menu.nguageswitchissuccessfulthesoftware.text"));
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.twarelanguageswitchfailed.text"));
- }
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.Set.Generalsettings.Systemreset.text")))
- {
- if (!checkBox1.Checked && !checkBox2.Checked && !checkBox3.Checked && !checkBox4.Checked && !checkBox5.Checked && !checkBox6.Checked)
- {
- MessageBox.Show(PdnResources.GetString("Menu.asefirstchecatleastoneite.text"));
- return;
- }
- config.LabelInformationReset = checkBox1.Checked ? 1 : 0;
- config.MeasurementInformationReset = checkBox2.Checked ? 1 : 0;
- config.LogReset = checkBox3.Checked ? 1 : 0;
- config.ShortcutBarReset = checkBox4.Checked ? 1 : 0;
- config.ToolbarReset = checkBox5.Checked ? 1 : 0;
- config.HotKeyReset = checkBox6.Checked ? 1 : 0;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- MessageBox.Show(PdnResources.GetString("Menu.emresetsuccessfulthesoftw.text") + "!");
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Systemresetfailure.text"));
- }
- }
- else if (listBox1.SelectedItems[0].ToString().Equals(PdnResources.GetString("Menu.BasicSettings.text")))
- {
- config.StartImgStatus = checkBox7.Checked ? 2 : 1;
- if (pictureBox1.ImageLocation == null)
- {
- if (!string.IsNullOrEmpty(config.StartImg))
- {
- if (System.IO.File.Exists(config.StartImg))
- {
- System.IO.File.Delete(config.StartImg);
- }
- }
- }
- config.StartImg = pictureBox1.ImageLocation == null ? "" : pictureBox1.ImageLocation;
- config.NormalOperation = textBox4.Text;
- config.GeneralAnalysis = textBox5.Text;
- config.DedicatedAnalysis = textBox6.Text;
- config.AddZEN = checkBox8.Checked ? 1 : 2;
- config.AddAxioVision = checkBox9.Checked ? 1 : 2;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- Startup.instance.configModel.NormalOperation = config.NormalOperation;
- Startup.instance.configModel.GeneralAnalysis = config.GeneralAnalysis;
- Startup.instance.configModel.DedicatedAnalysis = config.DedicatedAnalysis;
- if (this.appWorkspace != null && this.appWorkspace.Widgets != null && this.appWorkspace.Widgets.ProjectEngineering != null && !this.appWorkspace.Widgets.ProjectEngineering.IsDisposed)
- {
- this.appWorkspace.Widgets.ProjectEngineering.InitializeTreeViewDetailData();
- }
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Theoperationfailure.text"));
- }
- }
- }
- private void listView2_DoubleClick(object sender, EventArgs e)
- {
- if (listView2.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- string id = listView2.FocusedItem.SubItems[6].Text;
- if (config.DotPitchId == Convert.ToInt32(id))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
- return;
- }
- config.DotPitchId = Convert.ToInt32(id);
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
- listView2.BeginUpdate();
- int nRowOrder = 0;
- int nRowOrders = listView2.Items.Count;//行数
- for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
- {
- ListViewItem lvi = listView2.Items[nRowOrder];
- if (lvi.SubItems[1].Text == "√")
- {
- lvi.SubItems[1].Text = "×";
- }
- }
- var Index = listView2.SelectedItems[0].Index;
- var lv = listView2.Items[Index];
- lv.SubItems[1].Text = "√";
- listView2.EndUpdate();
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
- }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- if (listView2.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- DialogResult dr;
- dr = MessageBox.Show(PdnResources.GetString("Menu.eyousureyouwanttodeletethisdi.text") + "?", PdnResources.GetString("Menu.Edit.Delete.Text"), MessageBoxButtons.OKCancel,
- MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
- if (dr == DialogResult.OK)
- {
- string id = string.Empty;
- if (listView2.FocusedItem != null)
- {
- id = listView2.FocusedItem.SubItems[6].Text;
- }
- else
- {
- id = listView2.Items[0].SubItems[6].Text;
- }
- var point = mic_screen_rules_BLL.FindDefault(Convert.ToInt32(id));
- if (point == null || point.delete_flag == 1)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Abnormalinformation.text"));
- }
- point.delete_flag = 1;
- mic_screen_rules_BLL.Update(point);
- if (listView2.SelectedItems.Count > 0)
- {
- var Index = listView2.SelectedItems[0].Index;
- listView2.Items[Index].Remove();
- }
- else
- {
- listView2.Items[0].Remove();
- }
- }
- else if (dr == DialogResult.Cancel)
- {
- }
- if (listView2.Items.Count > 0)
- {
- listView2.Items[0].Selected = true;
- listView2.Select();
- }
- }
- private void button4_Click(object sender, EventArgs e)
- {
- string id = string.Empty;
- using (PointDataDialog pd = new PointDataDialog(id, listView2))
- {
- pd.Text = PdnResources.GetString("Menu.Set.Generalsettings.Adddotpitch.text");
- pd.ShowDialog();
- }
- }
- private void button5_Click(object sender, EventArgs e)
- {
- string id = string.Empty;
- int thisIndex = 0;
- if (listView2.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- if (listView2.FocusedItem != null)
- {
- id = listView2.FocusedItem.SubItems[6].Text;
- thisIndex = listView2.Items.IndexOf(listView2.FocusedItem);
- }
- else
- {
- id = "1";
- }
- using (PointDataDialog pd = new PointDataDialog(id, listView2, thisIndex))
- {
- pd.Text = PdnResources.GetString("Menu.Editdistance.text");
- pd.ShowDialog();
- }
- }
- private void button6_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog path = new FolderBrowserDialog();
- path.ShowDialog();
- textBox4.Text = path.SelectedPath;
- }
- private void button7_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog path = new FolderBrowserDialog();
- path.ShowDialog();
- textBox5.Text = path.SelectedPath;
- }
- private void button8_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog path = new FolderBrowserDialog();
- path.ShowDialog();
- textBox6.Text = path.SelectedPath;
- }
- private void button9_Click(object sender, EventArgs e)
- {
- OpenFileDialog file = new OpenFileDialog();
- file.Filter = "All Image Files|*.bmp;*.jpeg;*.jpg;*.png";
- DialogResult dr;
- dr = file.ShowDialog();
- if (dr == DialogResult.OK)
- {
- var lastName = Path.GetExtension(file.FileName);
- if (lastName != ".png" && lastName != ".jpg" && lastName != ".jpeg" && lastName != ".bmp")
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseuploadpicturese.text"));
- return;
- }
- var fileName = Path.GetFullPath(file.FileName);
- byte[] bytes = ReadFileToByte(fileName);
- var saveFilePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + $"\\{DateTime.Now.ToString("yyyyMMddHHmmss") + file.SafeFileName}";
- WriteByteToFile(bytes, saveFilePath);
- button9.Hide();
- button10.Show();
- pictureBox1.Show();
- pictureBox1.ImageLocation = saveFilePath;
- FileStream pFileStream = new FileStream(saveFilePath, FileMode.Open, FileAccess.Read);
- pictureBox1.Image = Image.FromStream(pFileStream);
- pFileStream.Close();
- pFileStream.Dispose();
- }
- }
- private void button10_Click(object sender, EventArgs e)
- {
- button9.Show();
- button10.Hide();
- pictureBox1.ImageLocation = null;
- pictureBox1.Hide();
- }
- #region [读文件到byte数组]
- /// <summary>
- /// 读文件到byte[]
- /// </summary>
- /// <param name="fileName">硬盘文件路径</param>
- /// <returns></returns>
- public static byte[] ReadFileToByte(string fileName)
- {
- FileStream pFileStream = null;
- byte[] pReadByte = new byte[0];
- try
- {
- pFileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
- BinaryReader r = new BinaryReader(pFileStream);
- r.BaseStream.Seek(0, SeekOrigin.Begin); //将文件指针设置到文件开
- pReadByte = r.ReadBytes((int)r.BaseStream.Length);
- return pReadByte;
- }
- catch
- {
- return pReadByte;
- }
- finally
- {
- if (pFileStream != null)
- pFileStream.Close();
- }
- }
- #endregion [读文件到byte数组]
- #region [写byte数组到fileName]
- /// <summary>
- /// 写byte[]到fileName
- /// </summary>
- /// <param name="pReadByte">byte[]</param>
- /// <param name="fileName">保存至硬盘路径</param>
- /// <returns></returns>
- public static void WriteByteToFile(byte[] pReadByte, string fileName)
- {
- FileStream pFileStream = null;
- try
- {
- pFileStream = new FileStream(fileName, FileMode.OpenOrCreate);
- pFileStream.Write(pReadByte, 0, pReadByte.Length);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- finally
- {
- if (pFileStream != null)
- {
- pFileStream.Flush();
- pFileStream.Close();
- pFileStream.Dispose();
- }
- }
- }
- #endregion [写byte数组到fileName]
- private void button11_Click(object sender, EventArgs e)
- {
- OpenFileDialog file = new OpenFileDialog();
- file.Filter = "All Image Files|*.bmp;*.jpeg;*.jpg;*.png";
- DialogResult dr;
- dr = file.ShowDialog();
- if (dr == DialogResult.OK)
- {
- var lastName = Path.GetExtension(file.FileName);
- if (lastName != ".png" && lastName != ".jpg" && lastName != ".jpeg" && lastName != ".bmp")
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseuploadpicturese.text"));
- return;
- }
- var fileName = Path.GetFullPath(file.FileName);
- byte[] bytes = ReadFileToByte(fileName);
- var saveFilePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + $"\\{DateTime.Now.ToString("yyyyMMddHHmmss") + file.SafeFileName}";
- WriteByteToFile(bytes, saveFilePath);
- button11.Hide();
- button12.Show();
- pictureBox2.Show();
- pictureBox2.ImageLocation = saveFilePath;
- FileStream pFileStream = new FileStream(saveFilePath, FileMode.Open, FileAccess.Read);
- pictureBox2.Image = Image.FromStream(pFileStream);
- pFileStream.Close();
- pFileStream.Dispose();
- }
- }
- private void button12_Click(object sender, EventArgs e)
- {
- button11.Show();
- button12.Hide();
- pictureBox2.ImageLocation = null;
- pictureBox2.Hide();
- }
- private void button13_Click(object sender, EventArgs e)
- {
- if (listView2.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- if (listView2.FocusedItem == null)
- {
- MessageBox.Show(PdnResources.GetString("Menu.seselecthedotditancedatafi.text"));
- return;
- }
- string id = listView2.FocusedItem.SubItems[6].Text;
- if (config.DotPitchId == Convert.ToInt32(id))
- {
- //MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
- return;
- }
- config.DotPitchId = Convert.ToInt32(id);
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
- listView2.BeginUpdate();
- int nRowOrder = 0;
- int nRowOrders = listView2.Items.Count;//行数
- for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
- {
- ListViewItem lvi = listView2.Items[nRowOrder];
- if (lvi.SubItems[1].Text == "√")
- {
- lvi.SubItems[1].Text = "×";
- }
- }
- var Index = listView2.SelectedItems[0].Index;
- var lv = listView2.Items[Index];
- lv.SubItems[1].Text = "√";
- listView2.EndUpdate();
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
- }
- }
- private void radioButton2_CheckedChanged(object sender, EventArgs e)
- {
- textBox3.ReadOnly = true;
- //textBox3.Text = "";
- }
- private void radioButton1_CheckedChanged(object sender, EventArgs e)
- {
- textBox3.ReadOnly = false;
- }
- private void listBox1_DrawItem(object sender, DrawItemEventArgs e)
- {
- e.DrawBackground();
- e.DrawFocusRectangle();
- StringFormat strFmt = new System.Drawing.StringFormat();
- strFmt.Alignment = StringAlignment.Center; //文本垂直居中
- strFmt.LineAlignment = StringAlignment.Center; //文本水平居中
- e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font, new SolidBrush(Color.Black), e.Bounds, strFmt);
- }
- /// <summary>
- /// 相机设置添加按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button16_Click(object sender, EventArgs e)
- {
- string id = string.Empty;
- using (CameraSettingsAddDialog pd = new CameraSettingsAddDialog(id, listView3))
- {
- pd.ShowDialog();
- }
- }
- /// <summary>
- /// 相机设置编辑按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button15_Click(object sender, EventArgs e)
- {
- string id = string.Empty;
- int thisIndex = 0;
- if (listView3.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- if (listView3.FocusedItem != null)
- {
- id = listView3.FocusedItem.Tag.ToString();
- thisIndex = listView3.Items.IndexOf(listView3.FocusedItem);
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
- return;
- //id = "1";
- }
- using (CameraSettingsAddDialog pd = new CameraSettingsAddDialog(id, listView3, thisIndex))
- {
- pd.ShowDialog();
- }
- }
- /// <summary>
- /// 相机设置删除按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button17_Click(object sender, EventArgs e)
- {
- if (listView3.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Dataisemptyi.text") + "!");
- return;
- }
- if (listView3.FocusedItem == null)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
- //id = listView3.Items[0].Tag.ToString();
- return;
- }
- DialogResult dr;
- dr = MessageBox.Show(PdnResources.GetString("Menu.eyousureyouwantodeletet.text"), PdnResources.GetString("Menu.Edit.Delete.Text"), MessageBoxButtons.OKCancel,
- MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
- if (dr == DialogResult.OK)
- {
- string id = string.Empty;
- if (listView3.FocusedItem != null)
- {
- id = listView3.FocusedItem.Tag.ToString();
- }
- //else
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.Pleaseselecadirectoryfirst.Text"));
- // //id = listView3.Items[0].Tag.ToString();
- // return;
- //}
- var point = mic_camerasettings_BLL.FindDefault(Convert.ToInt32(id));
- if (point == null || point.delete_flag == 1)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Abnormalinformation.text"));
- }
- point.delete_flag = 1;
- mic_camerasettings_BLL.Update(point);
- if (listView3.SelectedItems.Count > 0)
- {
- var Index = listView3.SelectedItems[0].Index;
- listView3.Items[Index].Remove();
- }
- else
- {
- listView3.Items[0].Remove();
- }
- }
- else if (dr == DialogResult.Cancel)
- {
- }
- if (listView3.Items.Count > 0)
- {
- listView3.Items[0].Selected = true;
- listView3.Select();
- }
- }
- /// <summary>
- /// 应用按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button14_Click(object sender, EventArgs e)
- {
- if (listView3.Items.Count == 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thereisnolistofdata.text"));
- return;
- }
- if (listView3.FocusedItem == null)
- {
- MessageBox.Show("请选择要应用的数据");
- return;
- }
- string id = listView3.FocusedItem.Tag.ToString();
- if (config.Camera == Convert.ToInt32(id))
- {
- //MessageBox.Show(PdnResources.GetString("Menu.Thepointditanceisenabled.text"));
- return;
- }
- config.Camera = Convert.ToInt32(id);
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- //MessageBox.Show(PdnResources.GetString("Menu.nablesuccessfui.text"));
- listView3.BeginUpdate();
- int nRowOrder = 0;
- int nRowOrders = listView3.Items.Count;//行数
- for (nRowOrder = 0; nRowOrder < nRowOrders; nRowOrder++)//遍历listView1的每一行
- {
- ListViewItem lvi = listView3.Items[nRowOrder];
- if (lvi.SubItems[1].Text == "√")
- {
- lvi.SubItems[1].Text = "×";
- }
- }
- var Index = listView3.SelectedItems.Count < 1 ? listView3.FocusedItem.Index : listView3.SelectedItems[0].Index;
- var lv = listView3.Items[Index];
- lv.SubItems[1].Text = "√";
- listView3.EndUpdate();
- }
- else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Enablethefailure.text"));
- }
- //this.Close();
- //MessageBox.Show(PdnResources.GetString("Menu.Applicationsuccessfully.Text")+ "!");
- }
- /// <summary>
- /// 方向设置确定按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button18_Click(object sender, EventArgs e)
- {
- if (radioButton6.Checked)
- {
- config.ZMovementDirection = 0;
- }
- else if (radioButton7.Checked)
- {
- config.ZMovementDirection = 1;
- }
- if (radioButton8.Checked)
- {
- config.XLeftMovementDirection = 0;
- }
- else if (radioButton9.Checked)
- {
- config.XLeftMovementDirection = 1;
- }
- if (radioButton10.Checked)
- {
- config.XRighttMovementDirection = 0;
- }
- else if (radioButton11.Checked)
- {
- config.XRighttMovementDirection = 1;
- }
- if (radioButton12.Checked)
- {
- config.YLeftMovementDirection = 0;
- }
- else if (radioButton13.Checked)
- {
- config.YLeftMovementDirection = 1;
- }
- if (radioButton14.Checked)
- {
- config.YRighttMovementDirection = 0;
- }
- else if (radioButton15.Checked)
- {
- config.YRighttMovementDirection = 1;
- }
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(config);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- if (!FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Directionsettingfailed.text") + "!");
- //MessageBox.Show(PdnResources.GetString("Menu.Directionsetsuccessfully.text")+"!");
- //this.Close();
- }
- //else
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.Directionsettingfailed.text")+ "!");
- //}
- }
- /// <summary>
- /// 方向设置取消按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button19_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 辅助线样式应用按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button20_Click(object sender, EventArgs e)
- {
- Startup.instance.guideStyleModel.lineStyle = this.comboBox2.SelectedIndex;
- Startup.instance.guideStyleModel.lineColour = this.panel6.BackColor.ToArgb();
- Startup.instance.guideStyleModel.lineWidth = this.numericUpDown1.Value;
- //另存为XML
- string stageModelXml = XmlSerializeHelper.XmlSerialize<GuideStyleModel>(Startup.instance.guideStyleModel);
- string filePath = Application.StartupPath + @"\Config\Default\SetUp\GuideStyle.xml";
- FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create);
- }
- /// <summary>
- /// 辅助线样式取消按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button21_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
|