Esempio n. 1
0
        static string PropertyGroupManagerReloadPg(string[] args)
        {
            if (args.Length == 0)
            {
                return("PropertyGroupManager_ReloadGroup(string propertyGroup) expects one parameter, no parameters received!");
            }
            if (!IsString(args[0]))
            {
                return("PropertyGroupManager_ReloadGroup(string propertyGroup) expects one parameter of type STRING, wrong type!");
            }

            string arg0 = ParseString(args[0]);
            IntPtr propertyGroupManager;

            try
            {
                propertyGroupManager = DoW2Bridge.PropertyGroupManager_Instance();
            }
            catch (Exception ex)
            {
                return("PropertyGroupManager_Instance failed: " + ex.Message);
            }
            if (propertyGroupManager == null)
            {
                return("PropertyGroupManager_Instance failed!");
            }

            IntPtr pg;

            try
            {
                pg = DoW2Bridge.PropertyGroupManager_ReloadPropertyGroup(propertyGroupManager, arg0);
            }
            catch (Exception ex)
            {
                return("PropertyGroupManager_ReloadPropertyGroup failed: " + ex.Message);
            }
            if (pg == null)
            {
                return("PropertyGroupManager_ReloadPropertyGroup failed!");
            }
            DoW2Bridge.TimeStampedTrace("CopeDebug - " + arg0 + " reloaded");
            return("PropertyGroup " + arg0 + " reloaded");
        }
Esempio n. 2
0
        static string PropertyGroupManagerGetGroup(string[] args)
        {
            if (args.Length == 0)
            {
                return("PropertyGroupManager_GetGroup(string propertyGroup) expects one parameter, no parameters received!");
            }
            if (!IsString(args[0]))
            {
                return("PropertyGroupManager_GetGroup(string propertyGroup) expects one parameter of type STRING, wrong type!");
            }

            IntPtr propertyGroupManager;

            try
            {
                propertyGroupManager = DoW2Bridge.PropertyGroupManager_Instance();
            }
            catch (Exception ex)
            {
                return("PropertyGroupManager_Instance failed: " + ex.Message);
            }
            if (propertyGroupManager == null)
            {
                return("PropertyGroupManager_Instance failed!");
            }

            IntPtr pg;

            try
            {
                pg = DoW2Bridge.PropertyGroupManager_GetGroup(propertyGroupManager, ParseString(args[0]));
            }
            catch (Exception ex)
            {
                return("PropertyGroupManager_GetGroup failed: " + ex.Message);
            }
            if (pg == null)
            {
                return("PropertyGroupManager_GetGroup failed!");
            }
            return("GetGroup succeeded, address: " + pg);
        }