public FormFocus(MainForm mainform, Groove gro, UltraWedge wed, UltraProbe pro, UTPosition pos) { InitializeComponent(); MultiLanguage.getNames(this); SetDefaultGate(); formgatesetting = new FormGateSetting(this, gateB); //Getpara(); this.mainform = mainform; groove = gro; wedge = wed; probe = pro; position = pos; grooveheight = groove.height.Sum(); AutoSetpara(); }
/**Set the text of the form's control. * @param form name of the convert Form */ public static void getNames(Form form) { Hashtable table = MultiLanguage.ReadResource(form.Name, lang); Control.ControlCollection controlNames = form.Controls; try { foreach (Control control in controlNames) { if (control.GetType() == typeof(System.Windows.Forms.MenuStrip)) { GetMenuStripName(control, table); } else if (control.GetType() == typeof(System.Windows.Forms.DataGridView)) { GetDataGridColumnsName(control, table); } else if (control.GetType() == typeof(System.Windows.Forms.ToolStrip)) { GetToolStripName(control, table); } else { GetSubControls(control.Controls, table); } if (table.Contains(control.Name)) { control.Text = (string)table[control.Name]; } } FindContextMenuStrip(form, table); if (table.Contains(form.Name)) { form.Text = (string)table[form.Name]; } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public FormDetectionMode(MainForm mainform, List <SessionInfo> sessionsAttrs) { this.sessionsAttrs = sessionsAttrs; this.mainform = mainform; InitializeComponent(); MultiLanguage.getNames(this); InitCommon(); InitGate(); ReadDetectionFile(); pagetofd.Parent = null; foreach (SessionInfo se in sessionsAttrs) { if (se.sessionIndex == 1) { TOFDDetectioninfo tofdinfo = new TOFDDetectioninfo(); detectionmode.tofdinfolist.Add(tofdinfo); } } }
public FormModify(FormFocus fromFocus, int flag, Groove gro, int meth) { InitializeComponent(); MultiLanguage.getNames(this); this.formFocus = fromFocus; modifyflag = flag; groove = gro; method = meth; if (modifyflag == 0) { methodlabel.Visible = false; methodbox.Visible = false; } Yrange.Text = ""; Anglerange.Text = ""; if (modifyflag == 0) { Setrange(); } }
private void groupToolStrip_Click(object sender, EventArgs e) { //检测时该菜单不应该响应 if (MainForm.IsStart) { MessageShow.show("Measurement has been started, please stop it first.", "检测已启动,请先停止检测。"); return; } if (!isSaved) { DialogResult result = MessageShow.showSelecting("Map datas are not saved and setting the parameters will clear these datas. Do you want to continue?", "融合图未保存,重新设置融合参数将会清空数据。是否继续?"); if (result == DialogResult.No) { return; } } formMeasurementSet.ShowDialog(); clearCycelList(); refreshTabelLayout(); MultiLanguage.getNames(this); }
private void FormGateInfo_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.None; MultiLanguage.getNames(this); }
private void MeasurementSet_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); }
private void FormProduct_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); }
private void FormToranceMonitor_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); initTolerance(); }
private void SaveDialog_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); }
private void FormSelecting_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); }
private void FormRecordFigure_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); this.FormBorderStyle = FormBorderStyle.None; }
private void FormTriggerMode_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); init(); }
private void FormConditioningParameters_Load(object sender, EventArgs e) { MultiLanguage.getNames(this); init(); }