private void textBox_verifyResult_DoubleClick(object sender, EventArgs e) { if (this.Locate == null) { return; } int x = 0; int y = 0; API.GetEditCurrentCaretPos( this.textBox_verifyResult, out x, out y); string strLine = ""; try { strLine = textBox_verifyResult.Lines[y]; } catch { return; } // 析出"(字段名,子字段名, 字符位置)"值 int nRet = strLine.IndexOf("("); if (nRet == -1) { return; } strLine = strLine.Substring(nRet + 1); nRet = strLine.IndexOf(")"); if (nRet != -1) { strLine = strLine.Substring(0, nRet); } strLine = strLine.Trim(); LocateEventArgs e1 = new LocateEventArgs(); e1.Location = strLine; this.Locate(this, e1); }
private void textBox_verifyResult_DoubleClick(object sender, EventArgs e) { if (this.Locate == null) return; int x = 0; int y = 0; API.GetEditCurrentCaretPos( this.textBox_verifyResult, out x, out y); string strLine = ""; try { strLine = textBox_verifyResult.Lines[y]; } catch { return; } // 析出"(字段名,子字段名, 字符位置)"值 int nRet = strLine.IndexOf("("); if (nRet == -1) return; strLine = strLine.Substring(nRet + 1); nRet = strLine.IndexOf(")"); if (nRet != -1) strLine = strLine.Substring(0, nRet); strLine = strLine.Trim(); LocateEventArgs e1 = new LocateEventArgs(); e1.Location = strLine; this.Locate(this, e1); }