예제 #1
0
        async void Toast_Loaded(object sender, RoutedEventArgs e)
        {
            // after load, locate, fade, and show
            locateInScreen(location);

            BitmapSource head;

            if (!string.IsNullOrEmpty(player) && (head = await Heads.GetPlayerHead(player)) != null)
            {
                cImage.Visibility = Visibility.Visible;
                cImage.Source     = head;
            }

            await fade(true);

            hideTimer.IsEnabled = true;
        }
예제 #2
0
 // reload the player head
 async void playerSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     playerHead.Source = playerList.SelectedIndex < 0 ? null :
                         await Heads.GetPlayerHead((string)playerList.SelectedItem);
 }