public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     // Uses the IWindowsFormsEditorService to display a
     // drop-down UI in the Properties window.
     IWindowsFormsEditorService edSvc =
         (IWindowsFormsEditorService) provider.GetService(typeof (IWindowsFormsEditorService));
     if (edSvc != null) {
         SphereMapEditorForm view = new SphereMapEditorForm(value as SphereMap);
         if (view.ShowDialog() == DialogResult.OK) {
             return view.SphereMap;
         }
     }
     return value;
 }
Beispiel #2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            // Uses the IWindowsFormsEditorService to display a
            // drop-down UI in the Properties window.
            IWindowsFormsEditorService edSvc =
                (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc != null)
            {
                SphereMapEditorForm view = new SphereMapEditorForm(value as SphereMap);
                if (view.ShowDialog() == DialogResult.OK)
                {
                    return(view.SphereMap);
                }
            }
            return(value);
        }