Exemple #1
0
        public void InitSubObjectEvent()
        {
            FieldInfo[] fl = new List <FieldInfo>(this.GetType().GetTypeInfo().DeclaredFields).ToArray();
            foreach (FieldInfo fi in fl)
            {
                if (fi.Name.Contains("_xo_"))
                {
                    object to = fi.GetValue(this);
                    if (to != null)
                    {
                        AbstractLFCDataObject lo = to as AbstractLFCDataObject;
                        if (lo != null)
                        {
                            lo.ObjctChanged += new LFCObjectChanged(lo_ObjctChanged);
                        }
                    }
                }
                if (fi.Name.Contains("_xi_"))
                {
                    object to            = fi.GetValue(this);
                    Type[] typeArguments = to.GetType().GetTypeInfo().GenericTypeArguments;

                    if (to != null)
                    {
                        EventInfo ei = to.GetType().GetRuntimeEvent("LFCListObjectChanged");
                        if (ei != null)
                        {
                            ei.AddEventHandler(this, new LFCListItemChanged(ol_Changed));
                        }
                    }
                }
            }
        }
Exemple #2
0
    {                           //主要是帮助实现延时加载和处理
        public static ObjectUIStatus getObjectUIStatus(AbstractLFCDataObject o)
        {
            ObjectUIStatus t = new ObjectUIStatus();

            t.DataObject = o;
            t.IsLoaded   = true;
            return(t);
        }
Exemple #3
0
 public bool IsRelationObjectChanged(AbstractLFCDataObject lo)
 {
     if (lo == null)
     {
         return(false);
     }
     if (lo.DataFlag == DataOperation.Nothing)
     {
         return(false);
     }
     return(true);
 }