private void ExecuteModifyImages() { AddPicViewModel AddPVM = new AddPicViewModel(OriginalPicsList.ToList()); AddPic f = new AddPic(); f.DataContext = AddPVM; f.ShowDialog(); var myResult = AddPVM.Result_PicListAfterSave; if (myResult.Count > 0) { } //foreach (var file in myResult) //{ //File.Copy(file.Path, MyImgDirectory.path + "\\" + file.Name); //var tmpFile = new XElement("Pic", file.Name, new XAttribute("Tags", file.TagsAsString)); //d.Document.Element("Pics").Add(tmpFile); //} //File.WriteAllText(XmlTags, d.Document.ToString(), Encoding.UTF8); //LoadImagesFromTMPfolder(); }
private void ExecuteAddImages() { Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); ofd.InitialDirectory = MyImgDirectory.path; ofd.Multiselect = true; if ((bool)ofd.ShowDialog()) { List <Pic> lst = new List <Pic>(); // cambiar por loadtags() ??? XDocument d = XDocument.Parse(File.ReadAllText(XmlTags)); var t = d.Document; var settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Indent = true; settings.NewLineOnAttributes = true; var selectedFiles = ofd.FileNames; foreach (var item in selectedFiles) { lst.Add(ExtMeth.NewPic( item.Split('\\').Last(), item )); } AddPicViewModel AddPVM = new AddPicViewModel(lst); AddPic f = new AddPic(); f.DataContext = AddPVM; f.ShowDialog(); var myResult = AddPVM.Result_PicListAfterSave; if (myResult.Count > 0) { foreach (var file in myResult) { File.Copy(file.Path, MyImgDirectory.path + "\\" + file.Name); var tmpFile = new XElement("Pic", file.Name, new XAttribute("Tags", file.TagsAsString)); d.Document.Element("Pics").Add(tmpFile); } File.WriteAllText(XmlTags, d.Document.ToString(), Encoding.UTF8); LoadImagesFromTMPfolder(); } } }
// Use this for initialization void Start() { screenRatio = (float)Screen.height / Screen.width; startPosition = new Vector3(0, 0, 0); endPosition = new Vector3(0, 2.1f, 0); isClosefront = true; createFolder = this.GetComponent <CreateFolders>(); addPic = this.GetComponent <AddPic>(); for (int i = 0; i < FacePlanes.Count; i++) { FacePlanes[i].SetActive(false); } int VideoBackgroundTexureHeight = Screen.height * 3; pixels = new Color[Screen.width * VideoBackgroundTexureHeight]; VideoBackgroundTexure2 = new Texture2D(Screen.width, Screen.height * 3, TextureFormat.RGB24, false); //faceMap = new Texture2D (576,324); }
// Use this for initialization void Start() { CreateFolder(); addPic = this.GetComponent <AddPic>(); }