Create labels, NetLogic, context object, and a button.
To configure the SavePanel (type)
-
Create a panel title label:
-
In Project view, right-click SavePanel (type) and select .
-
Hover-over the label, select
, and enter PanelTitleLabel.
-
In Properties, set Text to Save Panel.
-
Add a NetLogic that logs different messages based on the option selected from the dialog:
-
In Project view, right-click SavePanel (type) and select .
-
Hover-over the NetLogic, select
, and enter ConfirmationNetLogic.
-
Double-click the NetLogic.
An external editor opens.
-
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!");
}
}
-
Save the code.
-
Create a confirmation dialog context object:
-
In Project view, right-click SavePanel (type) and select .
-
In Properties, set Message to Do you really want to save?.
-
Create a save button:
-
In Project view, right-click SavePanel (type) and select .
-
Hover-over the button, select
, and enter SaveButton.
-
In Properties, set Text to Save.
-
In Events, next to MouseClick event, select
and select .
-
Under Input arguments, create a dynamic link between Dialog and .
-
Under Input arguments, create a dynamic link between AliasNode and .
Tip: You can select the @Attribute values from the Attribute drop-down menu at the bottom of the dialog.