예제 #1
0
        public ProxyDrawer(ModuleManager manager, Guid id, ModuleDrawerAttribute attribute, Action <IEditor, ModuleDrawerEventArgs> handler)
            : base(manager, id, (attribute == null ? null : (ModuleDrawerAttribute)attribute.Clone()))
        {
            _Handler = handler;

            Init();
        }
예제 #2
0
        public ProxyDrawer(ModuleManager manager, Guid id, ModuleDrawerAttribute attribute, EventHandler<ModuleDrawerEventArgs> handler)
            : base(manager, id, (attribute == null ? null : (ModuleDrawerAttribute)attribute.Clone()))
        {
            _Handler = handler;

            Init();
        }
예제 #3
0
        public override IModuleDrawer RegisterModuleDrawer(Guid id, ModuleDrawerAttribute attribute, Action <IEditor, ModuleDrawerEventArgs> handler)
        {
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            if (attribute == null)
            {
                throw new ArgumentNullException("attribute");
            }
            if (string.IsNullOrEmpty(attribute.Name))
            {
                throw new ArgumentException("'attribute.Name' must not be empty.");
            }

            ProxyDrawer it = new ProxyDrawer(this, id, attribute, handler);

            it.LoadData((Hashtable)ReadSettings()[it.Id]);

            Host.Instance.RegisterProxyDrawer(it);
            return(it);
        }
예제 #4
0
        public override IModuleDrawer RegisterModuleDrawer(Guid id, ModuleDrawerAttribute attribute, EventHandler<ModuleDrawerEventArgs> handler)
        {
            if (handler == null)
                throw new ArgumentNullException("handler");
            if (attribute == null)
                throw new ArgumentNullException("attribute");
            if (string.IsNullOrEmpty(attribute.Name))
                throw new ArgumentException("'attribute.Name' must not be empty.");

            ProxyDrawer it = new ProxyDrawer(this, id, attribute, handler);
            it.LoadData((Hashtable)ReadSettings()[it.Id]);

            Host.Instance.RegisterProxyDrawer(it);
            return it;
        }