コード例 #1
0
 public override void RegisterCallback(string strPropertyName, AFIProperty.PropertyEventHandler handler)
 {
     if (mhtProperty.ContainsKey(strPropertyName))
     {
         AFIProperty xProperty = (AFCProperty)mhtProperty[strPropertyName];
         xProperty.RegisterCallback(handler);
     }
 }
コード例 #2
0
ファイル: AFCElement.cs プロジェクト: cpiqq/ArkClient_Core
        public override AFIDENTID QueryObject(string strName)
        {
            AFIProperty xProperty = GetPropertyManager().GetProperty(strName);

            if (null != xProperty)
            {
                return(xProperty.QueryObject());
            }

            return(new AFIDENTID());
        }
コード例 #3
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override double QueryPropertyDouble(string strPropertyName)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null != property)
            {
                return(property.QueryDouble());
            }

            return(0.0);
        }
コード例 #4
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override Int64 QueryPropertyInt(string strPropertyName)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null != property)
            {
                return(property.QueryInt());
            }

            return(0);
        }
コード例 #5
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override float QueryPropertyFloat(string strPropertyName)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null != property)
            {
                return(property.QueryFloat());
            }

            return(0.0f);
        }
コード例 #6
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override AFIDENTID QueryPropertyObject(string strPropertyName)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null != property)
            {
                return(property.QueryObject());
            }

            return(new AFIDENTID());
        }
コード例 #7
0
ファイル: AFCElement.cs プロジェクト: cpiqq/ArkClient_Core
        public override string QueryString(string strName)
        {
            AFIProperty xProperty = GetPropertyManager().GetProperty(strName);

            if (null != xProperty)
            {
                return(xProperty.QueryString());
            }

            return("");
        }
コード例 #8
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override string QueryPropertyString(string strPropertyName)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null != property)
            {
                return(property.QueryString());
            }

            return("");
        }
コード例 #9
0
ファイル: AFCElement.cs プロジェクト: cpiqq/ArkClient_Core
        public override double QueryDouble(string strName)
        {
            AFIProperty xProperty = GetPropertyManager().GetProperty(strName);

            if (null != xProperty)
            {
                return(xProperty.QueryDouble());
            }

            return(0f);
        }
コード例 #10
0
ファイル: AFCElement.cs プロジェクト: cpiqq/ArkClient_Core
        public override float QueryFloat(string strName)
        {
            AFIProperty xProperty = GetPropertyManager().GetProperty(strName);

            if (null != xProperty)
            {
                return(xProperty.QueryFloat());
            }

            return(0f);
        }
コード例 #11
0
ファイル: AFCElement.cs プロジェクト: cpiqq/ArkClient_Core
        public override Int64 QueryInt(string strName)
        {
            AFIProperty xProperty = GetPropertyManager().GetProperty(strName);

            if (null != xProperty)
            {
                return(xProperty.QueryInt());
            }

            return(0);
        }
コード例 #12
0
        public override AFIProperty AddProperty(string strPropertyName, AFIDataList varData)
        {
            AFIProperty xProperty = null;

            if (!mhtProperty.ContainsKey(strPropertyName))
            {
                xProperty = new AFCProperty(mSelf, strPropertyName, varData);
                mhtProperty[strPropertyName] = xProperty;
            }

            return(xProperty);
        }
コード例 #13
0
 public override bool SetProperty(string strPropertyName, AFIDataList varData)
 {
     if (mhtProperty.ContainsKey(strPropertyName))
     {
         AFIProperty xProperty = (AFCProperty)mhtProperty[strPropertyName];
         if (null != xProperty)
         {
             xProperty.SetValue(varData);
         }
     }
     return(true);
 }
コード例 #14
0
        public override AFIProperty GetProperty(string strPropertyName)
        {
            AFIProperty xProperty = null;

            if (mhtProperty.ContainsKey(strPropertyName))
            {
                xProperty = (AFCProperty)mhtProperty[strPropertyName];
                return(xProperty);
            }

            return(xProperty);
        }
コード例 #15
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override bool SetPropertyInt(string strPropertyName, Int64 nValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddInt64(0);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetInt(nValue);
            return(true);
        }
コード例 #16
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override bool SetPropertyObject(string strPropertyName, AFIDENTID obj)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddObject(new AFIDENTID());
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetObject(obj);
            return(true);
        }
コード例 #17
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override bool SetPropertyString(string strPropertyName, string strValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddString("");
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetString(strValue);
            return(true);
        }
コード例 #18
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override bool SetPropertyDouble(string strPropertyName, double dwValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddDouble(0);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetDouble(dwValue);
            return(true);
        }
コード例 #19
0
ファイル: AFCObject.cs プロジェクト: cpiqq/ArkClient_Core
        public override bool SetPropertyFloat(string strPropertyName, float fValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddFloat(0.0f);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetFloat(fValue);
            return(true);
        }
コード例 #20
0
        void AddBasePropertyFormOther(string strName, string strOther)
        {
            AFILogicClass xOtherClass = GetElement(strOther);
            AFILogicClass xLogicClass = GetElement(strName);

            if (null != xLogicClass && null != xOtherClass)
            {
                AFIDataList xValue = xOtherClass.GetPropertyManager().GetPropertyList();
                for (int i = 0; i < xValue.Count(); ++i)
                {
                    AFIProperty xProperty = xOtherClass.GetPropertyManager().GetProperty(xValue.StringVal(i));
                    xLogicClass.GetPropertyManager().AddProperty(xValue.StringVal(i), xProperty.GetValue());
                }
            }
        }
コード例 #21
0
        void InitProperty(AFIDENTID self, string strClassName)
        {
            AFILogicClass xLogicClass = AFCLogicClassManager.Instance.GetElement(strClassName);

            if (null == xLogicClass)
            {
                return;
            }

            AFIDataList xDataList = xLogicClass.GetPropertyManager().GetPropertyList();

            for (int i = 0; i < xDataList.Count(); ++i)
            {
                string      strPropertyName = xDataList.StringVal(i);
                AFIProperty xProperty       = xLogicClass.GetPropertyManager().GetProperty(strPropertyName);

                AFIObject          xObject          = GetObject(self);
                AFIPropertyManager xPropertyManager = xObject.GetPropertyManager();

                xPropertyManager.AddProperty(strPropertyName, xProperty.GetValue());
            }
        }
コード例 #22
0
        private void LoadInstanceElement(AFILogicClass xLogicClass)
        {
            string strLogicPath = mstrRootPath;

            strLogicPath += xLogicClass.GetInstance();

            XmlDocument xmldoc = new XmlDocument();

            xmldoc.Load(strLogicPath);
            /////////////////////////////////////////////////////////////////

            XmlNode xRoot = xmldoc.SelectSingleNode("XML");

            XmlNodeList xNodeList = xRoot.SelectNodes("Entry");

            for (int i = 0; i < xNodeList.Count; ++i)
            {
                //AFCLog.Instance.Log("Class:" + xLogicClass.GetName());

                XmlNode      xNodeClass = xNodeList.Item(i);
                XmlAttribute strID      = xNodeClass.Attributes["Id"];

                //AFCLog.Instance.Log("ClassID:" + strID.Value);

                AFIElement xElement = GetElement(strID.Value);
                if (null == xElement)
                {
                    xElement = new AFCElement();
                    AddElement(strID.Value, xElement);
                    xLogicClass.AddConfigName(strID.Value);

                    XmlAttributeCollection xCollection = xNodeClass.Attributes;
                    for (int j = 0; j < xCollection.Count; ++j)
                    {
                        XmlAttribute xAttribute = xCollection[j];
                        AFIProperty  xProperty  = xLogicClass.GetPropertyManager().GetProperty(xAttribute.Name);
                        if (null != xProperty)
                        {
                            AFIDataList.VARIANT_TYPE eType = xProperty.GetDataType();
                            switch (eType)
                            {
                            case AFIDataList.VARIANT_TYPE.VTYPE_INT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddInt64(int.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddFloat(float.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddDouble(double.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_STRING:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddString(xAttribute.Value);
                                AFIProperty xTestProperty = xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddObject(new AFIDENTID(0, int.Parse(xAttribute.Value)));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
        }