Esempio n. 1
0
        void DROC_RibbonKeyDown(object sender, KeyEventArgs e)
        {
            try
            {
               
                
                if (e.Control && e.Alt && e.Shift && e.KeyCode == Keys.N) notConnecttoFPD = true;
                if (isAcq)
                {
                    if (e.KeyCode == Keys.N || e.KeyCode == Keys.E)
                    {
                        try
                        {
                            frm_QuickRegistration newForm = new frm_QuickRegistration(m_intCurrDevice1);
                            newForm.ImgPath = txtImgDir.Text.Trim();
                            newForm.WLDataSource = m_dtWLDataSource;
                            newForm.grdList = grdWorkList;
                            newForm.Act = action.Insert;
                            newForm.ShowDialog();
                            SetSuspendingInfo();
                            if (newForm.IsBeginExam)
                            {
                                ModifyWorkListButtons();
                                BeginExam();
                                ShortCut2AddProc(Last_Anatomy, Last_Projection, true, ref _newDetailID);
                            }
                        }
                        catch
                        {
                        }
                        return;
                    }
                   
                    if (e.KeyCode == Keys.P)
                    {
                       
                        return;
                    }
                    if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right)
                    {
                       
                        return;
                    }
                    if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
                    {
                       
                        return;
                    }
                   
                    if (e.KeyCode == Keys.O)
                    {
                      
                        return;
                    }
                }
                if (e.KeyCode == Keys.Enter) ProcessTabKey(true);

               
                if (e.Modifiers == Keys.Control && (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down))
                {
                    //a.PerformClick();
                }
                if (e.Modifiers == Keys.Alt && (e.KeyCode == Keys.Right || e.KeyCode == Keys.Left))
                {
                    //av.PerformClick();
                }
                if (e.KeyCode == Keys.F12)
                {
                    lstFPD560_DoubleClick(lstFPD560, new EventArgs());
                    //_FullScreen.ShowFullScreen();
                    return;
                }
                if (e.Modifiers == Keys.Control && e.KeyCode == Keys.R)
                {
                    mdlStatic.isDisplayImg = false;
                    isLoadding = false;
                    ViewImg();
                    return;
                }
                if (e.KeyCode == Keys.F2 && !Running)
                {
                    cmdRepeatAcquisition.PerformClick();
                }
                if (e.KeyCode == Keys.N && e.Control && e.Alt)
                {
                    UpdateDiagnostic();
                }
                if (e.KeyCode == Keys.F6)
                {
                    //SetPermission();
                }
                if (e.KeyCode == Keys.Escape && Running)
                {
                    cmdSendtoServer.PerformClick();
                }
                if (e.Modifiers == Keys.Control && (e.KeyCode == Keys.V))
                {
                    //bool FileErr = false;
                    //string Err = "";
                    //System.Collections.Specialized.StringCollection _StrClt = Clipboard.GetFileDropList();
                    //foreach (string s in _StrClt)
                    //{
                    //    try
                    //    {
                    //        OpenDicom(_DicomMedicalViewer._medicalViewer, s);
                    //    }
                    //    catch (Exception ex)
                    //    {
                    //        Err += @"File:" + s + " không hợp lệ!\n";
                    //        FileErr = true;
                    //    }
                    //}
                    //if (FileErr) MessageBox.Show(Err);
                }
            }
            catch
            {
                return;
            }
        }
Esempio n. 2
0
 private void mnuCHESTPA_Click(object sender, EventArgs e)
 {
     try
     {
         frm_QuickRegistration newForm = new frm_QuickRegistration(m_intCurrDevice1);
         newForm.ImgPath = txtImgDir.Text.Trim();
         newForm.WLDataSource = m_dtWLDataSource;
         newForm.grdList = grdWorkList;
         newForm.Act = action.Insert;
         newForm.AutoGenPID = chkAutoGenPID.ImageIndex == 0;
         newForm.ShowDialog();
         SetSuspendingInfo();
         if (newForm.IsBeginExam)
         {
             ModifyWorkListButtons();
             BeginExam();
             Last_Anatomy = "CHEST";
             Last_Projection = "PA";
             ShortCut2AddProc(Last_Anatomy, Last_Projection, true, ref _newDetailID);
         }
     }
     catch
     {
     }
 }
Esempio n. 3
0
 private void mnuAdomentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frm_QuickRegistration newForm = new frm_QuickRegistration(m_intCurrDevice1);
         newForm.WLDataSource = m_dtWLDataSource;
         newForm.grdList = grdWorkList;
         newForm.Act = action.Insert;
         newForm.ShowDialog();
         SetSuspendingInfo();
         if (newForm.IsBeginExam)
         {
             ModifyWorkListButtons();
             BeginExam();
             Last_Anatomy = "ABDOMENT";
             Last_Projection = "KUB";
             ShortCut2AddProc(Last_Anatomy, Last_Projection, true, ref _newDetailID);
         }
     }
     catch
     {
     }
 }
Esempio n. 4
0
        void DROC_RibbonKeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.Alt && e.Shift && e.KeyCode == Keys.K)
                {
                    Autosave4Toshiba();
                }
                if (e.Alt && e.Shift && e.Control && e.KeyCode == Keys.A)
                {
                    AutoGenLstFile = true;
                }
                if (e.Control && e.Alt && e.Shift && e.KeyCode == Keys.N) notConnecttoFPD = true;
                if (isAcq)
                {
                    if (e.KeyCode == Keys.N || e.KeyCode == Keys.E)
                    {
                        try
                        {
                            frm_QuickRegistration newForm = new frm_QuickRegistration(m_intCurrDevice1);
                            newForm.ImgPath = txtImgDir.Text.Trim();
                            newForm.WLDataSource = m_dtWLDataSource;
                            newForm.grdList = grdWorkList;
                            newForm.Act = action.Insert;
                            newForm.ShowDialog();
                            SetSuspendingInfo();
                            if (newForm.IsBeginExam)
                            {
                                ModifyWorkListButtons();
                                BeginExam();
                                ShortCut2AddProc(Last_Anatomy, Last_Projection,true,ref _newDetailID);
                            }
                        }
                        catch
                        {
                        }
                        return;
                    }
                    if (e.KeyCode == Keys.S)
                    {
                        cmdSaveImg_Click(cmdSaveImg, new EventArgs());
                        return;
                    }
                    if (e.KeyCode == Keys.P)
                    {
                        cmdDicomPrinter_Click(cmdDicomPrinter, new EventArgs());
                        return;
                    }
                    if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right)
                    {
                        cmdFlipV_Click(cmdFlipV, new EventArgs());
                        return;
                    }
                    if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
                    {
                        cmdFlipH_Click(cmdFlipH, new EventArgs());
                        return;
                    }
                    if (e.KeyCode == Keys.C )
                    {
                        _DicomMedicalViewer.AutoAddRec4CropWhenPressC();
                        return;
                    }

                    if (e.KeyCode == Keys.R)
                    {
                        ChangeSymBol(_DicomMedicalViewer._medicalViewer, _DicomMedicalViewer._medicalViewerCellIndex, _R);
                        return;
                    }
                    if (e.KeyCode == Keys.L)
                    {
                        ChangeSymBol(_DicomMedicalViewer._medicalViewer, _DicomMedicalViewer._medicalViewerCellIndex, _L);
                        return;
                    }
                    if (e.KeyCode == Keys.U )
                    {
                        ChangeSymBol(_DicomMedicalViewer._medicalViewer, _DicomMedicalViewer._medicalViewerCellIndex, _U);
                        return;
                    }
                    if (e.KeyCode == Keys.B )
                    {
                        ChangeSymBol(_DicomMedicalViewer._medicalViewer, _DicomMedicalViewer._medicalViewerCellIndex, _B);
                        return;
                    }
                    if (e.KeyCode == Keys.O )
                    {
                        AddOtherSymbol();
                        return;
                    }
                }
                if (e.KeyCode == Keys.Enter) ProcessTabKey(true);

                if (_DicomMedicalViewer.IsValidCell())
                {
                    if (e.KeyCode == Keys.Back || e.KeyCode == Keys.F5)
                    {
                        try
                        {
                            using (RasterCodecs _codecs = new RasterCodecs())
                            {
                                //_codecs.Options.Load.DiskMemory = true;
                                RasterImage temp = _codecs.Load(CurrCellFileName);
                                Convert2MedicalViewerCell(_DicomMedicalViewer._medicalViewer.Cells[_DicomMedicalViewer._medicalViewerCellIndex]).Image = temp.CloneAll();
                                _DicomMedicalViewer.try2FreeImage(ref temp);
                            }
                        }
                        catch
                        {
                        }
                    }
                    if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Right)
                    {
                        Rotate(_DicomMedicalViewer._medicalViewer, 90,false);


                    }
                    if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Left)
                    {
                        Rotate(_DicomMedicalViewer._medicalViewer, -90,false);
                    }
                }
                if (e.Modifiers == Keys.Control && (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down))
                {
                    //a.PerformClick();
                }
                if (e.Modifiers == Keys.Alt && (e.KeyCode == Keys.Right || e.KeyCode == Keys.Left))
                {
                    //av.PerformClick();
                }
                if (e.KeyCode == Keys.F12)
                {
                    lstFPD560_DoubleClick(lstFPD560,new EventArgs());
                    //_FullScreen.ShowFullScreen();
                    return;
                }
                if (e.Modifiers == Keys.Control && e.KeyCode == Keys.R)
                {
                    mdlStatic.isDisplayImg=false;
                    isLoadding = false;
                    ViewImg();
                    return;
                }
                if (e.KeyCode == Keys.F2 && !Running)
                {
                    cmdRepeatAcquisition.PerformClick();
                }
                if (e.KeyCode == Keys.N && e.Control && e.Alt)
                {
                    UpdateDiagnostic();
                }
                if (e.KeyCode == Keys.F6)
                {
                    //SetPermission();
                }
                if (e.KeyCode == Keys.Escape && Running)
                {
                    cmdSendtoServer.PerformClick();
                }
                if (e.Modifiers == Keys.Control && (e.KeyCode == Keys.V))
                {
                    //bool FileErr = false;
                    //string Err = "";
                    //System.Collections.Specialized.StringCollection _StrClt = Clipboard.GetFileDropList();
                    //foreach (string s in _StrClt)
                    //{
                    //    try
                    //    {
                    //        OpenDicom(_DicomMedicalViewer._medicalViewer, s);
                    //    }
                    //    catch (Exception ex)
                    //    {
                    //        Err += @"File:" + s + " không hợp lệ!\n";
                    //        FileErr = true;
                    //    }
                    //}
                    //if (FileErr) MessageBox.Show(Err);
                }
            }
            catch
            {
                return;
            }
        }