Example #1
0
        // 拖曳放入檔案event
        void Form1_DragDrop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
            foreach (string file in files)
            {
                FileInfo2 f = new FileInfo2(file);
                // 取第1個檔案
                if (f.isExcel())
                {
                    bwGenExcelArgs.sourceFile = f.getFullName();
                    fromFilePath.Text         = bwGenExcelArgs.sourceFile;

                    initFormWhenOpenExcel();
                    setComboboxItem(bwGenExcelArgs.sourceFile);

                    break;
                }
            }
        }