void btnSaveCT_Click(object sender, EventArgs e) { if (!_dictionary.ContainsKey(_selectPath)) { System.Windows.Forms.MessageBox.Show("请先选择一套数据!"); return; } string folder = Path.GetDirectoryName((string)_dictionary[_selectPath][0]); string zipfilename = zipFolder2Zip(folder); string destDicomSaveFolder = ""; //System.Windows.MessageBox.Show("saved success"); UploadProgressWndMA upw = new UploadProgressWndMA(); //upw.Owner = LungCare_Airway_PlanNav.MainWindow.Instance; upw.FileName = zipfilename; upw.InstitutionName = _selectedtCTDicomInfo.InstitutionName; upw.PatientAge = _selectedtCTDicomInfo.PatientAge; upw.PatientName = _selectedtCTDicomInfo.PatientName; upw.PatientSex = _selectedtCTDicomInfo.PatientSex; upw.SeriesInstanceUID = _selectedtCTDicomInfo.SeriesInstanceUID; upw.StudyInstanceUID = _selectedtCTDicomInfo.StudyInstanceUID; upw.acquisitionDate = _selectedtCTDicomInfo.AcquisitionDate; upw.acquisitionTime = _selectedtCTDicomInfo.AcquisitionTime; upw.ShowDialog(); //Thread thread = new Thread(new ThreadStart(delegate { //string datetime = string.Format("{0:yyyy-MM-dd hh-mm-ss}",DateTime.Now); destDicomSaveFolder = Path.Combine(AirwayPatients.BaseDicomFolder, MESPDownloadUpload.OrderId); if (!Directory.Exists(destDicomSaveFolder)) { Directory.CreateDirectory(destDicomSaveFolder); } string[] files = Directory.GetFiles(folder); foreach (var item in files) { File.Copy(item, destDicomSaveFolder + "\\" + Path.GetFileName(item)); } } //)); //thread.Start(); /* * AirwayPatient newPatient = new AirwayPatient(); * newPatient.OrderID = MESPDownloadUpload.OrderId; * * newPatient.DicomFolder = destDicomSaveFolder; * * AirwayPatients patients = AirwayPatients.TestLoad(); * patients.Insert(0, newPatient); * AirwayPatients.TestSave(patients); * */ }
void btnSaveCT_Click(object sender, EventArgs e) { string folder = Path.GetDirectoryName((string)_dictionary[_selectPath][0]); string zipfilename = zipFolder2Zip(folder); //System.Windows.MessageBox.Show("saved success"); UploadProgressWndMA upw = new UploadProgressWndMA(); //upw.Owner = LungCare_Airway_PlanNav.MainWindow.Instance; upw.FileName = zipfilename; upw.InstitutionName = _selectedtCTDicomInfo.InstitutionName; upw.PatientAge = _selectedtCTDicomInfo.PatientAge; upw.PatientName = _selectedtCTDicomInfo.PatientName; upw.PatientSex = _selectedtCTDicomInfo.PatientSex; upw.SeriesInstanceUID = _selectedtCTDicomInfo.SeriesInstanceUID; upw.StudyInstanceUID = _selectedtCTDicomInfo.StudyInstanceUID; upw.acquisitionDate = _selectedtCTDicomInfo.AcquisitionDate; upw.acquisitionTime = _selectedtCTDicomInfo.AcquisitionTime; upw.ShowDialog(); }