Пример #1
0
 private void gridPreview_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (PreviewHold != null)
     {
         PreviewHold();
     }
 }
Пример #2
0
 void drawingSurfacebg_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (ControlPressed)
     {
         m_d3dBackground.CtrlReleased();
     }
 }
Пример #3
0
 private void ContentPanel_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (Audio.Visibility == System.Windows.Visibility.Visible)
     {
         hideAudio.Begin();
     }
 }
Пример #4
0
        private void image_ManipulationStarted_1(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var transform = (CompositeTransform)image.RenderTransform;

            scaleX = transform.ScaleX;
            scaleY = transform.ScaleY;
        }
 private void WitButton_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (!IsToggled)
     {
         VisualStateManager.GoToState(this, "Pressed", false);
     }
 }
Пример #6
0
 /// <summary>
 /// Handles started drags on the root.
 /// </summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event information.</param>
 private void OnManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     e.Handled        = true;
     _isDragging      = true;
     _dragTranslation = Translation;
     ChangeVisualState(true);
     Translation = _dragTranslation;
 }
Пример #7
0
 void TabularRenderer_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (this.Control != null && this.Control.CacheMode == null)
     {
         this.Control.CacheMode = new BitmapCache();
     }
     tab.GetContentOffset(out _began_x, out _began_y);
 }
Пример #8
0
        private void HightlightSwipeGlyph(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var element = sender as FrameworkElement;

            if (element != null)
            {
                Telerik.Windows.Controls.RadAnimationManager.Play(element, FadeInAnimation);
            }
        }
Пример #9
0
        private static void obj_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var obj  = (FrameworkElement)sender;
            var prop = getBackgroundProperty(sender.GetType());
            var bg   = obj.GetValue(prop);

            obj.SetValue(OriginalBackgroundProperty, bg);
            obj.SetValue(prop, App.Current.Resources["PhoneAccentBrush"]);
        }
Пример #10
0
        private void OnPivotManipulationStarted(Object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            Pivot pivot = sender as Pivot;

            if (LyricsInfo.IsChangeToLyrics)
            {
                pivot.SelectedIndex         = 1;
                LyricsInfo.IsChangeToLyrics = false;
            }
        }
Пример #11
0
 private void ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (StrobeOn)
     {
         StrobeModeToggle();
     }
     else
     {
         FlashLightOnlyModeToggle();
     }
 }
Пример #12
0
        private void listFragment_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var listWidth = _listFragment.Width;

            if (!(e.ManipulationOrigin.X >= listWidth - 100) || !(e.ManipulationOrigin.X < listWidth))
            {
                return;
            }
            _listFragment.ManipulationDelta     += listFragment_ManipulationDelta;
            _listFragment.ManipulationCompleted += listFragment_ManipulationCompleted;
        }
Пример #13
0
        private void mainFragment_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            // If the user has the first touch on the left side of canvas, that means he's trying to swipe the drawer
            if (!(e.ManipulationOrigin.X <= 40))
            {
                return;
            }

            // Manipulation can be allowed
            _mainFragment.ManipulationDelta     += mainFragment_ManipulationDelta;
            _mainFragment.ManipulationCompleted += mainFragment_ManipulationCompleted;
        }
Пример #14
0
        private void SportsGridAnteprima_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            var ct = (CompositeTransform)this.SportsGridAnteprima.RenderTransform;

            if (initialPosition == 0)
            {
                initialPosition        = ct.TranslateY;
                DoubleAnimationUp.From = initialPosition;
                DoubleAnimationDown.To = initialPosition;
                System.Diagnostics.Debug.WriteLine("[SPORTSVIEW] \t Grid_ManipulationStarted - Initial Position: " + initialPosition);
            }
            ////e.Handled = true;
        }
Пример #15
0
        private void CavemanRunner_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            //TouchCollection touches = TouchPanel.GetState();
            //_game.touches = touches;

            //if (touches.Count <= 2)
            //{
            //    if (touches.Count == 2)
            //        _game.jumpDoubleTap = true;

            //    e.Complete();
            //}
        }
Пример #16
0
 private void TBQuesOk_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     if (AppHelper.Theme)
     {
         RecQuesOk.Fill      = new SolidColorBrush(Color.FromArgb(255, 241, 240, 221));
         TBQuesOk.Foreground = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0));
     }
     else
     {
         RecQuesOk.Fill      = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0));
         TBQuesOk.Foreground = new SolidColorBrush(Color.FromArgb(255, 241, 240, 221));
     }
 }
Пример #17
0
 private void unZoomButtonStl_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     new Thread(() =>
     {
         bool pressed = true;
         while (pressed)
         {
             try
             {
                 renderingController.zoomOut();
                 Dispatcher.BeginInvoke(() => pressed = unZoomButtonStl.IsPressed);
                 Thread.Sleep(100);
             }
             catch (Exception) { break; }
         }
     }).Start();
 }
Пример #18
0
 private void rotateDownButtonGCode_ManipulationStarted_1(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     new Thread(() =>
     {
         bool pressed = true;
         while (pressed)
         {
             try
             {
                 renderingController.rotateDown();
                 Dispatcher.BeginInvoke(() => pressed = rotateDownButtonGCode.IsPressed);
                 Thread.Sleep(100);
             }
             catch (Exception) { break; }
         }
     }).Start();
 }
Пример #19
0
        private void AnnotationsCanvas_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            _manipulating = true;

            _polyline = new Polyline
            {
                Stroke          = _brush,
                StrokeThickness = 6
            };

            var manipulationAreaDeltaX = ManipulationArea.Margin.Left;
            var manipulationAreaDeltaY = ManipulationArea.Margin.Top;

            var point = NearestPointInElement(e.ManipulationOrigin.X + manipulationAreaDeltaX, e.ManipulationOrigin.Y + manipulationAreaDeltaY, AnnotationsCanvas);

            _polyline.Points.Add(point);

            CurrentAnnotationCanvas.Children.Add(_polyline);
        }
Пример #20
0
        private void ButtonClick_buttonwithtext(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            switch ((sender as TextBlock).Name)
            {
            case "exit":
                if (MessageBox.Show("真的要退出?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                {
                    m_d3dBackground.Quit();
                }
                break;

            case "skip":
                if (ControlPressed)
                {
                    m_d3dBackground.CtrlReleased();
                }
                else
                {
                    m_d3dBackground.CtrlPressed();
                }
                ControlPressed = !ControlPressed;
                break;

            case "save":
                m_d3dBackground.Save();
                break;

            case "load":
                m_d3dBackground.Load();
                break;

            case "back":

                break;

            case "forw":

                break;
            }
        }
Пример #21
0
        /// <summary>
        /// Inicia la Manipulacion de la ficha, determinando si puede o no mover.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Ellipse_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            this.ellipse = sender as Ellipse;
            Pieces p = (from b in boardPieces
                        where b.Name.Equals(this.ellipse.GetValue(NameProperty))
                        select b).Single();

            if (!this.turn && p.Color == ColorPeace.white || this.turn && p.Color == ColorPeace.black)
            {
                this.txt.Text = "No es tu turno.";
                this.canMove  = false;
            }
            else
            {
                this.txt.Text = "";
                this.canMove  = PlayMove.CanMove(p, boardPieces);
                if (!this.canMove)
                {
                    this.txt.Text = "La ficha seleccionada no se puede mover.";
                }
            }
        }
Пример #22
0
        /*
         *
         * Обработчик события
         * происходит когда палец касается экрана
         * запускает датчик акселерометра
         * запускает поток для снятия данных
         *
         */
        private void LayoutRoot_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            if (this.sttoper)
            {
                bC = new bufScr((int)e.ManipulationOrigin.X, (int)e.ManipulationOrigin.Y);
                if (myAcs == null)
                {
                    myAcs = new Accelerometer();
                    myAcs.ReadingChanged +=
                        new EventHandler <AccelerometerReadingEventArgs>(myAcs_readingChanged);
                    myAcs.Start();
                }
                else
                {
                    myAcs.Stop();
                    myAcs.Dispose();
                    myAcs = null;
                }

                endThread = false;
                stData    = new Thread(new ThreadStart(ThreadTask));
                stData.Start();
            }
        }
Пример #23
0
 private void grid1_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     show = true;
     timer.Stop();
 }
Пример #24
0
 private void fieldGrid_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     manipulationHandler?.Clear();
     manipulationHandler = new ManipulationHandler(fieldSize, linesWidth, ref fieldGrid);
     manipulationHandler.ManipulationStarted(e.ManipulationOrigin);
 }
Пример #25
0
 private void StackPanel_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     (sender as StackPanel).Opacity = 0.5;
 }
Пример #26
0
 private void Grid_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
 }
Пример #27
0
        private void AccountsList_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            FrameworkElement control = (FrameworkElement)sender;

            originMargin = control.Margin;
        }
Пример #28
0
 private void OnManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     _pinching      = false;
     _originalScale = _scale;
 }
Пример #29
0
 void uiElement_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     IsPanningAllowed = true;
 }
Пример #30
0
 void BrdFrame_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     currentScale.X = transform.ScaleX;
     currentScale.Y = transform.ScaleY;
 }