private void ListButton_Click(object sender, RoutedEventArgs e) { ListViewed wind = new ListViewed(); Hide(); wind.Show(); }
private void SaveButton_Click(object sender, RoutedEventArgs e) { deleteItem();//удалить выбранный элемент StreamWriter writer = new StreamWriter(new FileStream("D:/АИП/C#курсовая/FilmsAndSeries/FilmsAndSeries/list.txt", FileMode.Append, FileAccess.Write), Encoding.Default); if (film.IsChecked ?? true) { filmInformation.Append("film" + '\t' + '\t'); } else { if (series.IsChecked ?? true) { filmInformation.Append("series" + '\t' + '\t'); } } if (genres.Text == "detective" || genres.Text == "adventure" || genres.Text == "historical") { filmInformation.Append(genres.Text + '\t'); } else { filmInformation.Append(genres.Text + '\t' + '\t'); } if (series.IsChecked ?? true) { filmInformation.Append(year.Text + '\t'); } else { filmInformation.Append(year.Text + '\t' + '\t'); } series.IsChecked = false; film.IsChecked = false; filmInformation.Append(name.Text); writer.WriteLine(filmInformation); writer.Close(); ListViewed win = new ListViewed(); win.Show(); Hide(); }