示例#1
0
        private void dgvMergeList_DragDrop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);

            MakeMergeListForm mmlForm = new MakeMergeListForm(dgvMergeList, files);


            if (mmlForm.ShowDialog() == DialogResult.OK)
            {
                lbAddInfo.Text = string.Format("{0}개가 추가되었습니다.", dgvMergeList.Rows.Count);
                rtbMessage.Text = lbAddInfo.Text;
            }
            else
            {
                rtbMessage.Text = "파일 추가 실패";
            }



        }
示例#2
0
        private void btAddPdfs_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "PDF Files|*.pdf";
            openFileDialog1.Multiselect = true;
            openFileDialog1.DefaultExt = ".pdf";
            openFileDialog1.Title = "병합할 파일 선택";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                MakeMergeListForm mmlForm = new MakeMergeListForm(dgvMergeList, openFileDialog1.FileNames);


                if(mmlForm.ShowDialog() == DialogResult.OK)
                {
                    lbAddInfo.Text = string.Format("{0}개가 추가되었습니다.", dgvMergeList.Rows.Count);
                    rtbMessage.Text = lbAddInfo.Text;
                }
                else
                {
                    rtbMessage.Text = "파일 추가 실패";
                }


#if false
                foreach (string fileName in openFileDialog1.FileNames)
                {
                    dgvMergeList.Rows.Add(Path.GetFileName(fileName), PDFInfoHelper.getPageCount(fileName), fileName);
                } 
#endif
            }

            



        }