private void Clk_Exit(object sender, RoutedEventArgs e) { ClearContent(); ReduceOpacity(); #region Buttons HoverButton _DenyExit = new HoverButton(); _DenyExit.Width = 100 * _percentWidth; _DenyExit.Height = 100 * _percentWidth; _DenyExit.FontSize = 36; _DenyExit.Foreground = Brushes.DarkSlateGray; _DenyExit.Content = "No"; _DenyExit.Click += OnDeny; Canvas.SetZIndex(_DenyExit, ZButtons); Canvas.SetTop(_DenyExit, ImLayout.Height / 2 + _DenyExit.Height / 2); Canvas.SetLeft(_DenyExit, ImLayout.Width / 2 + _DenyExit.Width); ImContent.Children.Add(_DenyExit); HoverButton _ConfirmExit = new HoverButton(); _ConfirmExit.Width = 100 * _percentWidth; _ConfirmExit.Height = 100 * _percentWidth; _ConfirmExit.FontSize = 36; _ConfirmExit.Foreground = Brushes.DarkSlateGray; _ConfirmExit.Content = "Yes"; _ConfirmExit.Click += OnConfirm; Canvas.SetZIndex(_ConfirmExit, ZButtons); Canvas.SetTop(_ConfirmExit, ImLayout.Height / 2 + _ConfirmExit.Height / 2); Canvas.SetRight(_ConfirmExit, ImLayout.Width / 2 + _ConfirmExit.Width); ImContent.Children.Add(_ConfirmExit); #endregion Buttons TextBlock _ChooseExit = new TextBlock(); // Text for deciding to exit app _ChooseExit.Opacity = 1.0; _ChooseExit.Height = ImContent.Height / 8; _ChooseExit.Width = ImContent.Width / 2; _ChooseExit.Foreground = Brushes.White; _ChooseExit.FontSize = 36; _ChooseExit.FontFamily = new FontFamily("Century"); _ChooseExit.TextAlignment = TextAlignment.Center; _ChooseExit.Text = "Are you sure you wish to exit?"; Canvas.SetZIndex(_ChooseExit, ZVisuals); Canvas.SetTop(_ChooseExit, ImContent.Height / 4); Canvas.SetLeft(_ChooseExit, ImContent.Width / 4); ImContent.Children.Add(_ChooseExit); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Imagen = ((System.Windows.Controls.Image)(target)); return; case 2: this.Boton = ((GestureControls.Controls.HoverButton)(target)); #line 12 "..\..\..\..\HoverButtons\HoverButtonVideos.xaml" this.Boton.KinectCursorEnter += new GestureControls.Input.KinectCursorEventHandler(this.MakeVisible); #line default #line hidden #line 12 "..\..\..\..\HoverButtons\HoverButtonVideos.xaml" this.Boton.KinectCursorLeave += new GestureControls.Input.KinectCursorEventHandler(this.MakeInvisible); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\..\..\UserControls\ButtonHome.xaml" ((System.Windows.Controls.Canvas)(target)).AddHandler(GestureControls.Controls.KinectButton.KinectCursorEnterEvent, new GestureControls.Input.KinectCursorEventHandler(this.MakeVisible)); #line default #line hidden #line 9 "..\..\..\..\UserControls\ButtonHome.xaml" ((System.Windows.Controls.Canvas)(target)).AddHandler(GestureControls.Controls.KinectButton.KinectCursorLeaveEvent, new GestureControls.Input.KinectCursorEventHandler(this.MakeInvisible)); #line default #line hidden return; case 2: this.Imagen = ((System.Windows.Controls.Image)(target)); return; case 3: this.Boton = ((GestureControls.Controls.HoverButton)(target)); return; } this._contentLoaded = true; }