Esempio n. 1
0
        private static void Refresh(DependencyObject root, Dictionary <string, List <DependencyObject> > points_of_interest)
        {
            if (null != root)
            {
                /*
                 * if (KeyboardTools.IsCTRLDown() && KeyboardTools.IsShiftDown() && KeyboardTools.IsALTDown())
                 * {
                 *  string type = root.GetType().ToString();
                 *  string interesting = "";
                 *  if (type.Contains("LibraryCatalogOverviewControl")) interesting = "***";
                 *  Logging.Info("{0} {1} {2}", interesting, indent, type);
                 * }
                 */

                string poi = WizardDPs.GetPointOfInterest(root);
                if (!String.IsNullOrEmpty(poi))
                {
                    if (!points_of_interest.ContainsKey(poi))
                    {
                        points_of_interest[poi] = new List <DependencyObject>();
                    }
                    points_of_interest[poi].Add(root);
                }

                int child_count = VisualTreeHelper.GetChildrenCount(root);
                for (int i = 0; i < child_count; ++i)
                {
                    DependencyObject dep_obj = VisualTreeHelper.GetChild(root, i);
                    if (null != dep_obj)
                    {
                        Refresh(dep_obj, points_of_interest);
                    }
                }
            }
        }
Esempio n. 2
0
        public Test()
        {
            dock_panel = new DockPanel();

            check_box            = new CheckBox();
            check_box.Checked   += check_box_Checked;
            check_box.Unchecked += check_box_Unchecked;
            DockPanel.SetDock(check_box, Dock.Top);
            dock_panel.Children.Add(check_box);

            Button button = new Button();

            button.Content = "YOOHOOO";
            button.Click  += button_Click;
            DockPanel.SetDock(check_box, Dock.Bottom);
            dock_panel.Children.Add(button);

            text_block      = new TextBlock();
            text_block.Text = "HELLOOOOOOO";
            dock_panel.Children.Add(text_block);


            WizardDPs.SetPointOfInterest(text_block, "TB");
            WizardDPs.SetPointOfInterest(check_box, "Wizard:1:CheckBox");
            WizardDPs.SetPointOfInterest(button, "Wizard:1:Button");

            ControlHostingWindow chw = new ControlHostingWindow("Test", dock_panel);

            PointOfInterestLocator poi_locator = new PointOfInterestLocator();

            Player player = new Player(poi_locator, TestWizard.GetRoute());

            chw.Show();
        }
Esempio n. 3
0
        void button_Click(object sender, RoutedEventArgs e)
        {
            TextBlock tb = new TextBlock();

            tb.Text = "Super";
            ControlHostingWindow window = new ControlHostingWindow("New window", tb);

            WizardDPs.SetPointOfInterest(window, "Wizard:1:TargetWindow");
            window.Show();
        }