public static void Open(IListItemEx file)
{
var f = new ResizeImage();
f.InitializeComponent();
f.textBlock1.Text = f.FindResource("txtFilename") + ": " + file.GetDisplayName(SIGDN.NORMALDISPLAY);
f.cvt = new Bitmap(file.ParsingName);
f.textBlock2.Text = f.FindResource("lblHeightCP") + ": " + f.cvt.Height.ToString();
f.textBlock3.Text = f.FindResource("lblWidthCP") + ": " + f.cvt.Width.ToString();
f.spinner1.Value = 100;
f.percsetting = true;
f.textBox1.Text = f.cvt.Width.ToString();
f.textBox2.Text = f.cvt.Height.ToString();
f.percsetting = false;
f.ShowDialog();
if (f.Confirm)
{
System.Drawing.Bitmap cvt = new Bitmap(file.ParsingName);
System.Drawing.Bitmap cst = ChangeImageSize(cvt, f.newwidth, f.newheight);
string ext = file.Extension;
cst.Save(file.ParsingName + " (" + f.newwidth + " X " + f.newheight + ")" + ext);
cvt.Dispose();
cst.Dispose();
}
}