Configure the SavePanel (type)

Create labels, NetLogic, context object, and a button.
Prerequisites
Set the default external code editor. See Set the default code editor.
  1. Create a panel title label:
    1. In
      Project view
      , right-click
      SavePanel (type)
      and select
      New
      Base controls
      Label
      .
    2. Hover-over the label, select
      Edit
      , and enter
      PanelTitleLabel
      .
    3. In
      Properties
      , set
      Text
      to
      Save Panel
      .
  2. Add a NetLogic that logs different messages based on the option selected from the dialog:
    1. In
      Project view
      , right-click
      SavePanel (type)
      and select
      New
      Runtime NetLogic
      .
    2. Hover-over the NetLogic, select
      Edit
      , and enter
      ConfirmationNetLogic
      .
    3. Double-click the NetLogic.
      An external editor opens.
    4. Replace the existing code with the following code:
      #region StandardUsing using System; using FTOptix.Core; using FTOptix.CoreBase; using FTOptix.HMIProject; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.NetLogic; using FTOptix.UI; using FTOptix.OPCUAServer; #endregion public class ConfirmationNetLogic : FTOptix.NetLogic.BaseNetLogic { [ExportMethod] public void SaveLogic() { Log.Info("Saved!"); } [ExportMethod] public void CancelLogic() { Log.Info("Cancel!"); } }
    5. Save the code.
  3. Create a confirmation dialog context object:
    1. In
      Project view
      , right-click
      SavePanel (type)
      and select
      New
      ConfirmationDialogContext
      .
    2. In
      Properties
      , set
      Message
      to
      Do you really want to save?
      .
  4. Create a save button:
    1. In
      Project view
      , right-click
      SavePanel (type)
      and select
      New
      Base controls
      Button
      .
    2. Hover-over the button, select
      Edit
      , and enter
      SaveButton
      .
    3. In
      Properties
      , set
      Text
      to
      Save
      .
    4. In
      Events
      , next to
      MouseClick event
      , select
      Add
      and select
      Commands
      UI commands
      Open dialog window
      .
    5. Under
      Input arguments
      , create a dynamic link between
      Dialog
      and
      ProjectName
      UI
      ConfirmationDialog (type)
      .
    6. Under
      Input arguments
      , create a dynamic link between
      AliasNode
      and
      ProjectName
      UI
      SavePanel (type)
      ConfirmationDialogContext1@NodeId
      .
      TIP: You can select the
      @Attribute
      values from the
      Attribute
      drop-down menu at the bottom of the dialog.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.