private void listAttachments_DoubleClick(object sender, EventArgs e)
        {
            if (listAttachments.SelectedIndex == -1)
            {
                return;
            }
            EmailAttach attach = _listAttachments[listAttachments.SelectedIndex];

            FileAtoZ.OpenFile(FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), attach.ActualFileName), attach.DisplayedFileName);
        }
        private void OpenFile()
        {
            EmailAttach emailAttach       = _listEmailAttachDisplayed[gridAttachments.SelectedIndices[0]];
            string      strFilePathAttach = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName);

            try {
                if (EhrCCD.IsCcdEmailAttachment(emailAttach))
                {
                    string strTextXml = FileAtoZ.ReadAllText(strFilePathAttach);
                    if (EhrCCD.IsCCD(strTextXml))
                    {
                        Patient patEmail = null;                      //Will be null for most email messages.
                        if (_emailMessage.SentOrReceived == EmailSentOrReceived.ReadDirect || _emailMessage.SentOrReceived == EmailSentOrReceived.ReceivedDirect)
                        {
                            patEmail = _patCur;                          //Only allow reconcile if received via Direct.
                        }
                        string strAlterateFilPathXslCCD = "";
                        //Try to find a corresponding stylesheet. This will only be used in the event that the default stylesheet cannot be loaded from the EHR dll.
                        for (int i = 0; i < _listEmailAttachDisplayed.Count; i++)
                        {
                            if (Path.GetExtension(_listEmailAttachDisplayed[i].ActualFileName).ToLower() == ".xsl")
                            {
                                strAlterateFilPathXslCCD = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), _listEmailAttachDisplayed[i].ActualFileName);
                                break;
                            }
                        }
                        FormEhrSummaryOfCare.DisplayCCD(strTextXml, patEmail, strAlterateFilPathXslCCD);
                        return;
                    }
                }
                else if (IsORU_R01message(strFilePathAttach))
                {
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle.  Opening raw file instead.");
                    }
                    else
                    {
                        FormEhrLabOrderImport FormELOI = new FormEhrLabOrderImport();
                        FormELOI.Hl7LabMessage = FileAtoZ.ReadAllText(strFilePathAttach);
                        FormELOI.ShowDialog();
                        return;
                    }
                }
                FileAtoZ.OpenFile(FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName), emailAttach.DisplayedFileName);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
        private void menuItemOpen_Click(object sender, EventArgs e)
        {
            EmailAttach attach = _listEmailAttachDisplayed[gridAttachments.SelectedIndices[0]];

            FileAtoZ.OpenFile(FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), attach.ActualFileName), attach.DisplayedFileName);
        }