Exemplo n.º 1
0
 private void OnPreviousButtonPointerUp()
 {
     PreviousPage?.Invoke();
 }
Exemplo n.º 2
0
 private void OnToSetupCommand()
 {
     PreviousPage?.Invoke(this, null);
 }
Exemplo n.º 3
0
 private void OnToPreferencesCommand()
 {
     PreviousPage?.Invoke(this, null);
 }
Exemplo n.º 4
0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            Point pos = e.Location; // pnlPageContanier.PointToClient(e.Location);

            if (MouseInPage(pos))
            {
                int pointY = ScrollPosition.Y;
                if (e.Delta < 0)
                {
                    pointY = ScrollPosition.Y + 120 * PageBounds.Height / ViewBounds.Height / 6;
                }
                else if (e.Delta > 0)
                {
                    pointY = ScrollPosition.Y - 120 * PageBounds.Height / ViewBounds.Height / 6;
                }
                ScrollPosition = new Point(ScrollPosition.X, pointY);
                if (vsb.Maximum == 0)
                {
                    if (e.Delta < 0)
                    {
                        if (NextPage != null)
                        {
                            NextPage.Invoke(this);
                        }
                    }
                    else
                    {
                        if (PreviousPage != null)
                        {
                            PreviousPage.Invoke(this);
                        }
                    }
                }
                else
                {
                    if (vsb.Value == vsb.Maximum)
                    {
                        //GoNext
                        _deltasCount++;
                        if (_deltasCount > 1)
                        {
                            _deltasCount = 0;
                            if (NextPage != null)
                            {
                                bHasMorePagesD = NextPage.Invoke(this);
                            }
                            bHasMorePagesT = true;
                            if (bHasMorePagesD)
                            {
                                ScrollPosition = new Point(hsb.Value, 0);
                            }
                        }
                    }
                    if (vsb.Value == 0)
                    {
                        //GoNext
                        _deltasCount++;
                        if (_deltasCount > 1)
                        {
                            _deltasCount = 0;
                            //GoBack
                            if (PreviousPage != null)
                            {
                                bHasMorePagesT = PreviousPage.Invoke(this);
                            }
                            bHasMorePagesD = true;
                            if (bHasMorePagesT)
                            {
                                ScrollPosition = new Point(hsb.Value, vsb.Maximum);
                            }
                        }
                    }
                }
            }
            base.OnMouseWheel(e);
        }
Exemplo n.º 5
0
 private void OnToAlgorithmCommand()
 {
     _model.StopAll();
     PreviousPage?.Invoke(this, null);
 }