Ejemplo n.º 1
0
        public void addRowTeeth(TeethVisual3D teeth, string type)
        {
            measurement.Type = Smile.TEETH;
            string modified_date = DateTime.Today.ToString("dd-MM-yyyy");

            if (type == "man")
            {
                string[] separators  = { ";" };
                string[] _startpoint = teeth.Model.StartPosition.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                string[] _endpoint   = teeth.Model.EndPosition.Split(separators, StringSplitOptions.RemoveEmptyEntries);

                //string spoint = String.Concat(String.Format("{0:0.00}", _startpoint[0]), ";", String.Format("{0:0.00}", _startpoint[1]), ";", String.Format("{0:0.00}", _startpoint[2]));
                //string epoint = String.Concat(String.Format("{0:0.00}", _endpoint[0]), ";", String.Format("{0:0.00}", _endpoint[1]), ";", String.Format("{0:0.00}", _endpoint[2]));
                Point3D spoint = new Point3D(Math.Round(Convert.ToDouble(_startpoint[0]), 2), Math.Round(Convert.ToDouble(_startpoint[1]), 2), Math.Round(Convert.ToDouble(_startpoint[2]), 2));
                Point3D epoint = new Point3D(Math.Round(Convert.ToDouble(_endpoint[0]), 2), Math.Round(Convert.ToDouble(_endpoint[1]), 2), Math.Round(Convert.ToDouble(_endpoint[2]), 2));

                MeasurementTeeth m = new MeasurementTeeth(teeth.Id, Math.Round(teeth.Model.Length, 2), spoint.ToString(), epoint.ToString(), type, modified_date, false);

                Mantooth.Add(m);
                resultDataGridMan.ItemsSource = null;
                resultDataGridMan.ItemsSource = Mantooth;

                resultDataGridMan.Columns[1].IsReadOnly = false;
            }
            else
            {
                string           spoint = null; string epoint = null;
                MeasurementTeeth m = new MeasurementTeeth(teeth.Id, Math.Round(teeth.Model.Length, 2), spoint, epoint, type, modified_date, false);
                Autotooth.Add(m);
                resultDataGridAuto.ItemsSource = null;
                resultDataGridAuto.ItemsSource = Autotooth;
            }
            this.Show();
            return;
        }
Ejemplo n.º 2
0
        private void UncheckBox_Checked(object sender, RoutedEventArgs e)
        {
            MeasurementTeeth t = resultDataGridMan.SelectedItem as MeasurementTeeth;

            if (t != null)
            {
                string[] separators  = { ";" };
                string[] _startpoint = t.SPoint.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                string[] _endpoint   = t.EPoint.Split(separators, StringSplitOptions.RemoveEmptyEntries);

                Point3D spoint = new Point3D(Math.Round(Convert.ToDouble(_startpoint[0]), 2), Math.Round(Convert.ToDouble(_startpoint[1]), 2), Math.Round(Convert.ToDouble(_startpoint[2]), 2));
                Point3D epoint = new Point3D(Math.Round(Convert.ToDouble(_endpoint[0]), 2), Math.Round(Convert.ToDouble(_endpoint[1]), 2), Math.Round(Convert.ToDouble(_endpoint[2]), 2));
                mw.removeLine(spoint, epoint);
            }
        }