Beispiel #1
0
        private void changePicBtnPressed(object sender, EventArgs e)
        {
            imageBrowser.ShowDialog();
            if (imageBrowser.FileName == (""))
            {
                return;
            }

            Bitmap newBitmap = new Bitmap(imageBrowser.FileName);

            pictureBox1.Image = utils.ResizeImage(newBitmap, new System.Drawing.Size(256, 256));
            newBitmap.Dispose();
            Properties.Settings.Default.lastImagePath = Path.GetDirectoryName(imageBrowser.FileName);
            imageBrowser.InitialDirectory             = Properties.Settings.Default.lastImagePath;
            Properties.Settings.Default.Save();
        }