Example #1
0
        private void Btn_AddHeight_Click(object sender, RoutedEventArgs e)
        {
            var wndw = new AddLowHeightWindow()
            {
                Units = _units
            };

            if (!wndw.ShowDialog().Value)
            {
                return;
            }

            lb_h1s.Items.Add(new ListViewItem()
            {
                Content = wndw.H1
            });
        }
        /// <summary>
        /// Prompt user for new low terminal to add
        /// </summary>
        private void Btn_AddHeight_Click(object sender, RoutedEventArgs e)
        {
            var wndw = new AddLowHeightWindow()
            {
                h_2 = h_2
            };

            if (!wndw.ShowDialog().Value)
            {
                return;
            }

            if (h_1s.Count == 0)
            {
                ErrorCnt--;
                Validation.ClearInvalid(lb_h1s.GetBindingExpression(ListBox.ItemsSourceProperty));
            }

            h_1s.Add(wndw.h_1);
        }