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, select , and enterPanelTitleLabel.
- 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, select , and enterConfirmationNetLogic.
- 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, select , and enterSaveButton.
- InProperties, setTexttoSave.
- InEvents, next toMouseClick event, select and select .
- 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