private void add_Click(object sender, RoutedEventArgs e) { FilesWindow fwindow = new FilesWindow(); fwindow.Owner = this; 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 = this; fwindow.number = filelist.SelectedIndex; fwindow.setlist(ref filelist); fwindow.file = files[filelist.SelectedIndex]; fwindow.content = contents[filelist.SelectedIndex]; fwindow.Show(); } }