Exemplo 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);
 }
Exemplo n.º 2
0
 public void CloseControl()
 {
     try
     {
         DicomViewer.CloseAllImages();
         DicomViewer.Dispose();
     }
     catch (Exception ex)
     {
         _logger.Error("DICOM CloseControl, exception:" +
                       ex.ToString());
     }
 }
Exemplo n.º 3
0
        public ExportManager(IList nodes, ToolStripProgressBar progressBar, 
            DicomViewer.MainForm.ToolStripProgressBarDelegate toolStripProgressBarDelegate)
        {
            this.elements = new List<DicomElement>();
            this.toolStripProgressBar = progressBar;
            foreach (var item in nodes)
            {
                TreeNode node = (TreeNode)item;
                parseNode(node);
            }

            toolStripProgressBarDelegate(0, countMaximum());
        }
Exemplo n.º 4
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;
        }