Beispiel #1
0
        public EditableInfoItem(object obj, MemberInfo member, EditableInfoItemAttribute attribute)
            : base(attribute)
        {
            id = this.GetType().Name.Replace("InfoItem", "") + ":" + obj.GetType().Name.Replace("MechJebModule", "") + "." + member.Name;

            this.obj        = obj;
            this.member     = member;
            this.rightLabel = attribute.rightLabel;
            this.width      = attribute.width;
        }
        public EditableInfoItem(object obj, MemberInfo member, EditableInfoItemAttribute attribute)
            : base(attribute)
        {
            id = this.GetType().Name.Replace("InfoItem", "") + ":" + obj.GetType().Name.Replace("MechJebModule", "") + "." + member.Name;

            this.rightLabel = attribute.rightLabel;
            this.width      = attribute.width;

            if (member is FieldInfo)
            {
                val = (IEditable)((FieldInfo)member).GetValue(obj);
            }
            else if (member is PropertyInfo)
            {
                val = (IEditable)((PropertyInfo)member).GetValue(obj, new object[] { });
            }
        }
        public EditableInfoItem(object obj, MemberInfo member, EditableInfoItemAttribute attribute)
            : base(attribute)
        {
            id = this.GetType().Name.Replace("InfoItem", "") + ":" + obj.GetType().Name.Replace("MechJebModule", "") + "." + member.Name;

            this.obj = obj;
            this.member = member;
            this.rightLabel = attribute.rightLabel;
            this.width = attribute.width;
        }
        public EditableInfoItem(object obj, MemberInfo member, EditableInfoItemAttribute attribute)
            : base(attribute)
        {
            id = this.GetType().Name.Replace("InfoItem", "") + ":" + obj.GetType().Name.Replace("MechJebModule", "") + "." + member.Name;

            this.rightLabel = attribute.rightLabel;
            this.width = attribute.width;

            if (member is FieldInfo) val = (IEditable)((FieldInfo)member).GetValue(obj);
            else if (member is PropertyInfo) val = (IEditable)((PropertyInfo)member).GetValue(obj, new object[] { });
        }