コード例 #1
0
 private void Avatar_Click(object sender, RoutedEventArgs e)
 {
     _avatars = new Popups.UIAvatars();
     _avatars.AvatarsBack.Click += AvatarsBack_Click;
     Uri[] avatarsUri = UIController.Proxy.GetAvailableAvatars(UIController.MyProfile.Username, UIController.Password);
     if (avatarsUri.Length != 0)
         _avatars.Avatars.Children.Clear();
     foreach (Uri uri in avatarsUri)
     {
         Objects.UICustomButton customButton = new Objects.UICustomButton();
         customButton.InternalImage.Source = new BitmapImage(uri);
         customButton.Click += CustomButton_Click;
         _avatars.Avatars.Children.Add(customButton);
     }
     UIController.ShowPanel(_avatars);
 }
コード例 #2
0
        /// <summary>
        /// Save the button checked as the last checked button.
        /// </summary>
        /// <param name="button">The button.</param>
        private void SaveCheckedButton(Objects.UICustomButton button)
        {
            Contract.Requires(button != null);

            if (_lastCheckedButton != null && _lastCheckedButton != button)
                _lastCheckedButton.IsChecked = false;

            _lastCheckedButton = button;
        }