Beispiel #1
0
        //Constructor take parameters that describe the range
        //to generate apples
        public Apple(Point rangeMin, Point rangeMax, int appleSize, int appleNumber, int tree, int parColors)
        {
            System.Random rand = new Random(Guid.NewGuid().GetHashCode());
            //Setting random position and size of the apple
            Pos = new Point(rand.Next((int)rangeMin.X, (int)rangeMax.X),
                            rand.Next((int)rangeMin.Y, (int)rangeMax.Y));
            Size = appleSize;

            Number = appleNumber;
            TreeNumber = tree;
            ColorsNumber = parColors;

            //Creating Ellipse filled with image
            Figure = new KinectCircleButton();
            //Coloring (1 - red, 2 - green, 3 - yellow)
            int colorTemp = rand.Next(1, ColorsNumber + 1);
            setAppleGraphics(colorTemp);

            // Set the width and height of the Ellipse.
            Figure.Width = Size;
            Figure.Height = Size;

            // Set position of figure
            Figure.Margin = new Thickness(Pos.X, Pos.Y, 0, 0);
            Figure.Name = "Apple" + Number;
            Figure.Content = int.Parse(figure.Name.Substring(5));
            Figure.Foreground = new SolidColorBrush(Colors.Transparent);
        }
        public void update(KinectCircleButton chosenButton)
        {
            this.btnBirth.Opacity = 0.25;
            this.btnEconomics.Opacity = 0.25;
            this.btnHealth.Opacity = 0.25;
            this.btnAZ.Opacity = 0.25;

            if (string.Compare(this.btnBirth.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 1;
                this.btnBirth.Opacity = 1;
                update(neighborhoodName, chosenCategory);

            }
            else if (string.Compare(this.btnEconomics.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 3;
                this.btnEconomics.Opacity = 1;

                update(neighborhoodName, chosenCategory);
            }
            else if (string.Compare(this.btnHealth.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 2;
                this.btnHealth.Opacity = 1;

                update(neighborhoodName, chosenCategory);
            }
            else
            {
                chosenCategory = 4;
                this.btnAZ.Opacity = 1;

                update(neighborhoodName, chosenCategory);
            }
        }
        public void AddCommand(string command, RoutedEventHandler clickEvent, ImageSource icon)
        {
            if (_buttons.Any(button => button.Label == command))
                throw new InvalidOperationException("This command already exists");

            KinectCircleButton newCommand = new KinectCircleButton();
            newCommand.Label = command;
            newCommand.Click += clickEvent;
            newCommand.Foreground = Brushes.White;
            newCommand.Height = 250;
            newCommand.Width = 200;
            newCommand.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            newCommand.Margin = new Thickness(0, -15, 0, 0);
            newCommand.FontFamily = btnBack.FontFamily;

            Image imageIcon = new Image();
            imageIcon.Source = icon;
            imageIcon.Height = 50;
            imageIcon.VerticalAlignment = System.Windows.VerticalAlignment.Center;

            newCommand.Content = imageIcon;
            pnlCommands.Children.Add(newCommand);
            _buttons.Add(newCommand);
        }
Beispiel #4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 11 "..\..\..\UI\ExerciseWindow.xaml"
     ((KinectMotionAnalyzer.UI.ExerciseWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 3:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.color_disp_img = ((System.Windows.Controls.Image)(target));
     return;
     case 5:
     this.ske_disp_img = ((System.Windows.Controls.Image)(target));
     return;
     case 6:
     this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 7:
     this.RecordButton = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 32 "..\..\..\UI\ExerciseWindow.xaml"
     this.RecordButton.Click += new System.Windows.RoutedEventHandler(this.RecordButtonClick);
     
     #line default
     #line hidden
     return;
     case 8:
     this.recordButtonImage = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.AnglesButton = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 35 "..\..\..\UI\ExerciseWindow.xaml"
     this.AnglesButton.Click += new System.Windows.RoutedEventHandler(this.AnglesButtonClick);
     
     #line default
     #line hidden
     return;
     case 10:
     this.angleButtonImage = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.KinectRegionGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
                return;

            case 3:

            #line 22 "..\..\FizzBuzz.xaml"
                ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.HomeButtonClick);

            #line default
            #line hidden
                return;

            case 4:
                this.Cbutton1 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 24 "..\..\FizzBuzz.xaml"
                this.Cbutton1.Click += new System.Windows.RoutedEventHandler(this.KinectCircleClick);

            #line default
            #line hidden
                return;

            case 5:
                this.Cbutton2 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 25 "..\..\FizzBuzz.xaml"
                this.Cbutton2.Click += new System.Windows.RoutedEventHandler(this.KinectCircleClick);

            #line default
            #line hidden
                return;

            case 6:
                this.Cbutton3 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 26 "..\..\FizzBuzz.xaml"
                this.Cbutton3.Click += new System.Windows.RoutedEventHandler(this.KinectCircleClick);

            #line default
            #line hidden
                return;

            case 7:
                this.answer1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.answer2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.answer3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.tickimg = ((System.Windows.Controls.Image)(target));
                return;

            case 11:
                this.Congratulations = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.outputText = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #6
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 8 "..\..\..\UI\AngleSelection.xaml"
     ((KinectMotionAnalyzer.UI.AngleSelection)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.skeleton_img = ((System.Windows.Controls.Image)(target));
     return;
     case 3:
     this.NotifyText = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 4:
     this.HandRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 21 "..\..\..\UI\AngleSelection.xaml"
     this.HandRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 5:
     this.HandLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 22 "..\..\..\UI\AngleSelection.xaml"
     this.HandLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 6:
     this.WristRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 23 "..\..\..\UI\AngleSelection.xaml"
     this.WristRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 7:
     this.ElbowRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 24 "..\..\..\UI\AngleSelection.xaml"
     this.ElbowRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 8:
     this.ShoulderRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 25 "..\..\..\UI\AngleSelection.xaml"
     this.ShoulderRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 9:
     this.Head = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 26 "..\..\..\UI\AngleSelection.xaml"
     this.Head.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 10:
     this.ShoulderCenter = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 27 "..\..\..\UI\AngleSelection.xaml"
     this.ShoulderCenter.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 11:
     this.WristLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 28 "..\..\..\UI\AngleSelection.xaml"
     this.WristLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 12:
     this.ElbowLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 29 "..\..\..\UI\AngleSelection.xaml"
     this.ElbowLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 13:
     this.ShoulderLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 30 "..\..\..\UI\AngleSelection.xaml"
     this.ShoulderLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 14:
     this.Spine = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 31 "..\..\..\UI\AngleSelection.xaml"
     this.Spine.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 15:
     this.HipCenter = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 32 "..\..\..\UI\AngleSelection.xaml"
     this.HipCenter.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 16:
     this.HipRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 33 "..\..\..\UI\AngleSelection.xaml"
     this.HipRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 17:
     this.HipLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 34 "..\..\..\UI\AngleSelection.xaml"
     this.HipLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 18:
     this.KneeRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 35 "..\..\..\UI\AngleSelection.xaml"
     this.KneeRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 19:
     this.KneeLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 36 "..\..\..\UI\AngleSelection.xaml"
     this.KneeLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 20:
     this.AnkleLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 37 "..\..\..\UI\AngleSelection.xaml"
     this.AnkleLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 21:
     this.AnkleRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 38 "..\..\..\UI\AngleSelection.xaml"
     this.AnkleRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 22:
     this.FootLeft = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 39 "..\..\..\UI\AngleSelection.xaml"
     this.FootLeft.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 23:
     this.FootRight = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 40 "..\..\..\UI\AngleSelection.xaml"
     this.FootRight.Click += new System.Windows.RoutedEventHandler(this.JointButtonClick);
     
     #line default
     #line hidden
     return;
     case 24:
     this.XY = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 52 "..\..\..\UI\AngleSelection.xaml"
     this.XY.Click += new System.Windows.RoutedEventHandler(this.PlaneButtonClick);
     
     #line default
     #line hidden
     return;
     case 25:
     this.YZ = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 54 "..\..\..\UI\AngleSelection.xaml"
     this.YZ.Click += new System.Windows.RoutedEventHandler(this.PlaneButtonClick);
     
     #line default
     #line hidden
     return;
     case 26:
     this.XZ = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 56 "..\..\..\UI\AngleSelection.xaml"
     this.XZ.Click += new System.Windows.RoutedEventHandler(this.PlaneButtonClick);
     
     #line default
     #line hidden
     return;
     case 27:
     this.coordinatesImg = ((System.Windows.Controls.Image)(target));
     return;
     case 28:
     this.Done = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 60 "..\..\..\UI\AngleSelection.xaml"
     this.Done.Click += new System.Windows.RoutedEventHandler(this.DoneButtonClick);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #7
0
        public Apple(Apple target, double x, double y)
        {

            //Setting point 
            Pos = new Point(x, y);
            Size = target.Size;

            //Creating Ellipse filled with image
            Figure = new KinectCircleButton();

            if (target.Color == Colors.Red)
                setAppleGraphics(1);
            if (target.Color == Colors.Green)
                setAppleGraphics(2);
            if (target.Color == Colors.Yellow)
                setAppleGraphics(3);
            if (target.Color == Colors.Orange)
                setAppleGraphics(4);
            if (target.Color == Colors.Brown)
                setAppleGraphics(5);

            // Set the width and height of the Ellipse.
            Figure.Width = target.Size;
            Figure.Height = target.Size;

            // Set position of figure
            Figure.Margin = new Thickness(Pos.X, Pos.Y, 0, 0);
            Figure.Name = "Apple" + target.Number;
            Figure.Content = int.Parse(Figure.Name.Substring(5));
            Figure.Foreground = new SolidColorBrush(Colors.Transparent);
            TreeNumber = target.TreeNumber;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.TopTopGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 3:
     this.TopRow = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 4:
     this.BackButton = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 55 "..\..\MainWindow.xaml"
     this.BackButton.Click += new System.Windows.RoutedEventHandler(this.BackAction);
     
     #line default
     #line hidden
     return;
     case 5:
     this.PageContentGrid = ((System.Windows.Controls.Grid)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #9
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.kinectRegionInputBox = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 2:
     this.GradePrincipal = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.imgInputBox = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.edtDestinatarios = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.btnOk = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 6:
     this.imgBtnDesenhar = ((System.Windows.Controls.Image)(target));
     return;
     case 7:
     this.btnCancelar = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 64 "..\..\..\Auxiliar\InputBox.xaml"
     this.btnCancelar.Click += new System.Windows.RoutedEventHandler(this.btnCancelar_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.imgBtnCancelar = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.lblDestinatarios = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 10:
     this.lblExplicacao = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.commandBar = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.pnlCommands = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 3:
     this.btnBack = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.kinectRegionInformacao = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 2:
     this.GradePrincipal = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.imgInformacao = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.btnOk = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 5:
     this.lblMensagem = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #12
0
 public ViewDataScreen(Window MainWindow, KinectSensorChooser SensorChooser, Utilities.State State, string VehicleType)
 {
     // Get the main window and sensor objects
     this.mainWindow = MainWindow;
     this.sensorChooser = SensorChooser;
     // Get the desired data
     this.data = Utilities.Data.SelectDataByStateAndVehicleType(State.Name, VehicleType);
     #if (DEBUG)
     Utilities.Data.PrintDataByStateAndVehicleTypeToConsole(this.data, State.Name, VehicleType);
     #endif
     // Initialize display containers
     this.kRegion = CreateKinectRegion();
     //
     this.maxButtonWidth = this.mainWindow.Width / 7;
     this.maxButtonHeight = this.mainWindow.Height / 2; // Also row separation point in Y
     this.maxButtonDiameter = this.maxButtonHeight <= this.maxButtonWidth ? this.maxButtonHeight : this.maxButtonWidth;
     //
     this.largestDataValue = this.data.Max(value => value.Value);
     this.multiplier = this.largestDataValue / this.maxButtonDiameter;
     #if (DEBUG)
     Console.WriteLine("KRegion size: " + this.kRegion.Width + ", " + this.kRegion.Height);
     Console.WriteLine("Max Button Width: " + this.maxButtonWidth.ToString());
     Console.WriteLine("Max Button Height: " + this.maxButtonHeight.ToString());
     Console.WriteLine("Max Button Diameter: " + this.maxButtonDiameter.ToString());
     Console.WriteLine("Largest Data Value: " + this.largestDataValue.ToString());
     Console.WriteLine("Data Multiplier: " + this.multiplier.ToString());
     #endif
     //
     this.dataBubbles = new List<DataButtonBubble>();
     Random rand = new Random();
     foreach (KeyValuePair<string, int> kvp in this.data)
     {
         KinectCircleButton kcb = new KinectCircleButton();
         kcb.Width = kvp.Value / this.multiplier;
         kcb.Height = kvp.Value / this.multiplier;
         byte[] buffer = new byte[3];
         rand.NextBytes(buffer);
         SolidColorBrush scb = new SolidColorBrush();
         scb.Color = Color.FromRgb(buffer[0], buffer[1], buffer[2]);
         kcb.BorderBrush = scb;
         kcb.Foreground = Brushes.White;
         kcb.Content = kvp.Value.ToString();
         kcb.Click += kcb_Click;
         this.dataBubbles.Add(new DataButtonBubble(kcb, kvp.Value));
     }
     //
     this.buttonGrid = new Grid();
     this.buttonGrid.Width = this.kRegion.Width;
     this.buttonGrid.Height = this.kRegion.Height;
     this.buttonGrid.HorizontalAlignment = HorizontalAlignment.Center;
     this.buttonGrid.VerticalAlignment = VerticalAlignment.Center;
     this.buttonGrid.ShowGridLines = true;
     for (int i = 0; i < 7; i++)
     {
         ColumnDefinition cd = new ColumnDefinition();
         this.buttonGrid.ColumnDefinitions.Add(cd);
     }
     for (int i = 0; i < 2; i++)
     {
         RowDefinition rd = new RowDefinition();
         this.buttonGrid.RowDefinitions.Add(rd);
     }
     int bubblesPlaced = 0;
     int row = 0;
     foreach (DataButtonBubble db in this.dataBubbles)
     {
         Grid.SetColumn(db.Bubble, bubblesPlaced);
         Grid.SetRow(db.Bubble, row);
         bubblesPlaced++;
         if (bubblesPlaced == 7)
         {
             bubblesPlaced = 0;
             row = 1;
         }
         this.buttonGrid.Children.Add(db.Bubble);
     }
     this.kRegion.Content = this.buttonGrid;
 }
Beispiel #13
0
 public DataButtonBubble(KinectCircleButton Bubble, int Data)
 {
     this.Bubble = Bubble;
     this.Data = Data;
 }
        public void update(KinectCircleButton chosenButton)
        {
            this.btnBirth.Opacity = 0.25;
            this.btnEconomics.Opacity = 0.25;
            this.btnHealth.Opacity = 0.25;
            this.btnAZ.Opacity = 0.25;

            this.birthViewer.Visibility = Visibility.Hidden;
            this.econViewer.Visibility = Visibility.Hidden;
            this.healthViewer.Visibility = Visibility.Hidden;
            this.azViewer.Visibility = Visibility.Hidden;
            this.birthViewer.ScrollToLeftEnd();
            this.econViewer.ScrollToLeftEnd();
            this.healthViewer.ScrollToLeftEnd();
            this.azViewer.ScrollToLeftEnd();

            if (string.Compare(this.btnBirth.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 1;
                this.btnBirth.Opacity = 1;
                scrollViewer = birthViewer;
                scrollViewer.Visibility = Visibility.Visible;
            }
            else if (string.Compare(this.btnEconomics.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 3;
                this.btnEconomics.Opacity = 1;
                scrollViewer = econViewer;
                scrollViewer.Visibility = Visibility.Visible;
            }
            else if (string.Compare(this.btnHealth.Label.ToString(), chosenButton.Label.ToString()) == 0)
            {
                chosenCategory = 2;
                this.btnHealth.Opacity = 1;
                scrollViewer = healthViewer;
                scrollViewer.Visibility = Visibility.Visible;
            }
            else
            {
                chosenCategory = 4;
                this.btnAZ.Opacity = 1;
                scrollViewer = azViewer;
                scrollViewer.Visibility = Visibility.Visible;
            }
        }
Beispiel #15
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\mainwindow.xaml"
                ((VME.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 9 "..\..\mainwindow.xaml"
                ((VME.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.gridMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.ZonaCursor = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
                return;

            case 4:
                this.visorPersonaMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectUserViewer)(target));
                return;

            case 5:
                this.fisicoCirculoMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 14 "..\..\mainwindow.xaml"
                this.fisicoCirculoMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.fisicoCirculoMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.atrasCirculoMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 15 "..\..\mainwindow.xaml"
                this.atrasCirculoMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.atrasCirculoMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.psicologicoCirculoMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 20 "..\..\mainwindow.xaml"
                this.psicologicoCirculoMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.psicologicoCirculoMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.usuarioMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 21 "..\..\mainwindow.xaml"
                this.usuarioMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.usuarioMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.configuracionMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 27 "..\..\mainwindow.xaml"
                this.configuracionMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.configuracionMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.acercaDeMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 33 "..\..\mainwindow.xaml"
                this.acercaDeMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.acercaDeMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.ScrollPruebasMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
                return;

            case 12:
                this.Prueba1MenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 41 "..\..\mainwindow.xaml"
                this.Prueba1MenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.Prueba1MenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.Prueba2MenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 42 "..\..\mainwindow.xaml"
                this.Prueba2MenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.Prueba2MenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.Prueba3MenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 43 "..\..\mainwindow.xaml"
                this.Prueba3MenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.Prueba3MenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.Prueba4MenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 44 "..\..\mainwindow.xaml"
                this.Prueba4MenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.Prueba4MenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.Prueba5MenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 45 "..\..\mainwindow.xaml"
                this.Prueba5MenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.Prueba5MenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.botonMicrofonoMenuPrincipal = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 48 "..\..\mainwindow.xaml"
                this.botonMicrofonoMenuPrincipal.Click += new System.Windows.RoutedEventHandler(this.botonMicrofonoMenuPrincipal_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.imagenMicrofono = ((System.Windows.Controls.Image)(target));
                return;

            case 19:
                this.sensorChooserUI = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
                return;

            case 20:
                this.image = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #16
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.kinectRegionMenu = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 2:
     this.GradeMenu = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.btnAbrir = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 4:
     this.imgBtnAbrir = ((System.Windows.Controls.Image)(target));
     return;
     case 5:
     this.btnDesenhar = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 6:
     this.imgBtnDesenhar = ((System.Windows.Controls.Image)(target));
     return;
     case 7:
     this.btnExcluirInicial = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 8:
     this.imgSalvarDesenhoInicial = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.btnHelp = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 10:
     this.imgHelp = ((System.Windows.Controls.Image)(target));
     return;
     case 11:
     this.btnFechar = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 12:
     this.imgBtnFechar = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.seletorSensorUI = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 14:
     this.verUsuario = ((Microsoft.Kinect.Toolkit.Controls.KinectUserViewer)(target));
     return;
     case 15:
     this.btnCanhoto = ((Fluxos.Auxiliar.KinectToogleCircleButton)(target));
     return;
     case 16:
     this.imgBtnCanhoto = ((System.Windows.Controls.Image)(target));
     return;
     case 17:
     this.btnEmail = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 18:
     this.imgBtnEmail = ((System.Windows.Controls.Image)(target));
     return;
     case 19:
     this.btnAumentaLinha = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 20:
     this.imgAumentaLinha = ((System.Windows.Controls.Image)(target));
     return;
     case 21:
     this.btnDiminuirLinha = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 22:
     this.imgDiminuirLinha = ((System.Windows.Controls.Image)(target));
     return;
     case 23:
     this.btnVermelho = ((Fluxos.Auxiliar.KinectToogleCircleButton)(target));
     return;
     case 24:
     this.imgVermelho = ((System.Windows.Controls.Image)(target));
     return;
     case 25:
     this.btnVerde = ((Fluxos.Auxiliar.KinectToogleCircleButton)(target));
     return;
     case 26:
     this.imgVerde = ((System.Windows.Controls.Image)(target));
     return;
     case 27:
     this.btnAzul = ((Fluxos.Auxiliar.KinectToogleCircleButton)(target));
     return;
     case 28:
     this.imgAzul = ((System.Windows.Controls.Image)(target));
     return;
     case 29:
     this.btnApagar = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 30:
     this.imgApagar = ((System.Windows.Controls.Image)(target));
     return;
     case 31:
     this.btnExcluir = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 32:
     this.imgSalvarDesenho = ((System.Windows.Controls.Image)(target));
     return;
     case 33:
     this.btnApresentacao = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 34:
     this.imgApresentacao = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #17
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.kinectRegionHelp = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 2:
     this.GradePrincipal = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.imgHelp = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.btnExit = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     return;
     case 5:
     this.imgExit = ((System.Windows.Controls.Image)(target));
     return;
     case 6:
     this.btnNext = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 65 "..\..\..\Auxiliar\Help.xaml"
     this.btnNext.Click += new System.Windows.RoutedEventHandler(this.btnNext_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.imgNext = ((System.Windows.Controls.Image)(target));
     return;
     case 8:
     this.btnPrevious = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 84 "..\..\..\Auxiliar\Help.xaml"
     this.btnPrevious.Click += new System.Windows.RoutedEventHandler(this.btnPrevious_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.imgPrevious = ((System.Windows.Controls.Image)(target));
     return;
     case 10:
     this.lblTitulo = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 11:
     this.lblMensagem = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 12:
     this.lblObs = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #18
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\MainWindow.xaml"
                ((Microsoft.Samples.Kinect.SkeletonBasics.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);

            #line default
            #line hidden

            #line 5 "..\..\MainWindow.xaml"
                ((Microsoft.Samples.Kinect.SkeletonBasics.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);

            #line default
            #line hidden
                return;

            case 2:
                this.layoutGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.checkBoxSeatedMode = ((System.Windows.Controls.CheckBox)(target));

            #line 63 "..\..\MainWindow.xaml"
                this.checkBoxSeatedMode.Checked += new System.Windows.RoutedEventHandler(this.CheckBoxSeatedModeChanged);

            #line default
            #line hidden

            #line 63 "..\..\MainWindow.xaml"
                this.checkBoxSeatedMode.Unchecked += new System.Windows.RoutedEventHandler(this.CheckBoxSeatedModeChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
                return;

            case 5:
                this.statusBarText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.Image = ((System.Windows.Controls.Image)(target));
                return;

            case 7:
                this.scrollBar1 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 70 "..\..\MainWindow.xaml"
                this.scrollBar1.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar1_Scroll);

            #line default
            #line hidden
                return;

            case 8:
                this.scrollBar2 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 71 "..\..\MainWindow.xaml"
                this.scrollBar2.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar2_Scroll);

            #line default
            #line hidden
                return;

            case 9:
                this.scrollBar3 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 72 "..\..\MainWindow.xaml"
                this.scrollBar3.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar3_Scroll);

            #line default
            #line hidden
                return;

            case 10:
                this.scrollBar4 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 73 "..\..\MainWindow.xaml"
                this.scrollBar4.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar4_Scroll);

            #line default
            #line hidden
                return;

            case 11:
                this.scrollBar5 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 74 "..\..\MainWindow.xaml"
                this.scrollBar5.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar5_Scroll);

            #line default
            #line hidden
                return;

            case 12:
                this.scrollBar6 = ((System.Windows.Controls.Primitives.ScrollBar)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.scrollBar6.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.scrollBar6_Scroll);

            #line default
            #line hidden
                return;

            case 13:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.label3 = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.label4 = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.label5 = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.label6 = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 20:
                this.textBox2 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 21:
                this.textBox3 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 22:
                this.textBox4 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 23:
                this.textBox5 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 24:
                this.textBox6 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 26:
                this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
                return;

            case 27:
                this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
                return;

            case 28:
                this.grab = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 94 "..\..\MainWindow.xaml"
                this.grab.Click += new System.Windows.RoutedEventHandler(this.KinectCircleButton_Click_2);

            #line default
            #line hidden
                return;

            case 29:
                this.Forward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 95 "..\..\MainWindow.xaml"
                this.Forward.Click += new System.Windows.RoutedEventHandler(this.Forward_Click);

            #line default
            #line hidden

            #line 95 "..\..\MainWindow.xaml"
                this.Forward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Forward_MouseDown);

            #line default
            #line hidden

            #line 95 "..\..\MainWindow.xaml"
                this.Forward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 30:
                this.Left = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 96 "..\..\MainWindow.xaml"
                this.Left.Click += new System.Windows.RoutedEventHandler(this.Left_Click);

            #line default
            #line hidden

            #line 96 "..\..\MainWindow.xaml"
                this.Left.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Left_MouseDown);

            #line default
            #line hidden

            #line 96 "..\..\MainWindow.xaml"
                this.Left.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 31:
                this.Right = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 97 "..\..\MainWindow.xaml"
                this.Right.Click += new System.Windows.RoutedEventHandler(this.Right_Click);

            #line default
            #line hidden

            #line 97 "..\..\MainWindow.xaml"
                this.Right.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Right_MouseDown);

            #line default
            #line hidden

            #line 97 "..\..\MainWindow.xaml"
                this.Right.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 32:
                this.Backward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 98 "..\..\MainWindow.xaml"
                this.Backward.Click += new System.Windows.RoutedEventHandler(this.Backward_Click);

            #line default
            #line hidden

            #line 98 "..\..\MainWindow.xaml"
                this.Backward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Backward_MouseDown);

            #line default
            #line hidden

            #line 98 "..\..\MainWindow.xaml"
                this.Backward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 33:
                this.Stop = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 99 "..\..\MainWindow.xaml"
                this.Stop.Click += new System.Windows.RoutedEventHandler(this.Stop_Click);

            #line default
            #line hidden
                return;

            case 34:
                this.LeftForward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 100 "..\..\MainWindow.xaml"
                this.LeftForward.Click += new System.Windows.RoutedEventHandler(this.LeftForward_Click);

            #line default
            #line hidden

            #line 100 "..\..\MainWindow.xaml"
                this.LeftForward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden

            #line 100 "..\..\MainWindow.xaml"
                this.LeftForward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.LeftForward_MouseDown);

            #line default
            #line hidden
                return;

            case 35:
                this.LeftBackward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 101 "..\..\MainWindow.xaml"
                this.LeftBackward.Click += new System.Windows.RoutedEventHandler(this.LeftBackward_Click);

            #line default
            #line hidden

            #line 101 "..\..\MainWindow.xaml"
                this.LeftBackward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.LeftBackward_MouseDown);

            #line default
            #line hidden

            #line 101 "..\..\MainWindow.xaml"
                this.LeftBackward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 36:
                this.RightForward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 102 "..\..\MainWindow.xaml"
                this.RightForward.Click += new System.Windows.RoutedEventHandler(this.RightForward_Click);

            #line default
            #line hidden

            #line 102 "..\..\MainWindow.xaml"
                this.RightForward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.RightForward_MouseDown);

            #line default
            #line hidden

            #line 102 "..\..\MainWindow.xaml"
                this.RightForward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 37:
                this.RightBackward = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));

            #line 103 "..\..\MainWindow.xaml"
                this.RightBackward.Click += new System.Windows.RoutedEventHandler(this.RightBackward_Click);

            #line default
            #line hidden

            #line 103 "..\..\MainWindow.xaml"
                this.RightBackward.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.RightBackward_MouseDown);

            #line default
            #line hidden

            #line 103 "..\..\MainWindow.xaml"
                this.RightBackward.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.KinectTitleButton_MouseUp);

            #line default
            #line hidden
                return;

            case 38:
                this.switchbutton = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));

            #line 104 "..\..\MainWindow.xaml"
                this.switchbutton.Click += new System.Windows.RoutedEventHandler(this.KinectCircleButton_Click);

            #line default
            #line hidden
                return;

            case 39:
                this.label7 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.win = ((Kinect_Jigsaw1.MainWindow)(target));
     return;
     case 2:
     this.AppLogo = ((System.Windows.Controls.Image)(target));
     return;
     case 3:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 4:
     this.ClockTextBlock = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 5:
     this.kinectRegion3 = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 6:
     this.kinectRegion1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 7:
     this.kinectRegionGrid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 8:
     this.exitButton = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 114 "..\..\MainWindow.xaml"
     this.exitButton.Click += new System.Windows.RoutedEventHandler(this.exitButton_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.wrapPanel1 = ((System.Windows.Controls.WrapPanel)(target));
     return;
     case 10:
     this.beg = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 119 "..\..\MainWindow.xaml"
     this.beg.Click += new System.Windows.RoutedEventHandler(this.beg_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     this.inter = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 120 "..\..\MainWindow.xaml"
     this.inter.Click += new System.Windows.RoutedEventHandler(this.inter_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.adv = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 121 "..\..\MainWindow.xaml"
     this.adv.Click += new System.Windows.RoutedEventHandler(this.adv_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.kinectRegion = ((System.Windows.Controls.Grid)(target));
     return;
     case 14:
     this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 15:
     this.Home = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 135 "..\..\MainWindow.xaml"
     this.Home.Click += new System.Windows.RoutedEventHandler(this.Home_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.exitButton1 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 138 "..\..\MainWindow.xaml"
     this.exitButton1.Click += new System.Windows.RoutedEventHandler(this.exitButton_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     return;
     case 18:
     this.img1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 145 "..\..\MainWindow.xaml"
     this.img1.Click += new System.Windows.RoutedEventHandler(this.img1_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.im1 = ((System.Windows.Controls.Image)(target));
     return;
     case 20:
     this.img2 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 148 "..\..\MainWindow.xaml"
     this.img2.Click += new System.Windows.RoutedEventHandler(this.img2_Click);
     
     #line default
     #line hidden
     return;
     case 21:
     this.im2 = ((System.Windows.Controls.Image)(target));
     return;
     case 22:
     this.img3 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 151 "..\..\MainWindow.xaml"
     this.img3.Click += new System.Windows.RoutedEventHandler(this.img3_Click);
     
     #line default
     #line hidden
     return;
     case 23:
     this.im3 = ((System.Windows.Controls.Image)(target));
     return;
     case 24:
     this.img4 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 154 "..\..\MainWindow.xaml"
     this.img4.Click += new System.Windows.RoutedEventHandler(this.img4_Click);
     
     #line default
     #line hidden
     return;
     case 25:
     this.im4 = ((System.Windows.Controls.Image)(target));
     return;
     case 26:
     this.img5 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 157 "..\..\MainWindow.xaml"
     this.img5.Click += new System.Windows.RoutedEventHandler(this.img5_Click);
     
     #line default
     #line hidden
     return;
     case 27:
     this.im5 = ((System.Windows.Controls.Image)(target));
     return;
     case 28:
     this.img6 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 160 "..\..\MainWindow.xaml"
     this.img6.Click += new System.Windows.RoutedEventHandler(this.img6_Click);
     
     #line default
     #line hidden
     return;
     case 29:
     this.im6 = ((System.Windows.Controls.Image)(target));
     return;
     case 30:
     this.img7 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 163 "..\..\MainWindow.xaml"
     this.img7.Click += new System.Windows.RoutedEventHandler(this.img7_Click);
     
     #line default
     #line hidden
     return;
     case 31:
     this.im7 = ((System.Windows.Controls.Image)(target));
     return;
     case 32:
     this.img8 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 166 "..\..\MainWindow.xaml"
     this.img8.Click += new System.Windows.RoutedEventHandler(this.img8_Click);
     
     #line default
     #line hidden
     return;
     case 33:
     this.im8 = ((System.Windows.Controls.Image)(target));
     return;
     case 34:
     this.img9 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 169 "..\..\MainWindow.xaml"
     this.img9.Click += new System.Windows.RoutedEventHandler(this.img9_Click);
     
     #line default
     #line hidden
     return;
     case 35:
     this.im9 = ((System.Windows.Controls.Image)(target));
     return;
     case 36:
     this.img10 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 172 "..\..\MainWindow.xaml"
     this.img10.Click += new System.Windows.RoutedEventHandler(this.img10_Click);
     
     #line default
     #line hidden
     return;
     case 37:
     this.im10 = ((System.Windows.Controls.Image)(target));
     return;
     case 38:
     this.importHover = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 178 "..\..\MainWindow.xaml"
     this.importHover.Click += new System.Windows.RoutedEventHandler(this.importHover_Click);
     
     #line default
     #line hidden
     return;
     case 39:
     this.kinectRegion2 = ((System.Windows.Controls.Grid)(target));
     return;
     case 40:
     this.grdRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 41:
     this.Home1 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 192 "..\..\MainWindow.xaml"
     this.Home1.Click += new System.Windows.RoutedEventHandler(this.Home_Click);
     
     #line default
     #line hidden
     return;
     case 42:
     this.exitButton2 = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 195 "..\..\MainWindow.xaml"
     this.exitButton2.Click += new System.Windows.RoutedEventHandler(this.exitButton_Click);
     
     #line default
     #line hidden
     return;
     case 43:
     this.grdWindow = ((System.Windows.Controls.Grid)(target));
     return;
     case 44:
     this.btnShowImage = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 213 "..\..\MainWindow.xaml"
     this.btnShowImage.Click += new System.Windows.RoutedEventHandler(this.btnShowImage_Click);
     
     #line default
     #line hidden
     return;
     case 45:
     this.txtShowImage = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 46:
     this.btnShowPuzzle = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 218 "..\..\MainWindow.xaml"
     this.btnShowPuzzle.Click += new System.Windows.RoutedEventHandler(this.btnShowPuzzle_Click);
     
     #line default
     #line hidden
     return;
     case 47:
     this.txtShowPuzzle = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 48:
     this.btnReset = ((Microsoft.Kinect.Toolkit.Controls.KinectCircleButton)(target));
     
     #line 223 "..\..\MainWindow.xaml"
     this.btnReset.Click += new System.Windows.RoutedEventHandler(this.btnReset_Click);
     
     #line default
     #line hidden
     return;
     case 49:
     this.txtReset = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 50:
     this.grdPuzzle = ((System.Windows.Controls.Grid)(target));
     
     #line 230 "..\..\MainWindow.xaml"
     this.grdPuzzle.MouseEnter += new System.Windows.Input.MouseEventHandler(this.DockPanel_MouseEnter);
     
     #line default
     #line hidden
     return;
     case 51:
     this.cnvPuzzle = ((System.Windows.Controls.Canvas)(target));
     return;
     case 52:
     this.pnlPickUp = ((System.Windows.Controls.WrapPanel)(target));
     return;
     case 53:
     this.scvImage = ((System.Windows.Controls.Grid)(target));
     return;
     case 54:
     this.imgShowImage = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
Beispiel #20
0
        // Actions
        private void createButtons()
        {
            for (int i = 1; i <= backgrounds.Count; i++)
            {
                KinectCircleButton btn = new KinectCircleButton();

                btn.Name = "button_" + i.ToString();
                btn.Content = i.ToString();
                btn.Height = 80;
                btn.Click += OnClickRandomButton;

                scrollContent.Children.Add(btn);
            }
        }