Beispiel #1
0
        private void ReplaceTemplateImageWith(Card matchedCard, Bitmap newImage)
        {
            // Find the path of the template associated with the card
            String targetFile = String.Format("{0}{1}", CardMatchesDirectory, matchedCard.ToFilename("bmp"));

            try
            {
                newImage.Save(targetFile, ImageFormat.Bmp);
                Globals.Director.WriteDebug(WRITE_DEBUG, "Successfully replaced " + targetFile + " with new image");
            }
            catch (Exception)
            {
                Globals.Director.WriteDebug(WRITE_DEBUG, "Warning! Tried to replace " + targetFile + " with a new image but failed because of an exception");
            }
        }
Beispiel #2
0
        private void ReplaceTemplateImageWith(Card matchedCard, Bitmap newImage)
        {
            // Find the path of the template associated with the card
            String targetFile = String.Format("{0}{1}", CardMatchesDirectory, matchedCard.ToFilename("bmp"));

            try
            {
                newImage.Save(targetFile, ImageFormat.Bmp);
                Trace.WriteLine("Successfully replaced " + targetFile + " with new image");
            }
            catch (Exception)
            {
                Trace.WriteLine("Warning! Tried to replace " + targetFile + " with a new image but failed because of an exception");
            }
        }