File size: 1,323 Bytes
8c763fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;

namespace Microsoft.PowerShell.Commands.ShowCommandInternal
{
    /// <summary>
    /// Interaction logic for AllModulesControl.xaml.
    /// </summary>
    public partial class AllModulesControl : UserControl
    {
        #region Construction and Destructor

        /// <summary>
        /// Initializes a new instance of the AllModulesControl class.
        /// </summary>
        public AllModulesControl()
        {
            InitializeComponent();

            this.Loaded += (obj, args) =>
            {
                this.ModulesCombo.Focus();
            };
        }

        #endregion
        /// <summary>
        /// Gets current control of the ShowModuleControl.
        /// </summary>
        internal ShowModuleControl CurrentShowModuleControl
        {
            get { return this.ShowModuleControl; }
        }

        private void RefreshButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            AllModulesViewModel viewModel = this.DataContext as AllModulesViewModel;
            if (viewModel == null)
            {
                return;
            }

            viewModel.OnRefresh();
        }
    }
}