"Fossies" - the Fresh Open Source Software Archive

Member "PowerShell-7.2.5/src/Microsoft.Management.UI.Internal/ShowCommand/Controls/AllModulesControl.xaml.cs" (21 Jun 2022, 1323 Bytes) of package /linux/misc/PowerShell-7.2.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright (c) Microsoft Corporation.
    2 // Licensed under the MIT License.
    3 
    4 using System.ComponentModel;
    5 using System.Windows;
    6 using System.Windows.Controls;
    7 
    8 namespace Microsoft.PowerShell.Commands.ShowCommandInternal
    9 {
   10     /// <summary>
   11     /// Interaction logic for AllModulesControl.xaml.
   12     /// </summary>
   13     public partial class AllModulesControl : UserControl
   14     {
   15         #region Construction and Destructor
   16 
   17         /// <summary>
   18         /// Initializes a new instance of the AllModulesControl class.
   19         /// </summary>
   20         public AllModulesControl()
   21         {
   22             InitializeComponent();
   23 
   24             this.Loaded += (obj, args) =>
   25             {
   26                 this.ModulesCombo.Focus();
   27             };
   28         }
   29 
   30         #endregion
   31         /// <summary>
   32         /// Gets current control of the ShowModuleControl.
   33         /// </summary>
   34         internal ShowModuleControl CurrentShowModuleControl
   35         {
   36             get { return this.ShowModuleControl; }
   37         }
   38 
   39         private void RefreshButton_Click(object sender, System.Windows.RoutedEventArgs e)
   40         {
   41             AllModulesViewModel viewModel = this.DataContext as AllModulesViewModel;
   42             if (viewModel == null)
   43             {
   44                 return;
   45             }
   46 
   47             viewModel.OnRefresh();
   48         }
   49     }
   50 }