예제 #1
0
        public void SelectItem()
        {
            var id    = itemListBox.SelectedValue?.ToString();
            var model = IpSwitchHelper.FindById(id);

            if (model == default(IpEntity))
            {
                return;
            }
            nameMaskedTextBox.Text      = model.Name;
            ipMaskedTextBox.Text        = model.IpAddress;
            subnetMaskedTextBox.Text    = model.SubnetMask;
            gateMaskedTextBox.Text      = model.Gateway;
            dnsMaskedTextBox.Text       = model.DNS;
            idMaskedTextBox.Text        = model.Id;
            networkComBox.SelectedValue = model.NetworkID;
        }