System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\working_folder\\";
bool imgLoaded = false; Image currentImg = (Image)sender; if (currentImg.Tag != null) imgLoaded = (bool)currentImg.Tag; if (!imgLoaded) { string filename = ""; OpenFileDialog dlg = new OpenFileDialog(); dlg.DefaultExt = ".tif"; dlg.Filter = "(*.tif,*.tiff)|*.tif;*.tiff"; bool result = (bool)dlg.ShowDialog(this); if (result == true) { filename = dlg.FileName; currentImg.Source = new BitmapImage(new Uri(filename)); this.UpdateLayout(); currentImg.Tag = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)