Пример #1
0
 // Adds the result to the results queue
 public void AddResult(SpellingResult result)
 {
     if (result != null)
     {
         results.Enqueue(result);
     }
 }
        // Builds a stackpanel from a SpellingResult
        private StackPanel BuildStackPanel(SpellingResult result)
        {
            StackPanel sp = new StackPanel();
            sp.Orientation = System.Windows.Controls.Orientation.Horizontal;

            sp.Children.Add(BuildImage(result.getImage()));
            sp.Children.Add(BuildFormattedBlock(result.getVerifiedName()));
            if (result.isCorrect)
                sp.Children.Add(BuildFormattedBlock(AnimalSpelling.Instance.VerifyInput("Correct!", "Correct!")));
            else
                sp.Children.Add(BuildUnformattedBlock(result.getName()));

            return sp;
        }
        // Builds a stackpanel from a SpellingResult
        private StackPanel BuildStackPanel(SpellingResult result)
        {
            StackPanel sp = new StackPanel();

            sp.Orientation = System.Windows.Controls.Orientation.Horizontal;

            sp.Children.Add(BuildImage(result.getImage()));
            sp.Children.Add(BuildFormattedBlock(result.getVerifiedName()));
            if (result.isCorrect)
            {
                sp.Children.Add(BuildFormattedBlock(AnimalSpelling.Instance.VerifyInput("Correct!", "Correct!")));
            }
            else
            {
                sp.Children.Add(BuildUnformattedBlock(result.getName()));
            }

            return(sp);
        }
 // Adds the result to the results queue
 public void AddResult(SpellingResult result)
 {
     if(result != null)
         results.Enqueue(result);
 }