public bool ContainsText(object format)
        {
            ClipboardAsync instance  = new ClipboardAsync();
            Thread         staThread = new Thread(instance._thContainsText);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start(format);
            staThread.Join();
            return(instance._ContainsText);
        }
        public System.Collections.Specialized.StringCollection GetFileDropList()
        {
            ClipboardAsync instance  = new ClipboardAsync();
            Thread         staThread = new Thread(instance._thGetFileDropList);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start();
            staThread.Join();
            return(instance._GetFileDropList);
        }
        public string GetText(TextDataFormat format)
        {
            ClipboardAsync instance  = new ClipboardAsync();
            Thread         staThread = new Thread(instance._thGetText);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start(format);
            staThread.Join();
            return(instance._GetText);
        }
        public bool ContainsFileDropList()
        {
            ClipboardAsync instance  = new ClipboardAsync();
            Thread         staThread = new Thread(instance._thContainsFileDropList);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start();
            staThread.Join();
            return(instance._ContainsFileDropList);
        }
Пример #5
0
        private void InternalClipboardCopyRtf(Range range)
        {
            Clipboard.Clear();
            range.Select();
            range.Copy();
            ClipboardAsync clAsync = new ClipboardAsync();

            if (clAsync.ContainsText(TextDataFormat.Rtf))
            {
                RtfData       = clAsync.GetText(TextDataFormat.Rtf);
                ParagraphData = SWUtility.RtfToRvfz(RtfData);
            }
        }