Willy-Kimura / SharpClipboard

A library for anonymously monitoring clipboard entries.
183 stars 34 forks source link

ClipboardText property is not cleaned when the Clipboard is cleared. #19

Closed C1rdec closed 2 years ago

C1rdec commented 3 years ago

I found that the ClipboardText property is not cleaned after a System.Window.Clipboard.Clear().

Willy-Kimura commented 3 years ago

By default, the ClipboardText property acts like a cache for storing the last copied clipboard text, meaning that it does not directly reference the clipboard's contents.

I'll see what I can do in the next release. For now, try using the Clipboard.ContainsText() method before using the ClipboardText property.

Ideas:

C1rdec commented 3 years ago

As of 3.5.2 Clipboard.ContainsText() does not exist.

Willy-Kimura commented 3 years ago

No, I meant using System.Windows.Forms.Clipboard. The class mentioned contains the method ContainsText(), e.g. System Windows.Forms.ContainsText().

C1rdec commented 3 years ago

I end up keeping the last value of the clipboard on my side. You could add the last value property that you were talking. But I think it would make sense that you keep a way to have those values up to date on your side. ❤️

C1rdec commented 3 years ago

Btw is there a way I can try this before buying? https://gumroad.com/l/qmWSh

Willy-Kimura commented 3 years ago

Thanks for the input. Will try that out.

As for TrialMaker, yes you can definitely reach out for a trial preview of the library. I'll also provide complete documentation and a sample demo just to give you a preview of what it looks like and how it works.