Exemplo n.º 1
0
        private void UpdateNumberPage(int Pos)
        {
            FirstPageButton.Content  = (Convert.ToInt32(FirstPageButton.Content) + Pos).ToString();
            SecondPageButton.Content = (Convert.ToInt32(SecondPageButton.Content) + Pos).ToString();
            LastPageButton.Content   = (Convert.ToInt32(LastPageButton.Content) + Pos).ToString();

            if (Convert.ToInt32(FirstPageButton.Content) != 1 && PreButton.Visibility == Visibility.Collapsed)
            {
                ((Storyboard)MainWD.FindResource("Show_PreButton")).Begin();
            }
            if (!LastPageButton.Content.Equals(maxnumber.ToString()) && NextButton.Visibility == Visibility.Collapsed)
            {
                ((Storyboard)MainWD.FindResource("Show_NextButton")).Begin();
            }


            if (SecondPageButton.Content.Equals(maxnumber.ToString()))
            {
                UpdateNumberPage(-1);

                ChangeColor(1);

                ((Storyboard)MainWD.FindResource("Hidden_NextButton")).Begin();
                PosPageButton = 1;
            }
            if (SecondPageButton.Content.Equals("1"))
            {
                UpdateNumberPage(1);

                ChangeColor(-1);

                ((Storyboard)MainWD.FindResource("Hidden_PreButton")).Begin();
                PosPageButton = -1;
            }
        }
Exemplo n.º 2
0
 private void MainWD_MouseDown(object sender, MouseButtonEventArgs e)
 {
     MainWD.DragMove();
 }