具有自定义备份和还原方法的 NetLogic

最小示例:自定义备份和还原方法

#region Using directives using System; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.UI; using FTOptix.HMIProject; using FTOptix.CoreBase; using FTOptix.NativeUI; using FTOptix.Retentivity; using FTOptix.Core; using FTOptix.NetLogic; #endregion public class RuntimeNetLogic1 : BaseNetLogic { public override void Start() { // Insert code to be executed when the user-defined logic is started } public override void Stop() { // Insert code to be executed when the user-defined logic is stopped } [ExportMethod] public void DoBackup(string path) { var retentivityStorage = Project.Current.Get("Retentivity/RetentivityStorage") as RetentivityStorage; var resourceUri = ResourceUri.FromAbsoluteFilePath(path); retentivityStorage.Backup(resourceUri); } [ExportMethod] public void DoRestore(string path) { var retentivityStorage = Project.Current.Get("Retentivity/RetentivityStorage") as RetentivityStorage; var resourceUri = ResourceUri.FromAbsoluteFilePath(path); retentivityStorage.Restore(resourceUri); } }
有关实施的更多信息,请参见配置非易失性存储备份和还原按钮。
提供反馈
对本文档有问题或反馈吗? 请在这里提交您的反馈 。
Normal