Example #1
0
        void buttonRate_Click(object sender, RoutedEventArgs e)
        {
            if (currentTitle != null)
            {
                var rating = new RateMenu();

                this.Opacity = 0.2;
                rating.ShowDialog();

                if (!string.IsNullOrWhiteSpace(rating.Rating))
                {
                    this.MessageText = string.Format("Your rating of '{0}' has been set for '{1}'.", rating.Rating, currentTitle.RegularTitle);
                    this.Hide();
                }
                else
                {
                    this.Opacity = 1.0;
                    buttonRate.Focus();
                }
            }
        }
Example #2
0
        void buttonRate_Click(object sender, RoutedEventArgs e)
        {
            if (currentTitle != null)
            {
                var rating = new RateMenu();

                this.Opacity = 0.2;
                rating.ShowDialog();

                if (!string.IsNullOrWhiteSpace(rating.Rating)) {
                    this.MessageText = string.Format("Your rating of '{0}' has been set for '{1}'.", rating.Rating, currentTitle.RegularTitle);
                    this.Hide();
                } else {
                    this.Opacity = 1.0;
                    buttonRate.Focus();
                }
            }
        }