Пример #1
0
        private void buttonAddPort_Click(object sender, RoutedEventArgs e)
        {
            PortsRangeDialog portsRangeDialog = new PortsRangeDialog {
                Owner = this
            };

            buttonAddPort.CommandParameter = (portsRangeDialog.ShowDialog() == true) ? portsRangeDialog.Port : null;
        }
Пример #2
0
        private void buttonEditPort_Click(object sender, RoutedEventArgs e)
        {
            PortsRangeDialog portsRangeDialog = new PortsRangeDialog {
                Owner = this
            };

            portsRangeDialog.Port           = (ushort)listBoxIPRange.SelectedItem;
            buttonEditPort.CommandParameter = (portsRangeDialog.ShowDialog() == true) ? portsRangeDialog.Port : null;
        }