使用Wix工具集在UI中返回/下一步按钮

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (136)

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

<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”,窗口将出现在另一个窗口的顶部,我需要有一个窗口。看了很多论坛,但很难。

提问于

扫码关注云+社区

领取腾讯云代金券