コード例 #1
0
        //public static class BitmapSourceConvert
        //{
        //    [DllImport("gdi32")]
        //    private static extern int DeleteObject(IntPtr o);

        //    public static BitmapSource ToBitmapSource(IImage image)
        //    {
        //        if (image != null)
        //        {
        //            using (System.Drawing.Bitmap source = image.Bitmap)
        //            {
        //                IntPtr ptr = source.GetHbitmap();

        //                BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
        //                    ptr,
        //                    IntPtr.Zero,
        //                    Int32Rect.Empty,
        //                    System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());

        //                DeleteObject(ptr);
        //                return bs;
        //            }
        //        }
        //        else
        //        {
        //            return null;
        //        }
        //    }
        //}

        public void DescriptionChange(SuperclassImage Image)
        {

            textBlock1.Text = Image.GetDescription();
        }
コード例 #2
0
        //public static class BitmapSourceConvert
        //{
        //    [DllImport("gdi32")]
        //    private static extern int DeleteObject(IntPtr o);

        //    public static BitmapSource ToBitmapSource(IImage image)
        //    {
        //        if (image != null)
        //        {
        //            using (System.Drawing.Bitmap source = image.Bitmap)
        //            {
        //                IntPtr ptr = source.GetHbitmap();

        //                BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
        //                    ptr,
        //                    IntPtr.Zero,
        //                    Int32Rect.Empty,
        //                    System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());

        //                DeleteObject(ptr);
        //                return bs;
        //            }
        //        }
        //        else
        //        {
        //            return null;
        //        }
        //    }
        //}

        public void DescriptionChange(SuperclassImage Image)
        {
            textBlock1.Text = Image.GetDescription();
        }
コード例 #3
0
 public override string GetDescription()
 {
     return(classImage.GetDescription() + "," + description + "\n");
 }