public CustomInterfaceMethodPointer(InterfaceElementMethod method, IClass holder, IAction act)
 {
     _act     = act;
     _method  = method;
     _wholeId = DesignUtil.MakeDDWord(_method.MethodId, holder.ClassId);
     _holder  = holder;
 }
예제 #2
0
        /// <summary>
        /// it must be called from a separated app domain other than the designer.
        /// </summary>
        /// <param name="xmlFile"></param>
        public void Load(string xmlFile)
        {
            ProjectEnvironment.RunMode = true;
            XmlDocument doc = new XmlDocument();

            doc.Load(xmlFile);
            XmlNode       _node   = doc.DocumentElement;
            LimnorProject project = new LimnorProject(LimnorProject.GetProjectFileByComponentFile(xmlFile));
            //create root object
            UInt32          classId  = XmlUtil.GetAttributeUInt(_node, XmlTags.XMLATT_ClassID);
            UInt32          memberId = XmlUtil.GetAttributeUInt(_node, XmlTags.XMLATT_ComponentID);
            ObjectIDmap     map      = new ObjectIDmap(project, DesignUtil.MakeDDWord(memberId, classId), _node);
            XmlObjectReader xr       = new XmlObjectReader(map, ClassPointer.OnAfterReadRootComponent, ClassPointer.OnRootComponentCreated);

            map.SetReader(xr);
            _rootId = new ClassPointer(classId, memberId, map, null);
            string          file   = project.GetComponentFileByClassId(classId);
            ComponentLoader loader = new ComponentLoader(xr, file);
            DesignSurface   ds     = new DesignSurface();

            ds.BeginLoad(loader);
            if (xr.Errors != null && xr.Errors.Count > 0)
            {
                MathNode.Log(xr.Errors);
            }
            _rootId.LoadActionInstances();
        }
예제 #3
0
 public CustomMethodPointer(MethodClass method, IClass holder)
 {
     _method  = method;
     _wholeId = DesignUtil.MakeDDWord(_method.MemberId, holder.ClassId);            // _method.WholeId;
     _holder  = holder;
 }