コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
 public object CopyNode(ushort nodeID)
 {
     if (MarkupManager.TryGetMarkup(nodeID, out Markup markup))
     {
         var data = markup.ToXml();
         return(data);
     }
     else
     {
         return(null);
     }
 }
コード例 #3
0
 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);
 }