示例#1
0
        public Matrix.Xmpp.Vcard.Vcard saveVCard(User user, AppPreferences appPref)
        {
            var vCard = new Matrix.Xmpp.Vcard.Vcard();

            vCard.SetElementValue("First", user.First);
            vCard.SetElementValue("Last", user.Last);
            vCard.Fullname     = user.First + " " + user.Last;
            vCard.Nickname     = user.username;
            vCard.Photo        = new Matrix.Xmpp.Vcard.Photo();
            vCard.Photo.Binval = ByteBufferFromImage(Base64ToBitmap(appPref.getValueKey(AppPreferences.AVATAR)));
            vCard.SetElementValue("Phone", user.Phone);
            return(vCard);
        }
示例#2
0
        public Matrix.Xmpp.Vcard.Vcard saveVCard(User user, AppPreferences appPref, string avatar)
        {
            var vCard = new Matrix.Xmpp.Vcard.Vcard();

            vCard.SetElementValue("First", user.First);
            vCard.SetElementValue("Last", user.Last);
            vCard.Fullname = user.First + " " + user.Last;
            vCard.Nickname = user.username;
            vCard.Photo    = new Matrix.Xmpp.Vcard.Photo();
            if (avatar != null)
            {
                vCard.Photo.Binval = ByteBufferFromImage(Base64ToBitmap(avatar));
            }
            vCard.SetElementValue("Phone", user.Phone);
            return(vCard);
        }