Пример #1
0
        /// <inheritdoc />
        public override void Run(GraphController ctrl)
        {
            ctrl.EnsureValidityOfCurrentLayerNumber();
            var currentLayerNumber = ctrl.CurrentLayerNumber;
            var plotLayer          = ctrl.ActiveLayer as XYPlotLayer;

            if (null != plotLayer)
            {
                var clonedItems = plotLayer.PlotItems.Clone();
                ClipboardSerialization.PutObjectToClipboard("Altaxo.Graph.Gdi.Plot.PlotItemCollection.AsXml", clonedItems);
            }
            else
            {
                Current.Gui.ErrorMessageBox("'Can only copy plot content from an XYPlotLayer. Please select another layer.", "Operation not possible");
            }
        }
 /// <summary>
 /// Puts the layer with index <paramref name="layerNumber"/> to the clipboard in XML format.
 /// </summary>
 /// <param name="doc">Graph document to copy.</param>
 /// <param name="layerNumber">Number of the layer to copy.</param>
 public static void CopyToClipboardLayerAsNative(this GraphDocument doc, IEnumerable <int> layerNumber)
 {
     ClipboardSerialization.PutObjectToClipboard("Altaxo.Graph.Graph3D.GraphLayerAsXml", doc.RootLayer.ElementAt(layerNumber));
 }
 /// <summary>
 /// Puts the entire graph to the clipboard in XML format.
 /// </summary>
 /// <param name="doc">Graph to copy to the clipboard.</param>
 public static void CopyToClipboardAsNative(this GraphDocument doc)
 {
     ClipboardSerialization.PutObjectToClipboard("Altaxo.Graph.Graph3D.GraphDocumentAsXml", doc);
 }