Пример #1
0
        void buttonSearch_Click(object sender, RoutedEventArgs e)
        {
            var search = new SearchMenu();

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

            if (!string.IsNullOrWhiteSpace(search.Query))
            {
                this.MessageText = string.Format("The following results are for your search for '{0}'.", search.Query);
                this.Hide();
            }
            else
            {
                this.Opacity = 1.0;
                buttonSearch.Focus();
            }
        }
Пример #2
0
        void buttonSearch_Click(object sender, RoutedEventArgs e)
        {
            var search = new SearchMenu();

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

            if (!string.IsNullOrWhiteSpace(search.Query))
            {
                this.MessageText = string.Format("The following results are for your search for '{0}'.", search.Query);
                this.Hide();
            }
            else
            {
                this.Opacity = 1.0;
                buttonSearch.Focus();
            }
        }