Пример #1
0
        public override CopyDataObject Copy(bool removeSelection)
        {
            CopyDataObject temp = base.Copy(removeSelection);
            DataObject     data = new DataObject();

            data.SetImage(temp.Image);
            XElement rootElement = new XElement(this.GetType().Name);

            rootElement.Add(new XElement("SessionId", sessionString));
            rootElement.Add(textManager.Serialize());
            rootElement.Add(new XElement("payload", temp.XElement));
            MathEditorData med = new MathEditorData {
                XmlString = rootElement.ToString()
            };

            data.SetData(med);
            //data.SetText(GetSelectedText());
            if (temp.Text != null)
            {
                data.SetText(temp.Text);
            }
            Clipboard.SetDataObject(data, true);
            if (removeSelection)
            {
                DeSelect();
                AdjustCarets();
            }
            return(temp);
        }
Пример #2
0
        public override CopyDataObject Copy(bool removeSelection)
        {
            CopyDataObject temp = ActiveChild.Copy(removeSelection);

            if (removeSelection)
            {
                CalculateSize();
            }
            return(temp);
        }