private void Btn_NewAttachmentMod_Click(object sender, RoutedEventArgs e) { OpenFileDialog openDialog = new OpenFileDialog(); openDialog.Filter = "Képek|*.jpg;*.png;*.bmp|Dokumentumok|*.docx;*.doc;*.pdf|Minden fájl|*.*"; openDialog.Multiselect = true; if (openDialog.ShowDialog() == true) { FilesToSave = new List <Attachment>(); LocalPathToSave = new List <string>(); foreach (string file in openDialog.SafeFileNames) { Attachment att = new Attachment(file); Procedure.AddAttachment(att); FilesToSave.Add(att); } foreach (string file in openDialog.FileNames) { LocalPathToSave.Add(file); } ListBox_Attachments.Items.Refresh(); } }