internal void ImportFile(MSMQHelper.FileTypes ptype) { DialogResult vResult = FileDialog.ShowDialog(); if (vResult == DialogResult.OK) { ImportFileForm vImportFileForm = new ImportFileForm(FileDialog.FileName, ptype); vImportFileForm.FormClosed += new FormClosedEventHandler(vImportFileForm_FormClosed); vImportFileForm.TopLevel = true; vImportFileForm.ShowDialog(); } }
public ImportFileForm(string pFilePath, MSMQHelper.FileTypes pFileType) { InitializeComponent(); gOriMSMQValueList = MSMQHelper.GetLocalMSMQInfo(); if (gOriMSMQValueList != null) { lBoxLocalMSMQ.DataSource = gOriMSMQValueList.Select(item => (string)item.Clone()).ToList <string>(); } this.lbStatus.Text = "匯入畫面啟動成功"; Thread vThread = new Thread(new ParameterizedThreadStart(this.ReadFile)); vThread.IsBackground = true; vThread.Start(new FileInfo(pFilePath, pFileType)); }
public FileInfo(string pFilePath, MSMQHelper.FileTypes pFileType) { this.path = pFilePath; this.type = pFileType; }