Example #1
0
        private void OnPatientRosterSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            XmlElement xe = e.AddedItems[0] as XmlElement;

            if (xe == null)
            {
                return;
            }

            // update the workspace charts to include the default chart
            XmlNodeList xnl = xe.GetElementsByTagName("chart");
            XmlNode     xn  = xnl[0];

            if (xn != null)
            {
                liveChartsManager.AddChart(xn.InnerText);
            }


            // Setup for 3D transition
            if (powerChecker.ActivePowerPlan != PowerChecker.PowerPlan.PowerSaver)
            {
                Brush brush = Transition3DHelper.CreateBrushFromUIElementWithBitmap(PatientOverview2D);
                if (brush != null)
                {
                    DiffuseMaterial dm = new DiffuseMaterial(brush);
                    PatientOverview3D.Visibility = Visibility.Visible;
                    PatientOverview3D.Flip(dm, dm);
                }
            }


            PatientRosterList3DOverlay.SelectedItem = xe;
        }
        void uiTimerMasterView3D_Tick(object sender, EventArgs e)
        {
            Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(masterView2D);
            DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);

            patientMasterRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.FrontMaterialProperty, (Material)dmFront);
        }
        void detailMain_LayoutUpdated(object sender, EventArgs e)
        {
            double angleTo   = (double)patientDetailRotater3DTransition.GetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty);
            double angleFrom = (double)patientDetailRotater3DTransition.GetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty);

            if (gridRelayout == true)
            {
                gridRelayout = false;

                if (angleFrom == 0)
                {
                    Brush           brushBack = Transition3DHelper.CreateBrushFromUIElementWithBitmap(detailBack2D);
                    DiffuseMaterial dmBack    = new DiffuseMaterial(brushBack);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.BackMaterialProperty, (Material)dmBack);

                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty, (double)90);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty, (double)180);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.DurationTimeProperty, (double)0.62);
                    patientDetailRotater3DTransition.Rotate();
                }

                if (angleFrom == 180)
                {
                    Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(detailFront2D);
                    DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.FrontMaterialProperty, (Material)dmFront);

                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty, (double)90);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty, (double)0);
                    patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.DurationTimeProperty, (double)0.62);

                    patientDetailRotater3DTransition.Rotate();
                }
            }
        }
Example #4
0
        void uiTimerMasterView3D_Tick(object sender, EventArgs e)
        {
            Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(masterView2D);
            DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);

            masterRotater3DTransition.SetValue(XamlTransitions.Rotate3D.FrontMaterialProperty, (Material)dmFront);
        }
Example #5
0
        private void button3_Click(object sender, RoutedEventArgs e)
        {
            Brush brush = Transition3DHelper.CreateBrushFromUIElementWithBitmap(My2D);

            Uri lien = new Uri("pack://application:,,,/Images/LIEN.jpg", UriKind.Absolute);

            ImageBrush  ib = new ImageBrush();
            BitmapImage bi = new BitmapImage(lien);

            ib.ImageSource   = bi;
            ib.ViewportUnits = BrushMappingMode.Absolute;
            brush            = ib;

            if (brush != null)
            {
                DiffuseMaterial dm = new DiffuseMaterial(brush);
                PatientOverview3D.Visibility = Visibility.Visible;
                PatientOverview3D.Flip(dm, dm);
            }
        }
        public void ShowDetailFront()
        {
            Brush           brushBack = Transition3DHelper.CreateBrushFromUIElementWithBitmap(detailBack2D);
            DiffuseMaterial dmBack    = new DiffuseMaterial(brushBack);

            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.BackMaterialProperty, (Material)dmBack);
            patientDetailRotater3DTransition.Visibility = Visibility.Visible;

            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty, (double)180);
            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty, (double)90);
            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.DurationTimeProperty, (double)0.62);

            patientDetailRotater3DTransition.Rotate();

            // Rotate Master View
            Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(masterView2D);
            DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);

            patientMasterRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.FrontMaterialProperty, (Material)dmFront);

            detailFront2DWrapperTranslate.X = 1000;
            detailBack2DWrapperTranslate.X  = 10000;
        }
Example #7
0
        public void ShowDetailFront()
        {
            Brush           brushBack = Transition3DHelper.CreateBrushFromUIElementWithBitmap(detailBack2D);
            DiffuseMaterial dmBack    = new DiffuseMaterial(brushBack);

            detailRotater3DTransition.SetValue(XamlTransitions.Rotate3D.BackMaterialProperty, (Material)dmBack);
            detailRotater3DTransition.Visibility = Visibility.Visible;

            detailRotater3DTransition.SetValue(XamlTransitions.Rotate3D.AngleRotateFromProperty, (double)180);
            detailRotater3DTransition.SetValue(XamlTransitions.Rotate3D.AngleRotateToProperty, (double)90);
            detailRotater3DTransition.SetValue(XamlTransitions.Rotate3D.DurationTimeProperty, (double)0.15);

            detailRotater3DTransition.Rotate();

            // Rotate Master View
            Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(masterView2D);
            DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);

            masterRotater3DTransition.SetValue(XamlTransitions.Rotate3D.FrontMaterialProperty, (Material)dmFront);

            detailFrontGridTranslate.X = 1000;
            detailBackGridTranslate.X  = 10000;
        }
        public void ShowDetailBack()
        {
            Brush           brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(detailFront2D);
            DiffuseMaterial dmFront    = new DiffuseMaterial(brushFront);

            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.FrontMaterialProperty, (Material)dmFront);
            patientDetailRotater3DTransition.Visibility = Visibility.Visible;

            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty, (double)0);
            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty, (double)90);
            patientDetailRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.DurationTimeProperty, (double)0.62);

            patientDetailRotater3DTransition.Rotate();

            // Rotate Master View
            brushFront = Transition3DHelper.CreateBrushFromUIElementWithBitmap(masterView2D);
            dmFront    = new DiffuseMaterial(brushFront);
            patientMasterRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.FrontMaterialProperty, (Material)dmFront);

            patientMasterRotater3DTransition.Visibility = Visibility.Visible;
            patientMasterRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateFromProperty, (double)0);
            patientMasterRotater3DTransition.SetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.AngleRotateToProperty, (double)30);
            patientMasterRotater3DTransition.Rotate();
            double scaleTo = (double)patientMasterRotater3DTransition.GetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.ScaleXToProperty);

            patientMasterRotater3DTransition.AnimateScaleXTo(scaleTo);
            double translateTo = (double)patientMasterRotater3DTransition.GetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.TranslateXToProperty);

            patientMasterRotater3DTransition.AnimateTranslateXTo(translateTo);
            double scaleYTo = (double)patientMasterRotater3DTransition.GetValue(IdentityMine.Avalon.Controls.Rotater3DTransition.ScaleYToProperty);

            patientMasterRotater3DTransition.AnimateScaleYTo(scaleYTo);

            detailFront2DWrapperTranslate.X = 10000;
            detailBack2DWrapperTranslate.X  = 10000;
            masterView2DWrapperTranslate.X  = 10000;
        }