private void DeleteAllLines() { Logger.LogDebug($"{nameof(NodeMarkupTool)}.{nameof(DeleteAllLines)}"); if (ToolMode == Mode.ConnectLine && !IsSelectPoint && MarkupManager.TryGetMarkup(SelectNodeId, out Markup markup)) { if (UI.Settings.DeleteWarnings) { var messageBox = MessageBoxBase.ShowModal <YesNoMessageBox>(); messageBox.CaprionText = Localize.Tool_ClearMarkingsCaption; messageBox.MessageText = string.Format(Localize.Tool_ClearMarkingsMessage, SelectNodeId); messageBox.OnButton1Click = Delete; } else { Delete(); } bool Delete() { markup.Clear(); Panel.UpdatePanel(); return(true); } } }
public object CopyNode(ushort nodeID) { if (MarkupManager.TryGetMarkup(nodeID, out Markup markup)) { var data = markup.ToXml(); return(data); } else { return(null); } }
public override object Copy(InstanceID sourceInstanceID) { if (sourceInstanceID.Type == InstanceType.NetNode) { ushort nodeID = sourceInstanceID.NetNode; if (MarkupManager.TryGetMarkup(nodeID, out Markup markup)) { var data = markup.ToXml(); return(data); } else { return(null); } } return(null); }