Skip to content

Adding a finish banner

Brent Moberly edited this page Jan 12, 2015 · 1 revision

Overview

We need to add three more dialogs before we can move on to more configuration-oriented topics: the finish banner and two progress banners. The finish banner informs users that the InCert process has finished. This dialog is relatively simple, but we will use advanced nested-banner layout techniques for our finish banner's content.

Setup

This tutorial assumes that you have completed the tutorial, Adding a ready to begin dialog, and have a version of the engine that will start and attempt to contact your web-server.

A note on examples

Our xml files are starting to get too long to include their full text inline in these tutorials. When you see this symbol external link in the text, you can click on it to view the xml in question.

Creating the basic finish dialog and wiring it into the tasklist

  1. Add the following to the Banners block of your banners.xml file:
<SimpleBanner name="FinishBanner" height="450" width="500" noCloseQuestion="true">
  <Content>
    <SimpleParagraph>
      <Content>
        <DirectTextContent />
      </Content>
    </SimpleParagraph>  
  </Content>
  <Buttons>
    <ResultButton>
      <Target>NextButton</Target>
      <Text>Exit</Text>
      <IsCancelButton>true</IsCancelButton>
      <Result>ControlResults.ExitUtilityResult</Result>
    </ResultButton>
    <ResultButton>
      <Target>BackButton</Target>
      <Text>Restart</Text>
      <IsDefaultButton>true</IsDefaultButton>
      <Result>ControlResults.RestartComputerResult</Result>
    </ResultButton>
    <UrlButton>
      <Target>HelpButton</Target>
      <Text>Help</Text>
      <Value>https://certdev0.incommontest.org/incommon/index.html</Value>
    </UrlButton>
  </Buttons>
 </SimpleBanner>

This creates the basic frame for your finish banner. There are three minor things to note here:

  1. We are using the `noCloseQuestion` attribute to specify that the dialog should not prompt users to confirm closing the engine if they click the close button. It doesn't make sense to prompt the user here -- this dialog just exits the utility anyway.
  1. We are assigning a `ControlResults.ExitUtilityResult` to the next button.  This will cause the engine to exit when the user clicks the next button (which we are renaming to 'Exit' here).
  1. We are assigning a  `ControlResults.RestartComputerResult` to the back button.  This will cause the engine to restart the computer when the user clicks the back button (which we are renaming to 'Restart' here).

We will be adding more content to our finish banner below.

  1. Add the following xml block to the end of main role-branch in your tasklist.xml file:
<UserInterface.ShowBorderedBannerModal>
  <Properties>
    <Dialog>Main dialog</Dialog>
    <Banner>FinishBanner</Banner>
  </Properties>
</UserInterface.ShowBorderedBannerModal>
  1. Upload tasklist.xml external link and banners.xml external link to your server and run the engine. The engine should now show our finish dialog after we authenticate, accept the license agreement, and click start on the ready-to-begin dialog:

finish dialog

Warning: if you click 'Restart' here, it will restart your computer.

  1. Now let's add some content to our finish banner. To do this, add the following to the Banners block of your banners.xml file:

!ApplicationTitle! Complete! Your computer has been registered for full network access and your personal authentication certificate is ready to use. Restart Restart Restart your computer now (recommended). Exit Exit Close !ApplicationTitle! without restarting. ``` The first and the last of these new `SimpleBanners`, `finish banner.title` and `finish banner.text`, will serve as nested content for our finish banner. `finish banner.title content` serves as nested content for the `finish banner.title` simple banner. Here, nesting allows us to achieve more complex layout results.
  1. Now, modify your FinishBanner xml to include finish banner.title and finish banner.text nested banners:
<SimpleBanner name="FinishBanner" height="450" width="500" noCloseQuestion="true">
  <Content>
    <ContentBlockParagraph borderSize="0" banner="finish banner.title" verticalAlignment="Top" margin="20,53,40,0"  />
    <ContentBlockParagraph borderSize="0" banner="finish banner.text" verticalAlignment="Top" margin="95,0,40,0" />
  </Content>
  <Buttons>
    <ResultButton>
      <Target>NextButton</Target>
      <Text>Exit</Text>
      <IsCancelButton>true</IsCancelButton>
      <Result>ControlResults.ExitUtilityResult</Result>
    </ResultButton>
    <ResultButton>
      <Target>BackButton</Target>
      <Text>Restart</Text>
      <IsDefaultButton>true</IsDefaultButton>
      <Result>ControlResults.RestartComputerResult</Result>
    </ResultButton>
    <UrlButton>
      <Target>HelpButton</Target>
      <Text>Help</Text>
      <Value>https://certdev0.incommontest.org/incommon/index.html</Value>
    </UrlButton>
  </Buttons>
</SimpleBanner>
  1. Upload tasklist.xml external link and banners.xml external link to your server and run the engine. Our finish dialog should now include content:

finish dialog

Here, nesting content banners allows us to align our two blocks of text content to the right of our checkmark glyph. Nested banners can also be used to group layout content in much the same way that nested task branches can be used to group tasks.

The various buttons and links should all work. Again, be forewarned that clicking restart will restart your computer.

Conclusion

In this tutorial, we experimented with using nested banners to realize more complex banner layouts. We also learned how to assign control results ('ControlResults.ExitUtilityResult' and ControlResults.RestartComputerResult) to dialog buttons that will cause the engine to exit and restart the user's computer.