【发布时间】:2019-03-15 20:13:59
【问题描述】:
所以我有一个表格 InvCert 我打开表单 GetSomeInfo 的一个实例 在 GetSomeInfo 中,我有文本框等,并希望这些 .Text 值成为原始形式 InvCert 中的值。我假设 Form.stringname = 将允许我这样做,但我的值并没有跨越到原始形式。不知何故,我同时没有错误消息。
'frmInvCert.certType = comboInvLvl.Text;
frmInvCert.thisYear = dateTimeCurrent.Text;
frmInvCert.myFileName = txtInvestor.Text;
frmInvCert.getAdress = txtAddress.Text;
string certType = comboInvLvl.Text;
new frmInvCert().Show();
this.Close();`
然后,这些值被用于方法中。但是程序并没有等到我们回到原来的表格来填写这些值。它只会创建空白。
this.Hide();
new frmGetSomeInfo().Show();
//creates even if values not filled!
//May need to retun to original instead somehow or find out how to put these mthods into the new form
//initialize checkboxes after with paths connected
//initialize tab pages with paths connected
if(thisYear != null && certType != null && myFileName != null)
{
CreateCertificate();
}
CreateCertificate();
【问题讨论】: