获取项目所有表格 [英] Get Project All Forms

查看:68
本文介绍了获取项目所有表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我,因为我可以收到项目,所以C#中的所有表格对象都不使用Assembly.
谢谢!

Hi, tell to me, please, as I can receive the project, all forms objects in C# do not use Assembly.
Thanks!

推荐答案

在运行时没有项目".您可以获取该应用程序拥有的所有表格.请参阅System.Windows.Forms.Application.OpenForms.这就是您真正需要的.


另外(如果需要一些其他信息),可以处理每个事件FormShownFormClosingFormClose,以跟踪每个表单并将信息收集在Application所保存的容器中.子类Application实现每种表单已知的某些报告接口(抛出可用的sigleton属性,也称为Application).很简单.

—SA
There is not "project" during run-time. You can get all forms owned by the Application. Please see System.Windows.Forms.Application.OpenForms. This is all you really need.


Additionally (if you need some extra information), you could handle each event FormShown, FormClosing, FormClose to track each form and collect the information in an container held by the Application. Sub-class Application to implement some reporting interface known by each form (throw available sigleton property also called Application). Easy enough.

—SA


这篇关于获取项目所有表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆