本文介绍了如何保存子表单数据时更新MDI控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的MDI表单中有一个方法,当子表单保存数据时它将更新MDI Control。 我尝试过: public delegate void ShowAlert(string Message,AlertNotification alertType); public void ShowAlertOnStatusBar(string Message,AlertNotification alertType) { switch(alertType) { case AlertNotification.success: this.Name = Message ; this.toolNotificationStatusLabel1.Text = string.Empty; toolNotificationStatusLabel1.Text =消息; toolNotificationStatusLabel1.ForeColor = Color.Green; 休息; case AlertNotification.error: toolNotificationStatusLabel1.Text = Message; toolNotificationStatusLabel1.ForeColor = Color.Red; 休息; case AlertNotification.info: toolNotificationStatusLabel1.Text = Message; toolNotificationStatusLabel1.ForeColor = Color.SkyBlue; 休息; } } 解决方案 I have a method in my MDI form when ever child form save data it will update MDI Control.What I have tried: public delegate void ShowAlert(string Message,AlertNotification alertType);public void ShowAlertOnStatusBar(string Message,AlertNotification alertType) { switch(alertType) { case AlertNotification.success: this.Name = Message; this.toolNotificationStatusLabel1.Text = string.Empty; toolNotificationStatusLabel1.Text = Message; toolNotificationStatusLabel1.ForeColor = Color.Green; break; case AlertNotification.error: toolNotificationStatusLabel1.Text = Message; toolNotificationStatusLabel1.ForeColor = Color.Red; break; case AlertNotification.info: toolNotificationStatusLabel1.Text = Message; toolNotificationStatusLabel1.ForeColor = Color.SkyBlue; break; } } 解决方案 这篇关于如何保存子表单数据时更新MDI控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 03:11