private void OnAddCommand(object o) { string source = Parcourir.ToString(); string fileName = System.IO.Path.GetFileName(Parcourir.ToString()); FileCopy(Parcourir.LocalPath, fileName); Film.Source = new Uri(@System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString() + "/" + fileName); Valid = true; CommandChangedEvent.GetEvent().OnButtonPressedActionHandler(EventArgs.Empty); }
private void OnAddCommand(object o) { string source = Parcourir.ToString(); string fileName = System.IO.Path.GetFileName(Parcourir.ToString()); if (System.IO.Directory.GetParent(Parcourir.LocalPath).ToString() != System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString()) { string targetFile = System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString(); System.IO.File.Copy(@Parcourir.LocalPath, @targetFile + "/" + fileName, true); } Acteur.Photo = new Uri(@System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString() + "/" + fileName); Valid = true; CommandChangedEvent2.GetEvent().OnButtonPressedActionHandler2(EventArgs.Empty); }