mirror of
https://github.com/Stone-Red-Code/ClipCMD.git
synced 2026-09-04 08:56:11 +02:00
Minor code imporvment
This commit is contained in:
@@ -10,8 +10,7 @@ public class ClipboardManager
|
|||||||
|
|
||||||
public ClipboardManager(Window windowSource)
|
public ClipboardManager(Window windowSource)
|
||||||
{
|
{
|
||||||
HwndSource? source = PresentationSource.FromVisual(windowSource) as HwndSource;
|
if (PresentationSource.FromVisual(windowSource) is not HwndSource source)
|
||||||
if (source == null)
|
|
||||||
{
|
{
|
||||||
throw new ArgumentException(
|
throw new ArgumentException(
|
||||||
"Window source MUST be initialized first, such as in the Window's OnSourceInitialized handler."
|
"Window source MUST be initialized first, such as in the Window's OnSourceInitialized handler."
|
||||||
|
|||||||
Reference in New Issue
Block a user