I have released a new version of my simple source code editor MonoPad. The version is 0.5.
Get it from my files section: Download MonoPad
Tag Archive for '.NET'
Page 3 of 3
To generate a square thumbnail in c#, use this code:
public Bitmap Generate75x75Pixel(Bitmap image) {
if(image == null)
throw new ArgumentNullException("image");
Bitmap bmp = null;
Bitmap crapped = null;
int x = 0, y = 0;
double prop = 0;
if(image.Width > 75) {
// compute proportation
prop = (double)image.Width / (double)image.Height;
if(image.Width > image.Height) {
x = (int)Math.Round(75 * prop, 0);
y = 75;
}
else {
x = 75;
y = (int)Math.Round(75 / prop, 0);
}
bmp = new Bitmap((Image)image, new Size(x, y));
crapped = new Bitmap(75, 75);
Graphics g = Graphics.FromImage(crapped);
g.DrawImage(bmp,
new Rectangle(0, 0, 75, 75),
new Rectangle(0, 0, 75, 75),
GraphicsUnit.Pixel
);
bmp = crapped;
}
else {
crapped = image;
}
return bmp;
}
I have released y new version of my small and simple C# editor MonoPad. It includes a startscript to start the programm with arguments using the “MonoPad %@” command.
You can find the download at sourceforge and on my files section.
So, i have uploaded the first open version of the simple C# editor MonoPad. You can download it from Sourceforge.
Remember it is early version and i have something to do for it.
Yes, i love it. Lluis work on the integration of Glade-3 GUI designer into MonoDevelop. With this recent changes you can work on your Glade-based UIs complete in MonoDevelop. But the absolutly best is that, whenever you add a new event handler it automatically generates the code and write it to the C# file.
MonoDevelop looks more and more like a Visual Studio or a SharpDevelop (ok, i know – should be the same).








Letzte Kommentare