private void CreateAndAddWebResourceToForms()
        {
            WorkAsync(new WorkAsyncInfo
            {
                Message = "Creating Web Resource...",
                Work    = (w, e) =>
                {
                    ComboListItem selectedSolution = (ComboListItem)cboxSolutions.SelectedItem;
                    var solutionUniqueName         = selectedSolution.MetaData.GetAttributeValue <string>("uniquename");

                    e.Result = MetadataHelper.CreateWebResource(Service, solutionUniqueName, txtCreateWrDisplayName.Text, txtCreateWrSchemaName.Text, lblCreateSolutionPrefix.Text, txtInstrumentationKey.Text);
                },
                PostWorkCallBack = (args) =>
                {
                    if (args.Error != null)
                    {
                        MessageBox.Show(args.Error.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        var result = args.Result as CreateResponse;
                        if (result != null)
                        {
                            AddWebResourceToForms();
                        }
                    }
                }
            });
        }
        private void CboxSolutions_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboListItem selectedSolution = (ComboListItem)cboxSolutions.SelectedItem;

            lblCreateSolutionPrefix.Text = (selectedSolution.MetaData.GetAttributeValue <AliasedValue>("pub.customizationprefix")).Value.ToString() + "_";

            btnCreateWebResource.Enabled      = true;
            btnUseExistingWebResource.Enabled = true;
            cboxFilterBy.SelectedIndex        = 0;
        }