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); } }
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); } }
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; } }
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); } }
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; }
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); } }