Esempio n. 1
0
        private bool InsertSimpleContentFromLiveClipboard(ContentSourceInfo contentSource, XmlDocument lcDocument)
        {
            ContentSource lcContentSource = contentSource.Instance as ContentSource;

            if (lcContentSource == null)
            {
                Trace.Fail("Unexpected failure to get live clipboard content-source!");
                return(false);
            }

            // create the content
            string content = String.Empty;

            if (lcContentSource.CreateContentFromLiveClipboard(EditorContext.FrameWindow, lcDocument, ref content) == DialogResult.OK)
            {
                _contentSourceSite.InsertContent(content, false);
                return(true);
            }
            else
            {
                return(false);
            }
        }