Beispiel #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            object newObject = value;

            IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            m_world = context.Instance as WorldAdapter;

            if (svc != null)
            {
                TerrainHeightScroll ctrl = new TerrainHeightScroll();
                ctrl.World = m_world;
                ctrl.Value = int.Parse(value.ToString());

                svc.DropDownControl(ctrl);

                newObject = ctrl.Value;
            }

            return newObject;
        }