Exemplo n.º 1
0
        /// <summary>
        /// Try to paste the entire GraphDocument from the clipboard using the specified paste options.
        /// </summary>
        /// <param name="doc">The graph document to paste into.</param>
        /// <param name="options">The options used for paste into that graph.</param>
        public static void PasteFromClipboard(this GraphDocument doc, GraphCopyOptions options)
        {
            object from = ClipboardSerialization.GetObjectFromClipboard("Altaxo.Graph.GraphDocumentAsXml");

            if (from is GraphDocument)
            {
                doc.CopyFrom((GraphDocument)from, options);
                doc.OnUserRescaledAxes();
            }
        }
Exemplo n.º 2
0
        public static void PasteFromClipboardAsTemplateForLayer(GraphDocument doc, IEnumerable <int> layerNumber, GraphCopyOptions options)
        {
            object o = ClipboardSerialization.GetObjectFromClipboard("Altaxo.Graph.GraphLayerAsXml");

            if (null == o)
            {
                return;
            }
            var layer = o as XYPlotLayer;

            if (null != layer)
            {
                doc.RootLayer.ElementAt(layerNumber).CopyFrom(layer, options);
                doc.OnUserRescaledAxes();
            }
        }
		public static void PasteFromClipboardAsTemplateForLayer(GraphDocument doc, IEnumerable<int> layerNumber, GraphCopyOptions options)
		{
			object o = ClipboardSerialization.GetObjectFromClipboard("Altaxo.Graph.GraphLayerAsXml");
			if (null == o)
				return;
			XYPlotLayer layer = o as XYPlotLayer;
			if (null != layer)
			{
				doc.RootLayer.ElementAt(layerNumber).CopyFrom(layer, options);
				doc.OnUserRescaledAxes();
			}
		}