Example #1
0
        public static bool ContainsText(TextDataFormat?format)
        {
            ThreadedClipboard instance = new ThreadedClipboard();
            Thread            sta      = new Thread(instance.ContainsTextSTA);

            sta.SetApartmentState(ApartmentState.STA);

            if (format != null && !format.HasValue)
            {
                sta.Start(format.Value);
            }
            else
            {
                sta.Start();
            }

            sta.Join();
            return(instance.ContainsTextResult);
        }
Example #2
0
 public static bool ContainsText()
 {
     return(ThreadedClipboard.ContainsText(null));
 }
Example #3
0
 public static string GetText()
 {
     return(ThreadedClipboard.GetText(null));
 }