public void NotifyPropertyChange(InterfaceElementProperty p)
        {
            ClassPointer cp = GetHolder();

            if (cp != null && _owner != null)
            {
                ILimnorDesignPane pane = cp.Project.GetTypedData <ILimnorDesignPane>(cp.ClassId);
                if (pane != null)
                {
                    _owner.NotifyPropertyChange(pane.Loader, p);
                }
            }
        }
        public List <InterfaceElementProperty> GetProperties()
        {
            ClassPointer cp = this.ClassTypePointer;

            if (cp != null)
            {
                if (!cp.IsInterface)
                {
                    throw new DesignerException("Invalid interface pointer. Class Id:{0}", cp.ClassId);
                }
                if (cp.ObjectInstance == null)
                {
                    throw new DesignerException("Interface object not loaded. Class Id:{0}", cp.ClassId);
                }
                InterfaceClass ifc = VPLUtil.GetObject(cp.ObjectInstance) as InterfaceClass;
                if (ifc == null)
                {
                    throw new DesignerException("Invalid interface pointer. object:{0}", cp.ObjectInstance);
                }
                return(ifc.Properties);
            }
            else
            {
                Type t = this.VariableLibType;
                if (t == null)
                {
                    throw new DesignerException("Invalid interface pointer. VariableLibType is null.");
                }
                if (t.IsInterface)
                {
                    List <InterfaceElementProperty> ls = new List <InterfaceElementProperty>();
                    PropertyInfo[] mifs = VPLUtil.GetProperties(t);
                    if (mifs != null && mifs.Length > 0)
                    {
                        for (int i = 0; i < mifs.Length; i++)
                        {
                            if (!mifs[i].IsSpecialName)
                            {
                                InterfaceElementProperty em = new InterfaceElementProperty(this, mifs[i]);
                                ls.Add(em);
                            }
                        }
                    }
                    return(ls);
                }
                else
                {
                    throw new DesignerException("Invalid interface pointer. Type is not an interface:{0}.", t);
                }
            }
        }
 public void OnInterfacePropertyChanged(InterfaceElementProperty property)
 {
     _objExplorer.OnInterfacePropertyChanged(property);
 }
Example #4
0
 public PropertyInfoInterface(InterfaceElementProperty prop)
 {
     _prop = prop;
 }
Example #5
0
 public void OnInterfacePropertyChanged(InterfaceElementProperty property)
 {
 }
Example #6
0
 public void OnInterfacePropertyAdded(InterfaceElementProperty property)
 {
 }
Example #7
0
 public void OnInterfacePropertyDeleted(InterfaceElementProperty property)
 {
 }