Ejemplo n.º 1
0
 private void Paging()
 {
     if (iActivePage == 1)
     {
         m_btnFirstPage.Enabled = false;
         m_btnLastPage.Enabled  = true;
         m_btnNextPage.Enabled  = true;
         m_btnPrePage.Enabled   = false;
     }
     else if (iActivePage > 1 && iActivePage < Files.Count)
     {
         m_btnFirstPage.Enabled = true;
         m_btnLastPage.Enabled  = true;
         m_btnNextPage.Enabled  = true;
         m_btnPrePage.Enabled   = true;
     }
     else if (iActivePage == Files.Count)
     {
         m_btnFirstPage.Enabled = true;
         m_btnLastPage.Enabled  = false;
         m_btnNextPage.Enabled  = false;
         m_btnPrePage.Enabled   = true;
     }
     m_textboxActivePage.Text = iActivePage.ToString();
     DicomViewer.CloseAllImages();
     DicomViewer.OpenDicomImage(Files[iActivePage - 1], 0);
 }
Ejemplo n.º 2
0
        public void OpenDicomImages(List <string> lstFile)
        {
            try
            {
                Files        = lstFile;
                this.Enabled = false;
                //foreach (string filePath in lstFile)
                //{
                //    DicomViewer.OpenDicomImage(filePath, 0);
                //}

                if (Files.Count == 0 || Files.Count == 1)
                {
                    plPage.Visible = false;
                }

                if (Files.Count > 0)
                {
                    DicomViewer.OpenDicomImage(Files[0], 0);
                }

                if (Files.Count > 1)
                {
                    m_btnFirstPage.Enabled      = false;
                    m_btnLastPage.Enabled       = true;
                    m_btnNextPage.Enabled       = true;
                    m_btnPrePage.Enabled        = false;
                    m_textboxActivePage.Text    = "1";
                    m_textboxActivePage.Enabled = true;
                    m_textboxTotalPages.Text    = Files.Count.ToString();
                    m_textboxTotalPages.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                _logger.Error("OpenDicomImages, exception:" +
                              ex.ToString());
            }

            this.Enabled = true;
        }