public void RemoveFile(AdditionFile file) { if (file != null) { AdditionFiles.Remove(file); } }
private void AddFile(string fileName) { AdditionFile newFile = new AdditionFile(); newFile.FillPath = fileName; AdditionFiles.Add(newFile); OnPropertyChanged("AdditionFiles"); }
public void AddFile(string fileName) { AdditionFile newFile = new AdditionFile { FillPath = fileName }; AdditionFiles.Add(newFile); }
public void AddFile(AdditionFile file) { if (Files == null) { Files = new ObservableCollection <AdditionFile>(); } Files.Add(file); OnPropertyChanged("Files"); }
public void RemoveFile(object obj) { AdditionFile file = obj as AdditionFile; if (file != null) { AdditionFiles.Remove(file); OnPropertyChanged("AdditionFiles"); } }
public void SaveFile(AdditionFile af) { SaveFileDialog sf = new SaveFileDialog(); sf.FileName = af.Name; if (sf.ShowDialog() == true) { using (FileStream fileStream = File.Create(sf.FileName)) { using (var file = connection.FileStorage.OpenRead(af.Id.ToString())) { file.CopyTo(fileStream); } } } }
internal SaveFileEventArgs(AdditionFile file) { this.file = file; }
public void RemoveFile(string fileName) { AdditionFile file = AdditionFiles.FirstOrDefault(f => f.Name.CompareTo(fileName) == 0); RemoveFile(file); }
public void RemoveFile(AdditionFile file) { Files.Remove(file); OnPropertyChanged("Files"); }