private void DecimalIpAddressTextBox_KeyUp(object sender, KeyEventArgs e)
        {
            string RawInput;
            RawInput = DecimalIpAddressTextBox.Text.Trim();

            // CIDR regex
            string pattern = @"((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
            Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase);

            if (rgx.IsMatch(RawInput) == true)
            {
                try
                {
                    IpAddress Address = new IpAddress(RawInput);
                    BinaryIpAddressTextBox.Text = Address.ToBinaryString();
                }
                catch (Exception)
                {

                    BinaryIpAddressTextBox.Text = "Invalid Address";
                }
            }
            else
            {
                BinaryIpAddressTextBox.Text = "";
            }
        }