使用 Wix 工具集的 UI 中的后退/下一步按钮 [英] Back/Next Button in UI using Wix toolset

查看:13
本文介绍了使用 Wix 工具集的 UI 中的后退/下一步按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法制作足够的按钮来在窗口之间正常移动.我的安装程序包含 3 个窗口.如果我在后退按钮"中执行NewDialog",则窗口会再次打开.如果我执行EndDialog" - 窗口消失.

I can not make adequate buttons to move normally between windows. My installer contains 3 windows. If I do "NewDialog" in "Back-button", the windows open once again. And if I do "EndDialog"- the windows disappear.

<UI Id="UserInterface">
  <Property Id="WixUI_Mode" Value="Custom" />
  <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
  <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
  <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
  <DialogRef Id="ProgressDlg" />
  <DialogRef Id="ErrorDlg" />
  <DialogRef Id="FilesInUse" />
  <DialogRef Id="FatalError" />
  <DialogRef Id="UserExit" />
  <Dialog Id="IISSettings" Width="250" Height="160" Title="IIS Settings">
    <Control Type="Text" Id="HostNameEditLabel" X="10" Y="10" Width="200" Height="15" Text="Hostname" />
    <Control Type="Edit" Id="HostNameEdit"  X="10" Y="30" Width="118" Height="15" Property="HOSTNAME" Text="{80}" Indirect="no" />
    <Control Type="PushButton" Id="BrowseLicenseFile" X="165" Y="70" Width="75" Height="15" Text="Browse...">
      <Publish Event="DoAction" Value="BrowseForCertificateFileCA" Order="1"><![CDATA[1]]></Publish>
      <Publish Property="CERTPATH" Value="[CERTPATH]"><![CDATA[1]]></Publish>
    </Control>
    <Control Type="Text" Id="PasswordLabel" X="10" Y="90" Width="82" Height="15" Text="Сertificate password" />
    <Control Type="Edit" Password="yes" Id="CertificatePassword" X="10" Y="105" Width="123" Height="15" Property="PASSCERT" />
    <Control Type="PushButton" Id="Next" X="184" Y="130" Width="56" Height="15" Default="yes" Text="!(loc.WixUINext)">
      <Publish Event="EndDialog" Value="Return"></Publish>
    </Control>
    <Control Type="PushButton" Id="Cancel" X="120" Y="130" Width="56" Height="15" Cancel="yes" Text="!(loc.WixUICancel)">
      <Publish Event="SpawnDialog" Value="CancelDlg">
      </Publish>
    </Control>
  </Dialog>
  <Dialog Id="PortControlUserService" Width="370" Height="200" Title="Settings">
    <Control Id="InfoText" Type="Text" X="10" Y="10" Width="350" Height="15" Text="*У пользователя должны быть права администратора на клиентских компьютерах!" />
    <Control Id="DbServerNameEditLabel" Type="Text" X="10" Y="35" Width="350" Height="15" Text="User login" />
    <Control Id="DbServerNameEdit" Type="Edit" X="10" Y="50" Width="350" Height="18" Property="USERLOGIN" Text="{80}" Indirect="no" />
    <Control Id="PasswordEditLabel" Type="Text" X="10" Y="85" Width="350" Height="15" Text="User Password" />
    <Control Id="PasswordEdit" Type="Edit" Password="yes" X="10" Y="100" Width="350" Height="18" Property="USERPASSWORD" Text="{80}" Indirect="no" />
    <Control Id="Back" Type="PushButton" X="156" Y="130" Width="56" Height="17" Text="!(loc.WixUIBack)">
      <Publish Event="NewDialog" Value="IISSettings"></Publish>
    </Control>
    <Control Id="Next" Type="PushButton" X="236" Y="130" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
      <Publish Event="EndDialog" Value="Return"></Publish>
    </Control>
    <Control Id="Cancel" Type="PushButton" X="304" Y="130" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
      <Publish Event="SpawnDialog" Value="CancelDlg"></Publish>
    </Control>
  </Dialog>
  <Dialog Id="PortControlParams" Width="370" Height="350" Title="Settings">
    <Control Id="DbServerNameEditLabel" Type="Text" X="10" Y="10" Width="350" Height="15" Text="Database Server Name" />
    <Control Id="DbServerNameEdit" Type="Edit" X="10" Y="35" Width="350" Height="18" Property="DBSERVERNAME" Text="{80}" Indirect="no" />
    <Control Id="DbInstanceNameEditLabel" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Database Instance Name" />
    <Control Id="DbInstanceNameEdit" Type="Edit" X="10" Y="85" Width="350" Height="18" Property="DBINSTANCENAME" Text="{80}" Indirect="no" />
    <Control Id="PasswordEdit" Type="Edit" Password="yes" X="10" Y="235" Width="350" Height="18" Property="DBPASSWORD" Text="{80}" Indirect="no" />
    <Control Id="Back" Type="PushButton" X="156" Y="273" Width="56" Height="17" Text="!(loc.WixUIBack)">
      <Publish Event="NewDialog" Value="PortControlUserService"></Publish>
    </Control>
    <Control Id="Next" Type="PushButton" X="236" Y="273" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
      <Publish Event="EndDialog" Value="Return"></Publish>
    </Control>
    <Control Id="Cancel" Type="PushButton" X="304" Y="273" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
      <Publish Event="SpawnDialog" Value="CancelDlg"></Publish>
    </Control>
  </Dialog>
  <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
  <InstallUISequence>
    <Show Dialog="IISSettings" Before="PortControlUserService" ></Show>
    <Show Dialog="PortControlUserService" Before="PortControlParams" ></Show>
    <Show Dialog="PortControlParams" Before="ExecuteAction" ></Show>
  </InstallUISequence>
</UI>

如果我在后退按钮"中添加SpawnDialog",窗口将出现在另一个窗口的顶部,我需要有一个窗口.看了很多论坛,还是很难.

if I add "SpawnDialog" in "Back button", the windows will appear on top of another window, and I need to have one window. Looked at a lot of forums, but it's hard.

推荐答案

对话顺序:请看看这是否有帮助:Wix,以前版本存在时的自定义对话框.

<小时>

对话框自定义:关于 自定义 WiX 对话框.也许还可以参见 Helge Klein 的真实世界样本(Wayback - 存档版本)用于对话框更改(ServerDlg.wxsWixUI_HK.wxsLicenseAgreementDlg_HK.wxs) 和许多其他不错的功能.自定义内置 WixUI 对话框集.

并加入此一般 WiX 快速入门提示".

这篇关于使用 Wix 工具集的 UI 中的后退/下一步按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆