public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService));
         IHelpService service = (IHelpService) provider.GetService(typeof(IHelpService));
         if (edSvc == null)
         {
             return value;
         }
         if (this.linkAreaUI == null)
         {
             this.linkAreaUI = new LinkAreaUI(this, service);
         }
         string sampleText = string.Empty;
         PropertyDescriptor descriptor = null;
         if ((context != null) && (context.Instance != null))
         {
             descriptor = TypeDescriptor.GetProperties(context.Instance)["Text"];
             if ((descriptor != null) && (descriptor.PropertyType == typeof(string)))
             {
                 sampleText = (string) descriptor.GetValue(context.Instance);
             }
         }
         string str2 = sampleText;
         this.linkAreaUI.SampleText = sampleText;
         this.linkAreaUI.Start(edSvc, value);
         if (edSvc.ShowDialog(this.linkAreaUI) == DialogResult.OK)
         {
             value = this.linkAreaUI.Value;
             sampleText = this.linkAreaUI.SampleText;
             if ((!str2.Equals(sampleText) && (descriptor != null)) && (descriptor.PropertyType == typeof(string)))
             {
                 descriptor.SetValue(context.Instance, sampleText);
             }
         }
         this.linkAreaUI.End();
     }
     return value;
 }