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.
- Create a panel title label:
- InProject view, right-clickSavePanel (type)and select .
- Hover-over the label, selectEditPanelTitleLabel.
- InProperties, setTexttoSave Panel.
- Add a NetLogic that logs different messages based on the option selected from the dialog:
- InProject view, right-clickSavePanel (type)and select .
- Hover-over the NetLogic, selectEditConfirmationNetLogic.
- 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:
- InProject view, right-clickSavePanel (type)and select .
- InProperties, setMessagetoDo you really want to save?.
- Create a save button:
- InProject view, right-clickSavePanel (type)and select .
- Hover-over the button, selectEditSaveButton.
- InProperties, setTexttoSave.
- InEvents, next toMouseClick event, selectAdd
- UnderInput arguments, create a dynamic link betweenDialogand .
- UnderInput arguments, create a dynamic link betweenAliasNodeand .TIP: You can select thevalues from the@AttributeAttributedrop-down menu at the bottom of the dialog.
Provide Feedback