void ReleaseDesignerOutlets()
        {
            if (AvatarImg != null)
            {
                AvatarImg.Dispose();
                AvatarImg = null;
            }

            if (BlendNavBarView != null)
            {
                BlendNavBarView.Dispose();
                BlendNavBarView = null;
            }

            if (CollectionView != null)
            {
                CollectionView.Dispose();
                CollectionView = null;
            }

            if (Spinner != null)
            {
                Spinner.Dispose();
                Spinner = null;
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (AvatarImg != null)
     {
         AvatarImg.Dispose();
         AvatarImg = null;
     }
     if (DateLbl != null)
     {
         DateLbl.Dispose();
         DateLbl = null;
     }
     if (Disclosure != null)
     {
         Disclosure.Dispose();
         Disclosure = null;
     }
     if (MessageLbl != null)
     {
         MessageLbl.Dispose();
         MessageLbl = null;
     }
     if (NameLbl != null)
     {
         NameLbl.Dispose();
         NameLbl = null;
     }
 }
Пример #3
0
 private void UpdateAvatar(string hash)
 {
     if (!Avatar.Exist(hash))
     {
         return;
     }
     UserSetting.VCardPhotoHash = hash;
     UserSettingProvider.Save(UserSetting);
     Dispatcher.BeginInvoke(new Action(() => {
         AvatarImg.AttachSource(Avatar.GetSource(hash), 32, 32);
     }), DispatcherPriority.Normal);
 }
Пример #4
0
        private void RefreshAvatar()
        {
            if (Avatar.Exist(riTo.Presence.PhotoHash))
            {
                AvatarImg.AttachSource(Avatar.GetSource(riTo.Presence.PhotoHash), 32, 32);
            }
            else
            {
                AvatarImg.AttachSource(Icons.UserDefaultAvatarSource, 0, 0);
            }

            AvatarBorder.BorderThickness = new Thickness(1);
            AvatarBorder.BorderBrush     = RosterUtils.Presence2Brush(riTo.Presence.Status);
        }
Пример #5
0
 private void RefreshAvatar()
 {
     if (ViewMode == RosterViewerMode.Default)
     {
         AvatarImg.AttachSource(RosterUtils.Presence2Ico(Presence.Status), null, null);
         AvatarBorder.BorderThickness = new Thickness(0);
     }
     else if (ViewMode == RosterViewerMode.BigAvatar)
     {
         ImageSource avatar = Avatar.Exist(Presence.PhotoHash) ?
                              Avatar.GetSource(Presence.PhotoHash) :
                              Icons.UserDefaultAvatarSource;
         AvatarImg.AttachSource(avatar, 32, 32);
         AvatarBorder.BorderThickness = new Thickness(1);
         AvatarBorder.BorderBrush     = RosterUtils.Presence2Brush(Presence.Status);
     }
 }