Ejemplo n.º 1
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            new PictureDownload();

            Notifiercs notifiercs = new Notifiercs();

            notifiercs.notifier.ShowSuccess("Picture put in clipboard");
        }
Ejemplo n.º 2
0
        private void ClipboardChanged(Object sender, ClipboardChangedEventArgs e)
        {
            // Is the content copied of text type?
            if (Clipboard.ContainsText())
            {
                if (e.Content.ToString() != clipboardCache)
                {
                    // Get the cut/copied text.
                    clipboardCache = e.Content.ToString();
                    clipboardTimer.Start();

                    textHandling.UploadText(e.Content.ToString());

                    Notifiercs notifiercs = new Notifiercs();
                    //notifiercs.notifier.ShowSuccess("Clipboard uploaded");
                }
            }

            // Is the content copied of image type?
            else if (Clipboard.ContainsImage() || Handlers.ClipBoardContainsDropFileImg())
            {
                // Get the cut/copied image.
                new PictureHandling.PictureUpload();
            }

            // Is the content copied of file type?
            else if (e.ContentType == SharpClipboard.ContentTypes.Files)
            {
                // Get the cut/copied file/files.
                //Debug.WriteLine(clipboard.ClipboardFiles.ToArray());

                // ...or use 'ClipboardFile' to get a single copied file.
                //Debug.WriteLine(clipboard.ClipboardFile);
            }

            // If the cut/copied content is complex, use 'Other'.
            else if (e.ContentType == SharpClipboard.ContentTypes.Other)
            {
                // Do something with 'clipboard.ClipboardObject' or 'e.Content' here...
            }
        }