Exemple #1
0
        private void OnCalculationFinished(object sender, CalculatedInformation info)
        {
            //label_1.Text = info.DepthOfRetensyText;
            //label_2.Text = info.AngulationType;
            //label_3.Text = info.AngulationAngleText;
            //label_4.Text = info.AngulationLevelText;
            //label_5.Text = info.SрreadFormingNeeded ? "потребується" : "не потребується";
            //label_6.Text = info.ToothSectioningText_1;
            //label_6_1.Text = info.ToothSectioningText_2;
            //label_7.Text = info.CheeckBoneCutNeeded ? "потребується" : "не потребується";
            //label_8.Text = info.DistalBoneCutNeeded ? "потребується" : "не потребується";
            //label_9.Text = info.SurgicalInjuryLevel;
            //label_10.Text = info.EstimatedDuration;
            //label_11.Text = info.OperationComplexityLevel;
            //label_6_2.Text = info.SectioningN1AngleText +
            //    (info.SectioningN1AngleTypeText != string.Empty ? (", " + info.SectioningN1AngleTypeText) : "");

            ShowInformationPanel();
        }
Exemple #2
0
        private void ButtonInfo_Click(object sender, RoutedEventArgs e)
        {
            CalculatedInformation information = new CalculatedInformation();
            information.AngulationAngle = Math.Round(GetAngulation(), 0);
            information.DepthOfRetensy = GetDepthOfRetensy();

            string InfoText;
            InfoText = "Кут ангуляції: " + Math.Round(GetAngulation(), 0).ToString();
            InfoText += System.Environment.NewLine;

            InfoText += System.Environment.NewLine;

            double len1 = GetProblemToothWidth();
            double len2 = GetTooth7_BoneDistance();

            if (len1 < len2)
            {
                InfoText += "Зуб може бути видаленим без дроблення.";
                information.ToothSectioning = CalculatedInformation.Sectioning.NotNeeded;
                information.DistalBoneCutNeeded = false;
            }
            else if (ToothCanBeRemovedBySingleDivision())
            {
                InfoText += "Зуб може бути видаленим за допомогою одного розбиття.";
                information.ToothSectioning = CalculatedInformation.Sectioning.Single;
                information.DistalBoneCutNeeded = false;
            }
            else if (ToothCanBeRemovedByTwoDivisions(GetFirstDivisionLine()))
            {
                InfoText += "Зуб може бути видаленим за допомогою подвійного дроблення.";
                information.ToothSectioning = CalculatedInformation.Sectioning.Double;
                information.DistalBoneCutNeeded = false;
            }
            else
            {
                InfoText += "Зуб не може бути видаленим без хірургічного втручання.";
                information.DistalBoneCutNeeded = true;
            }

            //Calculate angle between tooth#7 and sectioning line #1
            information.SectioningN1Angle = GetAngleBetweenToothN7AndSectionitnLineN1();
            if (EvaluateTypeAngleOfWorkingTool(SectioningN1) > 0)
            {
                information.SectioningN1AngleTypeText = "зовнішній";
            }
            else if (EvaluateTypeAngleOfWorkingTool(SectioningN1) < 0)
            {
                information.SectioningN1AngleTypeText = "внутрішній";
            }

            if (information.SectioningN1Angle == 0)
            {
                information.SectioningN1AngleTypeText = string.Empty;
            }

            if (OnCalculationFinished != null)
                OnCalculationFinished(this, information);
            //MessageBox.Show(InfoText, "Інформація", MessageBoxButton.OK, MessageBoxImage.Information);
        }