예제 #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();
            }
        }