private void btnHistory_Click(object sender, EventArgs e) { if (this.ActiveMdiChild == null) { return; } frmHistory frmh = new frmHistory(); frmh.listBox1.Items.Clear(); frmScriptEdit fse = this.ActiveMdiChild as frmScriptEdit; if (fse.filename != "") { MessageBox.Show("没有历史纪录"); return; } fillListBox(frmh.listBox1, fse.fieldid, fse.tabid, fse.strCode); DialogResult ret = frmh.ShowDialog(); if (ret == DialogResult.OK) { fse.setCode(frmh.strRetCode); } }
private void btnHistory_Click(object sender, EventArgs e) { if (this.ActiveMdiChild == null) return; frmHistory frmh = new frmHistory(); frmh.listBox1.Items.Clear(); frmScriptEdit fse = this.ActiveMdiChild as frmScriptEdit; if (fse.filename != "") { MessageBox.Show("没有历史纪录"); return; } fillListBox(frmh.listBox1, fse.fieldid, fse.tabid, fse.strCode); DialogResult ret = frmh.ShowDialog(); if(ret == DialogResult.OK) { fse.setCode(frmh.strRetCode); } }