Exemplo n.º 1
0
        public static Icon getDllIcon(string iconName, OEMType oemType)
        {
            Depot  depot = new Depot();
            Stream stream;

            switch (oemType)
            {
            case OEMType.HUION:
                stream = depot.loadHuionImage(iconName);
                break;

            case OEMType.GAOMON:
                stream = depot.loadGaomonImage(iconName);
                break;

            default:
                stream = depot.loadTalbetDriverImage(iconName);
                break;
            }

            Icon icon = new Icon(stream);

            stream.Close();
            stream.Dispose();
            return(icon);
        }
Exemplo n.º 2
0
        public static Bitmap getDllImage(string imageName, OEMType oemType)
        {
            Depot  depot = new Depot();
            Stream stream;

            switch (oemType)
            {
            case OEMType.HUION:
                stream = depot.loadHuionImage(imageName);
                break;

            case OEMType.GAOMON:
                stream = depot.loadGaomonImage(imageName);
                break;

            default:
                stream = depot.loadTalbetDriverImage(imageName);
                break;
            }

            Bitmap bitmap = new Bitmap(stream);

            stream.Close();
            stream.Dispose();
            return(bitmap);
        }
Exemplo n.º 3
0
        public static Bitmap getDllImage(string imageName)
        {
            Stream stream = new Depot().loadImage(imageName);
            Bitmap bitmap = new Bitmap(stream);

            stream.Close();
            stream.Dispose();
            return(bitmap);
        }
Exemplo n.º 4
0
        public static Image getDllScaleImage(string imageName, Control v)
        {
            Stream stream = new Depot().loadImage(imageName);

            Console.WriteLine(imageName);
            Console.WriteLine(stream.ToString());
            Image original = Image.FromStream(stream);

            stream.Close();
            stream.Dispose();
            Bitmap bmp    = new Bitmap(original);
            Bitmap bitmap = HuionRender.blowupImage(HuionRender.compressImageWithRate(bmp, v.Width, v.Height),
                                                    DpiHelper.getInstance().XDpi);

            original.Dispose();
            if (bitmap == bmp)
            {
                return((Image)bitmap);
            }
            bmp.Dispose();
            return((Image)bitmap);
        }