private void btnSavePicture_Click(object sender, EventArgs e)
 {
     LanguageData dataLayer = new LanguageData();
     if (_curCard != null && cardPreviewPictureBox.Image != null && dataLayer.ImageToByteArray(cardPreviewPictureBox.Image).Length > 0)
         dataLayer.InsertUpdatePicture(cardPreviewPictureBox.Image, _curCard.ID, _curCard.Answer);
 }
        void wTIM_GetForSelectedCardsCallback(ImageRecievedCallbackItem imageItem)
        {
            if (imageItem.Success)
            {
                //Save the image
                LanguageData dataLayer = new LanguageData();
                dataLayer.InsertUpdatePicture(imageItem.Images[0], imageItem.SearchItem.ID, imageItem.SearchItem.SearchText);
            }
            else
            {
                //Handle the error
                errors.Add(imageItem);
            }

            //update the screen
            this.Invoke(new UpdateAfterImageDownloadedAndSavedCallback(updateAfterImageDownloadedAndSaved), new object[] { imageItem });
        }