我需要在按钮的 can_execute()方法中添加什么样的代码才能打开我为lightswitch应用程序制作的.chm帮助文件以及如何确保即使在发布整个应用程序... .chm文件会自动传输到用户的计算机中并保留在正确的目录中? .....谢谢!
partial void Help_Execute()
{
// Write your code here.
if (AutomationFactory.IsAvailable)
{
dynamic shell = AutomationFactory.CreateObject("Shell.Application");
shell.ShellExecute("C:/Users/Thuto/Documents/Visual Studio 2010/Projects/ElectricalContructors/ElectricalContructors/Client/Resources/SparkHelpDocumentation.chm", "", "", "open", 1);
}
else
{
this.ShowMessageBox("Automation not available");
}
}
经过一个小时的尝试找到一个更好的方式我尝试了这个并且它有效,但我想知道这样做的正确方法,谢谢!
答案 0 :(得分:0)
这是一篇关于在客户端创建图像嵌入资源的文章。我没有尝试使用.chm,但我不明白为什么它不起作用。