private void add_Click(object sender, RoutedEventArgs e) { FilesWindow fwindow = new FilesWindow(); fwindow.Owner = MainWindow.MWindow; fwindow.number = -1; fwindow.setlist(ref filelist); fwindow.Show(); }
private void edit_Click(object sender, RoutedEventArgs e) { if (filelist.SelectedIndex >= 0) { FilesWindow fwindow = new FilesWindow(); fwindow.Owner = MainWindow.MWindow; fwindow.number = filelist.SelectedIndex; fwindow.setlist(ref filelist); fwindow.file = MainWindow.files[filelist.SelectedIndex].Name; fwindow.content = MainWindow.files[filelist.SelectedIndex].Content; fwindow.time = MainWindow.files[filelist.SelectedIndex].Time; fwindow.Show(); } }