Example #1
0
        public HeliosVisual CreateControl(string typeIdentifier)
        {
            HeliosVisual     control    = null;
            HeliosDescriptor descriptor = _controlDescriptors[typeIdentifier];

            if (descriptor != null)
            {
                control = (HeliosVisual)Activator.CreateInstance(descriptor.ControlType);
            }
            return(control);
        }
Example #2
0
        public HeliosVisualRenderer CreaterRenderer(HeliosVisual visual)
        {
            HeliosVisualRenderer renderer = null;
            Type visualType = visual.GetType();

            HeliosDescriptor descriptor = _controlDescriptors[visualType];

            if (descriptor != null)
            {
                renderer        = (HeliosVisualRenderer)Activator.CreateInstance(descriptor.Renderer);
                renderer.Visual = visual;
            }

            return(renderer);
        }