Example #1
0
        private void CurrentClipboard_ValueChanged(object sender, EventArgs e)
        {
            if (GlobalClass.AutomaticCopyImage)
            {
                if ((sender as CurrentClipboard).datatype != CurrentClipboard.DataType.Empty)
                {
                    clipboard = (sender as CurrentClipboard);

                    if (clipboard.datatype == CurrentClipboard.DataType.Text)
                    {
                        string t = clipboard.text;
                        clipboard.Clear();
                        (sender as CurrentClipboard).Clear();

                        OpenFormWithLink(t);

                        //  downloadcontroller.AddNewDownloader(t);
                    }
                    else if (clipboard.datatype == CurrentClipboard.DataType.Image)
                    {
                        //  downloadcontroller.AddNewDownloader(clipboard.image);
                        OpenFormWithImage(clipboard.image);
                        clipboard.Clear();
                        (sender as CurrentClipboard).Clear();
                    }
                }
            }
        }
Example #2
0
 public CopyController( )
 {
     clipboard = new CurrentClipboard();
     ClipboardNotification.ClipboardUpdate += ClipboardNotification_ClipboardUpdate;
     CurrentClipboard.ValueChanged         += CurrentClipboard_ValueChanged;
     downloader = new ImageDownloader();
 }