private void butShowHL7_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; List <string[]> listFileNamesDateMod = new List <string[]>(); for (int i = 0; i < ListMedLabs.Count; i++) { string filePath = ODFileUtils.CombinePaths(ImageStore.GetPreferredAtoZpath(), ListMedLabs[i].FileName); bool isFileAdded = false; for (int j = 0; j < listFileNamesDateMod.Count; j++) { if (listFileNamesDateMod[j][0] == filePath) { isFileAdded = true; break; } } if (isFileAdded) { continue; } string dateModified = DateTime.MinValue.ToString(); try { dateModified = File.GetLastWriteTime(filePath).ToString(); } catch (Exception ex) { ex.DoNothing(); //dateModified will be min value, do nothing? } listFileNamesDateMod.Add(new string[] { filePath, dateModified }); } FormMedLabHL7MsgText FormMsgText = new FormMedLabHL7MsgText(); FormMsgText.ListFileNamesDatesMod = listFileNamesDateMod; Cursor = Cursors.Default; FormMsgText.ShowDialog(); }
private void butShowHL7_Click(object sender,EventArgs e) { Cursor=Cursors.WaitCursor; List<string[]> listFileNamesDateMod=new List<string[]>(); for(int i=0;i<ListMedLabs.Count;i++) { bool isFileAdded=false; for(int j=0;j<listFileNamesDateMod.Count;j++) { if(listFileNamesDateMod[j][0]==ListMedLabs[i].FileName) { isFileAdded=true; break; } } if(isFileAdded) { continue; } string dateModified=DateTime.MinValue.ToString(); try { dateModified=File.GetLastWriteTime(ListMedLabs[i].FileName).ToString(); } catch(Exception ex) { //dateModified will be min value, do nothing? } listFileNamesDateMod.Add(new string[] { ListMedLabs[i].FileName,dateModified }); } FormMedLabHL7MsgText FormMsgText=new FormMedLabHL7MsgText(); FormMsgText.ListFileNamesDatesMod=listFileNamesDateMod; Cursor=Cursors.Default; FormMsgText.ShowDialog(); }