private void button1_Click(object sender, RoutedEventArgs e) { Window2 okno3 = new Window2(); okno3.Show(); //; okno3.Show(); // Thread watek = new Thread(okno3.Show); // watek.Start(); }
private void btn1_Click(object sender, RoutedEventArgs e) { /* Sons.Position = TimeSpan.Zero; * Sons.Play();*/ Window2 win2 = new Window2(); win2.Show(); this.Close(); }
//add student private void Button_Click_4(object sender, RoutedEventArgs e) { Window2 win2 = new Window2(); win2.label_of_students.Text = "Факультет:" + listbox.SelectedItem + " Группа №" + grouplist.SelectedItem; win2.ShowDialog(); if (win2.flag) { MyList<Student> clear = new MyList<Student>(); Student s = new Student(); s.name = win2.name.Text; s.surname = win2.surname.Text; faclist.getElement(listbox.SelectedIndex).groups.getElement(grouplist.SelectedIndex).students.addObject(s); foreach (Student ss in faclist.getElement(listbox.SelectedIndex).groups.getElement(grouplist.SelectedIndex).students) clear.addObject(ss); studentlist.ItemsSource = clear; } }