private void ImageFromSelectedFile(bool suppressMsgBox)
{
+ this.ClearImageSelectedPicture();
+
try
{
- ClearImageSelectedPicture();
-
ImagefilePathText.Text = ImagefilePathText.Text.Trim();
if (string.IsNullOrEmpty(ImagefilePathText.Text) || string.IsNullOrEmpty(this.ImageService))
{
ImageSelectedPicture.Tag = MyCommon.UploadFileType.MultiMedia;
break;
default:
- ClearImageSelectedPicture();
ImagefilePathText.Text = "";
break;
}
}
catch (FileNotFoundException)
{
- ClearImageSelectedPicture();
ImagefilePathText.Text = "";
if (!suppressMsgBox) MessageBox.Show("File not found.");
}
catch (Exception)
{
- ClearImageSelectedPicture();
ImagefilePathText.Text = "";
if (!suppressMsgBox) MessageBox.Show("The type of this file is not image.");
}