private void btnAdd_Click(object sender, RoutedEventArgs e) { AddBasicAdjustmentWindow window = new AddBasicAdjustmentWindow(null); if (window.ShowDialog(Application.Current.MainWindow)) { List.Add(window.Adjustment); } }
private void EditSelectedItem() { BasicAdjustment adjustment = (lvMain.SelectedItem as BasicAdjustment); if (adjustment == null) { return; } AddBasicAdjustmentWindow window = new AddBasicAdjustmentWindow(adjustment); if (window.ShowDialog(Application.Current.MainWindow)) { adjustment.Modifier = window.Adjustment.Modifier; adjustment.Note = window.Adjustment.Note; } }