private void Btn_AddHeight_Click(object sender, RoutedEventArgs e) { var wndw = new AddHighHeightWindow() { Units = _units }; if (!wndw.ShowDialog().Value) { return; } lb_h2s.Items.Add(new ListViewItem() { Content = wndw.H2 }); }
/// <summary> /// Prompt user for new high terminal to add /// </summary> private void Btn_AddHeight_Click(object sender, RoutedEventArgs e) { var wndw = new AddHighHeightWindow() { h_1 = h_1 }; if (!wndw.ShowDialog().Value) { return; } if (h_2s.Count == 0) { ErrorCnt--; Validation.ClearInvalid(lb_h2s.GetBindingExpression(ListBox.ItemsSourceProperty)); } h_2s.Add(wndw.h_2); }