Exemplo n.º 1
0
 private void CloseMenu(object sender, RoutedEventArgs e)
 {
     if (Menuu.Width == 250)
     {
         DoubleAnimation buttonAnimation = new DoubleAnimation();
         buttonAnimation.From     = 250;
         buttonAnimation.To       = 0;
         buttonAnimation.Duration = TimeSpan.FromSeconds(0.2);
         Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
     }
 }
Exemplo n.º 2
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     Reg.Visibility = Visibility.Visible;
     if (Menuu.Width == 250)
     {
         DoubleAnimation buttonAnimation = new DoubleAnimation();
         buttonAnimation.From     = 250;
         buttonAnimation.To       = 0;
         buttonAnimation.Duration = TimeSpan.FromSeconds(0.2);
         Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
     }
 }
Exemplo n.º 3
0
 private void Ch_Lib(object sender, RoutedEventArgs e)
 {
     if (Menuu.Width == 250)
     {
         DoubleAnimation buttonAnimation = new DoubleAnimation();
         buttonAnimation.From     = 250;
         buttonAnimation.To       = 0;
         buttonAnimation.Duration = TimeSpan.FromSeconds(0.2);
         Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
     }
     if (Change_Library.Visibility == Visibility.Hidden)
     {
         Change_Library.Visibility = Visibility.Visible;
         data2.ItemsSource         = null;
         data2.ItemsSource         = bob.getList();
     }
     else
     {
         Change_Library.Visibility = Visibility.Hidden;
     }
 }
Exemplo n.º 4
0
 private void Gi(object sender, RoutedEventArgs e)
 {
     SeartchBox.Text    = "";
     ConcreteGenre.Text = "Всі книги";
     S.Visibility       = Visibility.Hidden;
     books.Children.Clear();
     activegenre   = -1;
     oneGenrebooks = bob.getList();
     foreach (var i in oneGenrebooks)
     {
         addbooktobass(i);
     }
     if (Menuu.Width == 250)
     {
         DoubleAnimation buttonAnimation = new DoubleAnimation();
         buttonAnimation.From     = 250;
         buttonAnimation.To       = 0;
         buttonAnimation.Duration = TimeSpan.FromSeconds(0.5);
         Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
     }
 }
Exemplo n.º 5
0
        private void GetGenre(object sender, RoutedEventArgs e)
        {
            books.Children.Clear();
            int g = Convert.ToInt32(((Button)sender).Name.Replace("G", ""));

            ConcreteGenre.Text = GenreFromIndex(g);
            oneGenrebooks      = bob.OneTypeBooks(g);
            activegenre        = g;
            foreach (var i in oneGenrebooks)
            {
                addbooktobass(i);
            }
            if (Menuu.Width == 250)
            {
                DoubleAnimation buttonAnimation = new DoubleAnimation();
                buttonAnimation.From     = 250;
                buttonAnimation.To       = 0;
                buttonAnimation.Duration = TimeSpan.FromSeconds(0.2);
                Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
            }
            SeartchBox.Text = "";
            S.Visibility    = Visibility.Hidden;
        }
Exemplo n.º 6
0
 private void ChangeAccounts(object sender, RoutedEventArgs e)
 {
     if (
         Change_Acc.Visibility == Visibility.Hidden)
     {
         Change_Acc.Visibility = Visibility.Visible;
         _Name.Text            = seller.Name;
         Login.Text            = seller.Login;
         Password.Text         = seller.password;
         Count.Text            = seller.count_selled + "";
     }
     else
     {
         Change_Acc.Visibility = Visibility.Hidden;
     }
     if (Menuu.Width == 250)
     {
         DoubleAnimation buttonAnimation = new DoubleAnimation();
         buttonAnimation.From     = 250;
         buttonAnimation.To       = 0;
         buttonAnimation.Duration = TimeSpan.FromSeconds(0.2);
         Menuu.BeginAnimation(Button.WidthProperty, buttonAnimation);
     }
 }