Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            var mov = new MovieCreator
            {
                Title  = textBox2.Text,
                Year   = int.Parse(textBox3.Text),
                Genre  = textBox5.Text,
                Type   = textBox4.Text,
                Rating = int.Parse(textBox6.Text),
                Name   = textBox7.Text
            };

            desk.Add(mov);
            button2.BringToFront();
            textBox2.Visible = false;
            label1.Visible   = false;
            ChageVisible(false);
            listBox1.Items.Clear();
            button1_Click(sender, e);
        }
Exemplo n.º 2
0
        private void Button_Add(object sender, RoutedEventArgs e)
        {
            var mov = new MovieCreator()
            {
                Title  = Title.Text,
                Year   = int.Parse(Year.Text),
                Genre  = Genre.Text,
                Type   = Type.Text,
                Rating = int.Parse(Rating.Text),
                Name   = Name.Text
            };

            desktopRepo.Add(mov);
            PAdd.Visibility   = Visibility.Visible;
            Title.Visibility  = Visibility.Hidden;
            TitleL.Visibility = Visibility.Hidden;
            ChangeVisible(Visibility.Hidden);
            ViewWindow.Items.Clear();
            View_Click(sender, e);
        }