private void PropertyGridOnPropertyValueChanged(object s, PropertyValueChangedEventArgs args)
        {
            switch (args.ChangedItem.Label)
            {
            case "Address" when !WebAddressHelper.UrlChecker3(args.ChangedItem.Value.ToString()):
            case "Name" when string.IsNullOrWhiteSpace(args.ChangedItem.Value.ToString()):
                InvalidMessageAndResetToLastValue(args);

                break;
            }
        }
        private void AssignBadButton_Click(object sender, EventArgs e)
        {
            propertyGrid.SelectedObject = null;

            var item = new Item()
            {
                FirstName = "Karen",
                LastName  = "Payne",
                Name      = "ABC",
                Address   = "http://foo.bar?q=Spaces should be encoded"
            };

            if (WebAddressHelper.UrlChecker3(item.Address))
            {
                propertyGrid.SelectedObject = item;
            }
            else
            {
                MessageBox.Show(@"Invalid address");
            }
        }
        private void AssignGoodButton_Click(object sender, EventArgs e)
        {
            propertyGrid.SelectedObject = null;

            var item = new Item()
            {
                FirstName = "Karen",
                LastName  = "Payne",
                Name      = "ABC",
                Address   = "https://stackoverflow.com/questions/"
            };

            if (WebAddressHelper.UrlChecker3(item.Address))
            {
                propertyGrid.SelectedObject = item;
            }
            else
            {
                MessageBox.Show(@"Invalid address");
            }
        }