private void editCopyButton_Click(object sender, RoutedEventArgs e) { if (copyGrid.SelectedItem != null) { int num = Int32.Parse(((TextBlock)copyGrid.Columns[1].GetCellContent(copyGrid.SelectedItem)).Text); string tempType = typeBox.SelectedItem.ToString(); WindowCopy win = new WindowCopy(xml, tempType, num); win.Owner = this; win.ShowDialog(); updateCopyGrid(); } }
private void MenuAddCopy_Click(object sender, RoutedEventArgs e) { WindowCopy win = new WindowCopy(xml); if (win != null) { win.Owner = this; win.ShowDialog(); } }
private void addCopyButton_Click(object sender, RoutedEventArgs e) { WindowCopy win = null; if (typeBox.SelectedItem != null) win = new WindowCopy(xml, typeBox.SelectedItem.ToString()); else win = new WindowCopy(xml); win.Owner = this; win.ShowDialog(); updateCopyGrid(); }