Exemple #1
0
        void fragmentAdornerView1_Loaded(object sender, RoutedEventArgs e)
        {
            Point            nullPoint      = new Point(0, 0);
            FrameworkElement adornedElement = (FrameworkElement)m_View1FragmentAdorner.AdornedElement;

            foreach (FragmentObject fragObj in FragmentMarkInfoList)
            {
                if (fragObj.MarkType == FragmentObject.MarkTypeEnum.Mark)
                {
                    if (fragObj.MarkType == FragmentObject.MarkTypeEnum.Mark)
                    {
                        fragObj.CenterPoint = Conversion.ToCartesianPoint(fragObj.Theta2, fragObj.Z1Value, adornedElement.ActualHeight);
                    }

                    m_View1FragmentAdorner.AddFragmentObject(fragObj.CenterPoint,
                                                             /*fragObj.UniqueID,*/
                                                             fragObj.TrimatMarkType,
                                                             fragObj.Radius,
                                                             fragObj.Theta1,
                                                             fragObj.Theta2,
                                                             fragObj.Z1Value,
                                                             fragObj.MarkType);
                }
            }
        }
Exemple #2
0
        void fragmentAdornerView0_Loaded(object sender, RoutedEventArgs e)
        {
            Point            nullPoint      = new Point(0, 0);
            FrameworkElement adornedElement = (FrameworkElement)m_View0FragmentAdorner.AdornedElement;

            foreach (FragmentObject fragObj in FragmentMarkInfoList)
            {
                if (fragObj.MarkType == FragmentObject.MarkTypeEnum.Mark)
                {
                    fragObj.CenterPoint = Conversion.ToCartesianPoint(fragObj.Theta1, fragObj.ZValue, adornedElement.ActualHeight);
                }

                //original radius value is in millimeters convert it to pixels to draw it on screen.
                fragObj.Radius = Conversion.LengthToPixels(fragObj.Radius);

                m_View0FragmentAdorner.AddFragmentObject(fragObj.CenterPoint,
                                                         /*fragObj.UniqueID,*/
                                                         fragObj.TrimatMarkType,
                                                         fragObj.Radius,
                                                         fragObj.Theta1,
                                                         fragObj.Theta2,
                                                         fragObj.ZValue,
                                                         fragObj.MarkType);
            }

            if (m_View0FragmentAdorner.UniformityMarkPointList.Count > 0)
            {
                m_FragmentDataDisplay.UpdateUniformityInfo(m_View0FragmentAdorner.UniformityMarkPointList[0].CenterPoint,
                                                           m_View0FragmentAdorner.UniformityMarkPointList[1].CenterPoint, m_View0HighEnergySource);
            }

            m_View0FragmentAdorner.RemoveMenuItem.Click += new RoutedEventHandler(RemoveMenuItem_Click);
        }