c# winform 窗体 对话框绑定的值如何填到主窗体问题

这段代码放在主窗体中

private void txt_KeJiaAModel_DoubleClick(object sender, EventArgs e)
{

TimerEvent();

}



///
<summary> /// 将此函数放到要开始计时的函数事件下 /// </summary> private void TimerEvent() { System.Timers.Timer t = new System.Timers.Timer(1 * 0.5 * 0.5 * 1000); t.Elapsed += new System.Timers.ElapsedEventHandler(timeup); t.Enabled = true; } private void timeup(object sender, System.Timers.ElapsedEventArgs e) { //调用点击事件 this.事件名.PerformClick(); //点击事件调用结束后停止计时 t.Stop(); } private void 事件名() { //赋值 this.文本控件Name.Text = "窗体过来的值 "; }
原文地址:https://www.cnblogs.com/wj1107/p/14187521.html