public WellSchematic() { InitializeComponent(); DataContext = this; ImagePaths.Add("Image1"); ImagePaths.Add("Image2"); }
public Unit(XElement item) { Description = item.Element("Description").Value; Type = stringsToTypes[item.Attribute("Type").Value]; Answer = item.Attribute("Answer").Value; DemoImagePath = item.Element("Description").Attribute("Image").Value; foreach (var i in item.Elements("Item")) { ImagePaths.Add(i.Value); ImageValues.Add(int.Parse(i.Attribute("Value").Value)); } }
private void BrowseCommandImageClick(object param) { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Multiselect = true; fileDialog.Filter = "Image files (.jpg, .jpeg, .png)|*.jpg; *.jpeg; *.png"; fileDialog.ShowDialog(); ImagePaths.Clear(); DisplayImagePaths = ""; foreach (string filename in fileDialog.FileNames) { ImagePaths.Add(filename); } foreach (string ImagePaths in ImagePaths) { DisplayImagePaths += ImagePaths + "\n"; } }
public void BeginSlideShow() { // Reset Data CurrentPicture = null; ImagePaths.Clear(); // Validate SelectedPath var directories = SelectedPath.Split('%'); foreach (var directory in directories) { if (!Directory.Exists(directory)) { MessageBox.Show("A specified file path is not a real directory. Please ammend.", "Path Not Found", MessageBoxButton.OK, MessageBoxImage.Error); return; } } // Load Files var files = new List <string>(); foreach (var directory in directories) { LoadFiles(directory, ref files); } foreach (var file in files) { ImagePaths.Add(file); } // Shuffle ImagePaths.Shuffle(); // TODO: Check speedy loading // TODO: settings // Progress SlideshowProgress(null, null); }
/// <summary> /// Add an image paths to observable collection /// </summary> /// <param name="tmp"></param> internal void AddImagePaths(C_PathsDouble tmp) { ImagePaths.Add(tmp); }
public void Add(string imagePath) { ImagePaths.Add(imagePath); }