且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

设计模式下VS2012中的问题

更新时间:2022-12-23 21:57:42

第一个错误,基本上是你正在尝试将精度较高的变量转换为精度不允许较低的变量,这是直接不允许的.

其他错误表明变量重复.

我建议与文章作者联系以解决代码中的问题,或者修改代码以消除错误.

如果您决定自己解决问题,请研究本文中的代码,并尝试查明问题所在.

当您将该自定义控件添加到窗体时,将运行自定义控件中的代码,因此这就是您在设计期间遇到错误的原因.要查明确切的位置,请使用调试器和/或利用System.Diagnostics.Debug.WriteLine方法从控件内部获取更多信息.
With the first error, basically you''re trying to convert a variable with larger precision to a variable with smaller precision which isn''t allowed directly.

The other errors indicate a duplicate variable.

I would suggest either contacting the author of the article to resolve the problem in the code or to modify the code to get rid of the errors.

If you decide to solve it by yourself, then investigate the code from the article and try to pinpoint the location of the problem.

When you add that custom control to your form, the code in the custom control is ran so this is why you''re facing the errors during the design time. To pinpoint the exact locatin, use the debugger and/or utilize the System.Diagnostics.Debug.WriteLine method to get more information from inside of the control.


修复程序已在作者链接中上传: )通过MSDN和SOftjaen进行修复
fix uploaded in the author link :) thx MSDN and SOftjaen for the fix