Create the interface elements

Create the required text boxes and buttons.
  1. Create variables:
    1. In the
      Project view
      pane, create three variables by right-clicking the
      Model
      folder and selecting
      New
      Variable
      .
    2. Rename the variables by hovering-over each variable, selecting
      Edit
      , and entering:
      • Source
      • Target
      • Password
    3. For each variable, in the
      Properties
      pane, select
      Int32
      and select
      String
      and clear the value.
  2. Create the source file path text box:
    1. In the
      Project view
      pane, expand the
      UI
      folder.
    2. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Text box
      .
    3. Hover-over the text box, select
      Edit
      , and enter
      SourceBox
    4. In the
      Properties
      pane, set the
      Placeholder text
      property value to
      Source file path
    5. Create a dynamic link between the
      Text
      property and
      ProjectName
      Model
      Source
      .
      For more information about dynamic links, see Create dynamic links.
  3. Create the target file path text box:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Text box
      .
    2. Hover-over the text box, select
      Edit
      , and enter
      TargetBox
      .
    3. In the
      Project view
      pane, select
      TargetBox
      .
    4. In the
      Properties
      pane, set the
      Placeholder text
      property value to
      Target file path
    5. Create a dynamic link between the
      Text
      property and
      ProjectName
      Model
      Target
      .
      For more information about dynamic links, see Create dynamic links.
  4. Create the password text box:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Text box
      .
    2. Hover-over the text box, select
      Edit
      , and enter
      PasswordBox
      .
    3. In the
      Project view
      pane, select
      PasswordBox
      .
    4. In the
      Properties
      pane, set the
      Placeholder text
      property value to
      Password
    5. In the
      Properties
      pane, set the
      Control  type
      property value to
      Password
      This setting obfuscates the entered password.
    6. Create a dynamic link between the
      Text
      property and
      ProjectName
      Model
      Password
      .
      For more information about dynamic links, see Create dynamic links.
  5. Create the Zip button:
    1. In the
      Project view
      pane, right-click
      MainWindow (type)
      and select
      New
      Base controls
      Button
      .
    2. Hover-over the button, select
      Edit
      , and enter
      ZipButton
    3. In the
      Properties
      pane, set the
      Text
      property to
      Zip
    4. In the
      Events
      pane, next to
      MouseClickEvent
      , select
      Add
      and select
      ProjectName
      NetLogic
      ZipUnzipLogic
      CreateZipArchive
      .
  6. Create the unzip button:
    1. In the
      Project view
      pane, right-click
      MainWindow (type)
      and select
      New
      Base controls
      Button
      .
    2. Hover-over the button, select
      Edit
      , and enter
      UnzipButton
    3. In the
      Properties
      pane, set the
      Text
      property to
      Unzip
      .
    4. In the
      Events
      pane, next to
      MouseClickEvent
      , select
      Add
      and select
      ProjectName
      NetLogic
      ZipUnzipLogic
      UnzipArchive
      .
  7. Link the NetLogic with the variables:
    1. In the
      Project view
      pane, expand the
      NetLogic
      folder.
    2. Select
      ZipUnzipLogic
      and in the
      Properties
      pane, create dynamic links between:
      • Password
        and
        ProjectName
        Model
        Password
      • Source
        and
        ProjectName
        Model
        Source
      • Target
        and
        ProjectName
        Model
        Target
      For more information about dynamic links, see Create dynamic links.
  8. Arrange the interface elements.
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.