예제 #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;
        }
예제 #2
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);
            }
        }