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);
        }
예제 #4
0
 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");
            }
        }
예제 #6
0
        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);
                    }
                }
            }
        }
예제 #7
0
 internal SaveFileEventArgs(AdditionFile file)
 {
     this.file = file;
 }
        public void RemoveFile(string fileName)
        {
            AdditionFile file = AdditionFiles.FirstOrDefault(f => f.Name.CompareTo(fileName) == 0);

            RemoveFile(file);
        }
예제 #9
0
 public void RemoveFile(AdditionFile file)
 {
     Files.Remove(file);
     OnPropertyChanged("Files");
 }