Beispiel #1
0
 public PasteAllToExcel()
 {
     if (!PacientData.hasPins)
     {
         teethNumber = PacientData.getToothEntitiesNumber() - 1;
     }
     else
     {
         teethNumber = PacientData.getToothEntitiesNumber();
     }
     currentExcelBreakIndex = 0;
     currentHeightSum       = 0;
     pinNumber     = PacientData.getPinNumber() - 1;
     pinGroups     = (pinNumber + 2) / 3;
     images        = AllPatientImages.getAllImages();
     toothDetails  = PacientData.toothDetails;
     excelRowBreak = new List <int>();
     pasteInitialData();
     pasteTeeth();
     if (PacientData.hasPins)
     {
         pastePins();
     }
     pasteAllPhotos();
     addBreaksToExcel();
 }
 private void updateUndoButton()
 {
     if (PacientData.hasPins && PacientData.getPinNumber() == 1)
     {
         this.undo.Enabled = false;
         this.save.Visible = false;
     }
     else
     {
         this.undo.Enabled = true;
     }
 }
 private void updateSaveButton()
 {
     if (PacientData.hasPins && PacientData.getPinNumber() != 0)
     {
         this.save.Visible = true;
         return;
     }
     if (PacientData.getIndexImage() < 4)
     {
         this.save.Visible = false;
         return;
     }
     if (PacientData.getGroupComponentIndex() != 1)
     {
         this.save.Visible = false;
         return;
     }
     this.save.Visible = true;
 }
        private void updateTitle()
        {
            if (PacientData.getIndexImage() == 0)
            {
                indexEntityOrTooth.Text = "Over view 1";
                return;
            }
            if (PacientData.getIndexImage() == 1)
            {
                indexEntityOrTooth.Text = "Over view 2";
                return;
            }
            if (!PacientData.hasPins)
            {
                indexEntityOrTooth.Text = "Implant #" + PacientData.getGroupIndex();
                return;
            }
            int diference = 1 + 3 * PacientData.getToothEntitiesNumber();

            indexEntityOrTooth.Text = "Anchor " + PacientData.getPinNumber();
        }
        public static double getRatio()
        {
            if (PacientData.getIndexImage() == 0 || PacientData.getIndexImage() == 1)
            {
                return(1.7660377);
            }
            if (!hasPins)
            {
                if (PacientData.getGroupComponentIndex() == 1)
                {
                    return(1.5705128);
                }
                if (PacientData.getGroupComponentIndex() == 2)
                {
                    return(1.525641);
                }
                if (PacientData.getGroupComponentIndex() == 3)
                {
                    return(1.4807692);
                }
            }
            else
            {
                if (PacientData.getPinNumber() % 3 == 1)
                {
                    return(1.5217391);
                }
                if (PacientData.getPinNumber() % 3 == 2)
                {
                    return(1.4782608);
                }
                if (PacientData.getPinNumber() % 3 == 0)
                {
                    return(1.4347826);
                }
            }

            return(-1);
        }