c# - WixSharp 注入(inject)多个自定义 CLR 对话框

标签 c# wix windows-installer wixsharp

使用 WixSharp,我们可以插入自定义 System.Windows.Forms 窗口作为对话框。

project.InjectClrDialog("ShowCustomDialog", Dialogs.InstallDirDlg, Dialogs.VerifyReadyDlg);

[CustomAction]
public static ActionResult ShowCustomDialog(Session session)
{
    return WixCLRDialog.ShowAsMsiDialog(new MyCustomDialog(session));
}

MyCustomDialog 派生自 WixCLRDialog 类。

如果我有连续的自定义对话框(在 System.Windows.Forms 中完成)要显示。如何插入它们?

最佳答案

最简单的方法是将多个对话框打包到一个 UI shell 中,并允许 shell 在对话框之间导航。如果您采用这种方法,那么您只需注入(inject)一个 shell-ClrDialog。

顺便说一句,带有多个 CLR 对话框的 UI shell 是我计划很快发布的一项功能。

奥列格

关于c# - WixSharp 注入(inject)多个自定义 CLR 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30381854/

相关文章:

c# - 操作适用于 POST,但不适用于 GET(查询字符串)

c# - 在 std::function 中包装委托(delegate)?

wix - 使用完整版本号重命名 MSI 文件

wix - Bootstrap :在运行前检查是否安装了 msi 版本

c# - 从VS2013切换到VS2015后程序不运行

windows - 如何在 Windows 开始菜单中允许我的程序到 "Run As"?

C# : how to set stored procedure execution with parallelism or improve execution time?

c# - 在 winform 的窗体中居中控件

iis - 在安装 Web 应用程序 IIS 期间添加脚本映射

wix - 有没有关于 WiX 的书?