摘要: 在原来的WinForm里 我们只要在窗体类设置的头部设置个[System.Runtime.InteropServices.ComVisibleAttribute(true)]然后 webBrowser1.ObjectForScripting = this;这样设置完后 页面上的JS就能访问我们程序里面的方法了,但是在WPF里如果这样设置的话会提示一大串错误提示:执行了 QueryInterface 调用,请求提供 COM 可见的托管类“Cloud.MainWindow”的默认 IDispatch 接口。不过,由于该类没有显式默认接口,并且是从非 COM 可见的类“System.Windows. 阅读全文
posted @ 2012-03-29 10:27 Lonely Bandit 阅读(2724) 评论(3) 推荐(0) 编辑
摘要: #region 上传文件 /// <summary> /// 上传文件 /// </summary> /// <param name="localFile">要上传到FTP服务器的文件</param> /// <param name="ftpPath"></param> public static void UpLoadFile(string localFile, string ftpPath, string ftpUser, string ftpPassword) { if (ft 阅读全文
posted @ 2012-03-28 08:37 Lonely Bandit 阅读(3469) 评论(4) 推荐(0) 编辑