目前,Im公司正在实施一项方案,该方案可以与我们的客户可能或无法购买的外围设备互动。 这一装置是痛苦的线索;我们从购买该装置的公司想要我们的客户使用公司自己可以起诉的装置司机。
然而,由于并非所有客户都将购买这一装置,因此,如果他们总是不得不经营第二批可起诉的软件,就是有益的。 为了做到这一点,我需要修改我们的方案,与司机一起工作,不与司机合作。
主动X控制被用于与装置接口。 需要利用Windows Form Designer将这些控制放在地盘上;手工操作使得它容易坠毁,令人痛心。
Is there any "best" way that one could set up a program to detect missing drivers and avoid crashing? The only ideas that I have thought of are:
- Instantiate the controls manually and use try/catch statements to detect and handle missing drivers, but I don t think that this solution is feasible.
- Create 2 versions of each form that may use the device. This is a poor idea because it would require careful copying when changes are made on one version of the form.