コード例 #1
0
 private void dgvFileAttachments_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         AttachmentsUsingFilePaths.RemoveAt(e.RowIndex);
         this.refreshAttachemntListUsingFilePaths();
     }
 }
コード例 #2
0
 private void btnAddAttachment_Click(object sender, EventArgs e)
 {
     openFileDialogForAttachments.InitialDirectory = "";
     openFileDialogForAttachments.Reset();
     openFileDialogForAttachments.Title = "Select Email Attachments Using File Paths";
     openFileDialogForAttachments.ShowDialog();
     foreach (string file in openFileDialogForAttachments.FileNames)
     {
         AttachmentsUsingFilePaths.Add(file);
     }
     this.refreshTheAttachmentList();
 }