Example #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
                return;

            case 2:
                this.kinectRegion = ((Microsoft.Kinect.Wpf.Controls.KinectRegion)(target));
                return;

            case 3:
                this.backButton = ((System.Windows.Controls.Button)(target));

            #line 31 "..\..\MainWindow.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.GoBack);

            #line default
            #line hidden
                return;

            case 4:
                this.navigationRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 5:
                this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
                return;

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

            case 7:
                this.itemsControl = ((System.Windows.Controls.ItemsControl)(target));

            #line 46 "..\..\MainWindow.xaml"
                this.itemsControl.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.MainItemButtonClick));

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));

            #line 10 "..\..\MainWindow.xaml"
                this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);

            #line default
            #line hidden
                return;

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

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

            case 4:
                this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.scrollViewer = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
                return;

            case 6:
                this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));

            #line 126 "..\..\MainWindow.xaml"
                this.wrapPanel.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick));

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.KinectBoardWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));

            #line 21 "..\..\..\MainWindow.xaml"
                this.KinectBoardWindow.GotTouchCapture += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.KinectBoardWindow_GotTouchCapture);

            #line default
            #line hidden

            #line 22 "..\..\..\MainWindow.xaml"
                this.KinectBoardWindow.TouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.KinectBoardWindow_GotTouchCapture);

            #line default
            #line hidden

            #line 23 "..\..\..\MainWindow.xaml"
                this.KinectBoardWindow.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.KinectBoardWindow_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.kinectRegion = ((Microsoft.Kinect.Wpf.Controls.KinectRegion)(target));
                return;

            case 3:
                this.topBar = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.backButton = ((System.Windows.Controls.Button)(target));

            #line 46 "..\..\..\MainWindow.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.GoBack);

            #line default
            #line hidden
                return;

            case 5:
                this.helpButton = ((System.Windows.Controls.Button)(target));

            #line 47 "..\..\..\MainWindow.xaml"
                this.helpButton.Click += new System.Windows.RoutedEventHandler(this.helpButton_Click);

            #line default
            #line hidden
                return;

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

            #line 61 "..\..\..\MainWindow.xaml"
                this.image.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.DateTimeClock_MouseDown);

            #line default
            #line hidden
                return;

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

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

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

            case 10:
                this.DateTimeClock = ((System.Windows.Controls.StackPanel)(target));
                return;

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

            case 12:
                this.dateText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 13:
                this.navigationRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 14:
                this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 15:
                this.weatherPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

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

            case 17:
                this.weather1 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 18:
                this.day1 = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 20:
                this.Temp1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 21:
                this.weather2 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 22:
                this.day2 = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 24:
                this.Temp2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 25:
                this.weather3 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 26:
                this.day3 = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 28:
                this.Temp3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 29:
                this.weather4 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 30:
                this.day4 = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 32:
                this.Temp4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.scrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 34:
                this.itemsControl = ((System.Windows.Controls.ItemsControl)(target));

            #line 133 "..\..\..\MainWindow.xaml"
                this.itemsControl.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.OpenPage));

            #line default
            #line hidden
                return;

            case 35:
                this.RightGridPanel = ((System.Windows.Controls.Grid)(target));
                return;

            case 36:
                this.NewsAndAnnouncment = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 37:
                this.Slides = ((System.Windows.Controls.ScrollViewer)(target));
                return;

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

            case 39:
                this.HelpSlide = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 40:
                this.EventsSlide = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 41:
                this.csEventsList = ((System.Windows.Controls.ListView)(target));
                return;

            case 42:
                this.busScheduleTitle = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 43:
                this.BusGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 44:
                this.bottomBar = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 45:
                this.bottomBarText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 46:
                this.translate = ((System.Windows.Media.TranslateTransform)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class. 
        /// </summary>
        public MainWindow()
        {
            // show the user an image of each category
            /*
            string url = "http://backend.deviantart.com/rss.xml?q=deviation";
            string urlContents = DeviantInteraction.getContentsURL(url);
            List<Category> categories = DeviantInteraction.parseRSS(url);

            // get the number of components to display
            int numImages = images.Count;
            */

            currentWindow = this;

            // initialize sound player
            player = new SoundPlayer();
            player.SoundLocation = hoverSound;

            this.InitializeComponent();

            // initialize the sensor chooser and UI
            this.sensorChooser = new KinectSensorChooser();
            this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
            this.sensorChooser.Start();

            /*
            kinectSensor = KinectSensor.KinectSensors.FirstOrDefault(s => s.Status == KinectStatus.Connected); // Get first Kinect Sensor
            Console.WriteLine(kinectSensor.Status.ToString());
            skeletons = new Skeleton[kinectSensor.SkeletonStream.FrameSkeletonArrayLength]; // Allocate ST data
            userInfos = new UserInfo[InteractionFrame.UserInfoArrayLength];

            interactionStream = new InteractionStream(kinectSensor, new DummyInteractionClient());
            interactionStream.InteractionFrameReady += InteractionStreamOnInteractionFrameReady;
            kinectSensor.DepthFrameReady += SensorOnDepthFrameReady;
            kinectSensor.SkeletonFrameReady += new EventHandler<SkeletonFrameReadyEventArgs>(kinect_SkeletonFrameReady); // Get Ready for Skeleton Ready Events
            kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
            kinectSensor.SkeletonStream.Enable();

            try
            {
                kinectSensor.DepthStream.Range = DepthRange.Near;
                kinectSensor.SkeletonStream.EnableTrackingInNearRange = true;
            }
            catch (InvalidOperationException)
            {
                // Non Kinect for Windows devices do not support Near mode, so reset back to default mode.
                kinectSensor.DepthStream.Range = DepthRange.Default;
                kinectSensor.SkeletonStream.EnableTrackingInNearRange = false;
            }

            kinectSensor.Start();
            */

            // Bind the sensor chooser's current sensor to the KinectRegion
            var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
            BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);

            // Clear out placeholder content
            this.wrapPanel.Children.Clear();

            // Add in display content - initialize all the images
            for (var index = 0; index < deviantCategories.Length; ++index)
            {
                // access current image object
                // Image img = images[index];
                // load image from url
                // get the image link
                //string imageLink = DeviantInteraction.getImageLink(img.link);
                //Console.WriteLine(imageLink);
                /*
                BitmapImage bi = new BitmapImage();
                bi.BeginInit();
                // bi.UriSource = new Uri(images[index].link);
                bi.UriSource = new Uri("http://i.space.com/images/i/000/005/972/original/sun-photo-solar-filament-101118-02.jpg?1294094311");
                bi.EndInit();
                */

                var button = new KinectTileButton
                {
                    // Background = new ImageBrush(bi),
                    Label = deviantCategories[index]
                    // Height = 200,
                    // Width = 100
                };
                // add hover event
                button.MouseEnter += new System.Windows.Input.MouseEventHandler(mouseEnteredButton);
                this.wrapPanel.Children.Add(button);
            }

            // Bind listener to scrollviwer scroll position change, and check scroll viewer position
            this.UpdatePagingButtonState();
            scrollViewer.ScrollChanged += (o, e) => this.UpdatePagingButtonState();
            _gestureController = new GestureController(GestureType.All);
            _gestureController.GestureRecognized += GestureRecognized;

            if(!Globals.userHasVisitedFirstPage)
            {
                //show help screen
                showHelp();
                Globals.userHasVisitedFirstPage = true;
            }

            // launch timer to show help
            System.Timers.Timer aTimer = new System.Timers.Timer();
            aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            aTimer.Interval = 15000;
            aTimer.Enabled = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
     
     #line 10 "..\..\MainWindow.xaml"
     this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.checkBox3 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.image3 = ((System.Windows.Controls.Image)(target));
     return;
     case 4:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 5:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 6:
     this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 7:
     this.scrollViewer11 = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 8:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 182 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick));
     
     #line default
     #line hidden
     return;
     case 9:
     this.Willie = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 10:
     this.Jake = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 11:
     this.Darnell = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 12:
     this.Scott = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 13:
     this.Kelly = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 14:
     this.Jada = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 15:
     this.Maria = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 16:
     this.Emma = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 17:
     this.Jenna = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 18:
     this.David = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 19:
     this.Ariel = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 20:
     this.Darryl = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 21:
     this.Fred = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 22:
     this.John = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 23:
     this.Tierra = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 24:
     this.Caitlin = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 25:
     this.Lisa = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 26:
     this.Ju = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 27:
     this.Anita = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 28:
     this.scrollViewer1 = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 29:
     this.wrapPanel1 = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 309 "..\..\MainWindow.xaml"
     this.wrapPanel1.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick1));
     
     #line default
     #line hidden
     return;
     case 30:
     this.Willie1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 31:
     this.Jake1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 32:
     this.Darnell1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 33:
     this.Scott1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 34:
     this.Kelly1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 35:
     this.Jada1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 36:
     this.Maria1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 37:
     this.Emma1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 38:
     this.Jenna1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 39:
     this.David1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 40:
     this.Ariel1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 41:
     this.Darryl1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 42:
     this.Fred1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 43:
     this.John1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 44:
     this.Tierra1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 45:
     this.Caitlin1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 46:
     this.Lisa1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 47:
     this.Ju1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 48:
     this.Anita1 = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     return;
     case 49:
     this.scrollViewer3 = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 50:
     this.wrapPanel2 = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 433 "..\..\MainWindow.xaml"
     this.wrapPanel2.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick2));
     
     #line default
     #line hidden
     return;
     case 51:
     this.scrollViewer33 = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 52:
     this.wrapPanel3 = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 458 "..\..\MainWindow.xaml"
     this.wrapPanel3.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick3));
     
     #line default
     #line hidden
     return;
     case 53:
     
     #line 460 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.PageRightButtonClick);
     
     #line default
     #line hidden
     return;
     case 54:
     this.checkBox1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 55:
     this.image1 = ((System.Windows.Controls.Image)(target));
     return;
     case 56:
     this.checkBox2 = ((System.Windows.Controls.Grid)(target));
     return;
     case 57:
     this.image2 = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
 private void str_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     // go back
     var mainWindow = new MainWindow();
     mainWindow.Show();
     this.Close();
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
     
     #line 10 "..\..\..\..\Menu\MainWindow.xaml"
     this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 3:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 4:
     this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 5:
     this.scrollViewer = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 6:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 126 "..\..\..\..\Menu\MainWindow.xaml"
     this.wrapPanel.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick));
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
     
     #line 10 "..\..\MainWindow.xaml"
     this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.C1 = ((System.Windows.Controls.Image)(target));
     
     #line 25 "..\..\MainWindow.xaml"
     this.C1.Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);
     
     #line default
     #line hidden
     return;
     case 3:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 4:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 5:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 32 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerGripEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_cerrada));
     
     #line default
     #line hidden
     
     #line 32 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerGripReleaseEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_abierta));
     
     #line default
     #line hidden
     
     #line 32 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerMoveEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.comprobarGesto));
     
     #line default
     #line hidden
     
     #line 32 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerLeaveEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_out));
     
     #line default
     #line hidden
     return;
     case 6:
     this.tile = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 34 "..\..\MainWindow.xaml"
     this.tile.Click += new System.Windows.RoutedEventHandler(this.tile_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.ImageColor = ((System.Windows.Controls.Image)(target));
     return;
     case 8:
     this.Image = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
        /// <summary>
        /// Handle a button click from the wrap panel.
        /// </summary>
        /// <param name="sender">Event sender</param>
        /// <param name="e">Event arguments</param>
        private void MainWindowButtonHovered(object sender, RoutedEventArgs e)
        {
            // instantiate a new MainWindow
            MainWindow main = new MainWindow();
            // set the current window to MainWindow
            App.Current.MainWindow = main;
            // close this windows
            this.Close();
            // open MainWindow
            main.Show();

            e.Handled = true;
        }
Example #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
                return;

            case 2:
                this.kinectRegion = ((Microsoft.Kinect.Wpf.Controls.KinectRegion)(target));
                return;

            case 3:
                this.backButton = ((System.Windows.Controls.Button)(target));

            #line 32 "..\..\MainWindow.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.Exit);

            #line default
            #line hidden
                return;

            case 4:
                this.navigationRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 5:
                this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.Zero = ((System.Windows.Controls.Button)(target));

            #line 41 "..\..\MainWindow.xaml"
                this.Zero.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 7:
                this.One = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\MainWindow.xaml"
                this.One.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 8:
                this.Two = ((System.Windows.Controls.Button)(target));

            #line 47 "..\..\MainWindow.xaml"
                this.Two.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 9:
                this.Three = ((System.Windows.Controls.Button)(target));

            #line 50 "..\..\MainWindow.xaml"
                this.Three.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 10:
                this.Four = ((System.Windows.Controls.Button)(target));

            #line 53 "..\..\MainWindow.xaml"
                this.Four.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 11:
                this.Five = ((System.Windows.Controls.Button)(target));

            #line 56 "..\..\MainWindow.xaml"
                this.Five.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 12:
                this.Six = ((System.Windows.Controls.Button)(target));

            #line 59 "..\..\MainWindow.xaml"
                this.Six.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 13:
                this.Seven = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\MainWindow.xaml"
                this.Seven.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 14:
                this.Eight = ((System.Windows.Controls.Button)(target));

            #line 65 "..\..\MainWindow.xaml"
                this.Eight.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 15:
                this.Nine = ((System.Windows.Controls.Button)(target));

            #line 68 "..\..\MainWindow.xaml"
                this.Nine.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #11
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
     
     #line 10 "..\..\MainWindow.xaml"
     this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 3:
     this.kinectRegionGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.fondo = ((System.Windows.Controls.Image)(target));
     return;
     case 5:
     this.sensorChooserUi = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target));
     return;
     case 6:
     this.scrollViewer = ((Microsoft.Kinect.Toolkit.Controls.KinectScrollViewer)(target));
     return;
     case 7:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 113 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.KinectTileButtonClick));
     
     #line default
     #line hidden
     return;
     case 8:
     this.mesa = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.imagen1 = ((System.Windows.Controls.Image)(target));
     return;
     case 10:
     this.imagen2 = ((System.Windows.Controls.Image)(target));
     return;
     case 11:
     this.imagen3 = ((System.Windows.Controls.Image)(target));
     return;
     case 12:
     this.imagen4 = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.imagen5 = ((System.Windows.Controls.Image)(target));
     return;
     case 14:
     this.imagen6 = ((System.Windows.Controls.Image)(target));
     return;
     case 15:
     this.imagen7 = ((System.Windows.Controls.Image)(target));
     return;
     case 16:
     this.imagen8 = ((System.Windows.Controls.Image)(target));
     return;
     case 17:
     this.imagen9 = ((System.Windows.Controls.Image)(target));
     return;
     case 18:
     this.imagenresultado = ((System.Windows.Controls.Image)(target));
     return;
     case 19:
     this.imagenres = ((System.Windows.Controls.Image)(target));
     return;
     case 20:
     this.imagenborrar = ((System.Windows.Controls.Image)(target));
     return;
     case 21:
     
     #line 135 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 22:
     
     #line 136 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 23:
     
     #line 137 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 24:
     
     #line 138 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 25:
     
     #line 139 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 26:
     
     #line 140 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 27:
     
     #line 141 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 28:
     
     #line 142 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 29:
     
     #line 143 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DibujameAlgo);
     
     #line default
     #line hidden
     return;
     case 30:
     
     #line 144 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.Visualizar);
     
     #line default
     #line hidden
     return;
     case 31:
     
     #line 145 "..\..\MainWindow.xaml"
     ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target)).Click += new System.Windows.RoutedEventHandler(this.Borrar);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
     
     #line 10 "..\..\MainWindow.xaml"
     this.ControlsBasicsWindow.Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.kinectRegion = ((Microsoft.Kinect.Toolkit.Controls.KinectRegion)(target));
     return;
     case 3:
     this.wrapPanel = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 25 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerGripEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_cerrada));
     
     #line default
     #line hidden
     
     #line 25 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerGripReleaseEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_abierta));
     
     #line default
     #line hidden
     
     #line 25 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerMoveEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.comprobarGesto));
     
     #line default
     #line hidden
     
     #line 25 "..\..\MainWindow.xaml"
     this.wrapPanel.AddHandler(Microsoft.Kinect.Toolkit.Controls.KinectRegion.HandPointerLeaveEvent, new System.EventHandler<Microsoft.Kinect.Toolkit.Controls.HandPointerEventArgs>(this.mano_out));
     
     #line default
     #line hidden
     return;
     case 4:
     this.tile = ((Microsoft.Kinect.Toolkit.Controls.KinectTileButton)(target));
     
     #line 26 "..\..\MainWindow.xaml"
     this.tile.Click += new System.Windows.RoutedEventHandler(this.tile_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.song1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.time1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 7:
     this.song2 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 8:
     this.time2 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 9:
     this.myCanvas = ((System.Windows.Controls.Canvas)(target));
     return;
     case 10:
     this.central = ((System.Windows.Controls.Image)(target));
     return;
     case 11:
     this.vinilo1 = ((System.Windows.Controls.Image)(target));
     return;
     case 12:
     this.vinilo2 = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.play_1 = ((System.Windows.Controls.Image)(target));
     return;
     case 14:
     this.fastforward_1 = ((System.Windows.Controls.Image)(target));
     return;
     case 15:
     this.fastprevious_1 = ((System.Windows.Controls.Image)(target));
     return;
     case 16:
     this.loop_1 = ((System.Windows.Controls.Image)(target));
     return;
     case 17:
     this.barra_horizontal1 = ((System.Windows.Controls.Image)(target));
     return;
     case 18:
     this.masmenos1 = ((System.Windows.Controls.Image)(target));
     return;
     case 19:
     this.central1 = ((System.Windows.Controls.Image)(target));
     return;
     case 20:
     this.play_2 = ((System.Windows.Controls.Image)(target));
     return;
     case 21:
     this.fastforward_2 = ((System.Windows.Controls.Image)(target));
     return;
     case 22:
     this.fastprevious_2 = ((System.Windows.Controls.Image)(target));
     return;
     case 23:
     this.loop_2 = ((System.Windows.Controls.Image)(target));
     return;
     case 24:
     this.barra_horizontal2 = ((System.Windows.Controls.Image)(target));
     return;
     case 25:
     this.masmenos2 = ((System.Windows.Controls.Image)(target));
     return;
     case 26:
     this.central2 = ((System.Windows.Controls.Image)(target));
     return;
     case 27:
     this.restore = ((System.Windows.Controls.Image)(target));
     return;
     case 28:
     this.exit = ((System.Windows.Controls.Image)(target));
     return;
     case 29:
     this.rate_1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 30:
     this.rate_2 = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #13
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ControlsBasicsWindow = ((Microsoft.Samples.Kinect.ControlsBasics.MainWindow)(target));
                return;

            case 2:
                this.kinectRegion = ((Microsoft.Kinect.Wpf.Controls.KinectRegion)(target));
                return;

            case 3:
                this.backButton = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\MainWindow.xaml"
                this.backButton.Click += new System.Windows.RoutedEventHandler(this.Exit);

            #line default
            #line hidden
                return;

            case 4:
                this.helpButton = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.helpButton.Click += new System.Windows.RoutedEventHandler(this.Help);

            #line default
            #line hidden
                return;

            case 5:
                this.navigationRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

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

            case 7:
                this.Zero = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\MainWindow.xaml"
                this.Zero.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 8:
                this.One = ((System.Windows.Controls.Button)(target));

            #line 60 "..\..\MainWindow.xaml"
                this.One.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 9:
                this.Two = ((System.Windows.Controls.Button)(target));

            #line 63 "..\..\MainWindow.xaml"
                this.Two.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 10:
                this.Three = ((System.Windows.Controls.Button)(target));

            #line 66 "..\..\MainWindow.xaml"
                this.Three.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 11:
                this.Four = ((System.Windows.Controls.Button)(target));

            #line 69 "..\..\MainWindow.xaml"
                this.Four.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 12:
                this.Five = ((System.Windows.Controls.Button)(target));

            #line 72 "..\..\MainWindow.xaml"
                this.Five.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 13:
                this.Six = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.Six.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 14:
                this.Seven = ((System.Windows.Controls.Button)(target));

            #line 78 "..\..\MainWindow.xaml"
                this.Seven.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 15:
                this.Eight = ((System.Windows.Controls.Button)(target));

            #line 81 "..\..\MainWindow.xaml"
                this.Eight.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 16:
                this.Nine = ((System.Windows.Controls.Button)(target));

            #line 84 "..\..\MainWindow.xaml"
                this.Nine.Click += new System.Windows.RoutedEventHandler(this.Number);

            #line default
            #line hidden
                return;

            case 17:
                this.Equals = ((System.Windows.Controls.Button)(target));

            #line 87 "..\..\MainWindow.xaml"
                this.Equals.Click += new System.Windows.RoutedEventHandler(this.ResultRequest);

            #line default
            #line hidden
                return;

            case 18:
                this.Erase = ((System.Windows.Controls.Button)(target));

            #line 90 "..\..\MainWindow.xaml"
                this.Erase.Click += new System.Windows.RoutedEventHandler(this.EraseLastChar);

            #line default
            #line hidden
                return;

            case 19:
                this.TextRegion = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }