Esempio n. 1
0
        public void RunXmlScriptFromFile(string xmlFile)
        {
            EnumerationErrors errors = new EnumerationErrors();
            int status = SafeNativeMethods.xnContextRunXmlScriptFromFile(this.InternalObject, xmlFile, errors.InternalObject);

            WrapperUtils.CheckEnumeration(status, errors);
        }
Esempio n. 2
0
        public void RunXmlScript(string xml)
        {
            this.usingDeprecatedAPI = true;
            EnumerationErrors errors = new EnumerationErrors();
            int status = SafeNativeMethods.xnContextRunXmlScript(this.InternalObject, xml, errors.InternalObject);

            WrapperUtils.CheckEnumeration(status, errors);
        }
Esempio n. 3
0
        private static IntPtr InitFromXmlEx(string xmlFile, out IntPtr hScriptNode)
        {
            IntPtr            pContext;
            EnumerationErrors errors = new EnumerationErrors();
            int status = SafeNativeMethods.xnInitFromXmlFileEx(xmlFile, out pContext, errors.InternalObject, out hScriptNode);

            WrapperUtils.CheckEnumeration(status, errors);
            return(pContext);
        }
Esempio n. 4
0
        public ProductionNode RunXmlScriptFromFileEx(string xmlFile)
        {
            EnumerationErrors errors = new EnumerationErrors();
            IntPtr            hScriptNode;
            int status = SafeNativeMethods.xnContextRunXmlScriptFromFileEx(this.InternalObject, xmlFile, errors.InternalObject, out hScriptNode);

            WrapperUtils.CheckEnumeration(status, errors);
            return(new ScriptNode(this, hScriptNode, false));
        }
Esempio n. 5
0
        private static IntPtr InitFromXml(string xmlFile)
        {
            IntPtr            pContext;
            EnumerationErrors errors = new EnumerationErrors();

                        #pragma warning disable 612
            int status = SafeNativeMethods.xnInitFromXmlFile(xmlFile, out pContext, errors.InternalObject);
                        #pragma warning restore 612
            WrapperUtils.CheckEnumeration(status, errors);
            return(pContext);
        }
Esempio n. 6
0
        internal IntPtr CreateAnyProductionTreeImpl(NodeType type, Query query)
        {
            IntPtr nodeHandle;

            using (EnumerationErrors errors = new EnumerationErrors())
            {
                int status = SafeNativeMethods.xnCreateAnyProductionTree(this.InternalObject, type,
                                                                         query == null ? IntPtr.Zero : query.InternalObject,
                                                                         out nodeHandle, errors.InternalObject);
                WrapperUtils.CheckEnumeration(status, errors);
            }

            return(nodeHandle);
        }
Esempio n. 7
0
        public NodeInfoList EnumerateProductionTrees(NodeType type, Query query)
        {
            IntPtr resultList;

            using (EnumerationErrors errors = new EnumerationErrors())
            {
                int status = SafeNativeMethods.xnEnumerateProductionTrees(this.InternalObject, type,
                                                                          query == null ? IntPtr.Zero : query.InternalObject,
                                                                          out resultList,
                                                                          errors.InternalObject);
                WrapperUtils.CheckEnumeration(status, errors);
            }

            return(new NodeInfoList(resultList));
        }