"Fossies" - the Fresh Open Source Software Archive

Member "PowerShell-7.2.6/src/Microsoft.Management.UI.Internal/ManagementList/FilterProviders/AddFilterRulePicker.Generated.cs" (11 Aug 2022, 10565 Bytes) of package /linux/misc/PowerShell-7.2.6.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.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 // Copyright (c) Microsoft Corporation.
    2 // Licensed under the MIT License.
    3 
    4 #region StyleCop Suppression - generated code
    5 using System;
    6 using System.ComponentModel;
    7 using System.Windows;
    8 using System.Windows.Input;
    9 
   10 namespace Microsoft.Management.UI.Internal
   11 {
   12     [Localizability(LocalizationCategory.None)]
   13     partial class AddFilterRulePicker
   14     {
   15         //
   16         // CancelAddFilterRules routed command
   17         //
   18         /// <summary>
   19         /// Closes the picker and unchecks all items in the panel.
   20         /// </summary>
   21         public static readonly RoutedCommand CancelAddFilterRulesCommand = new RoutedCommand("CancelAddFilterRules",typeof(AddFilterRulePicker));
   22 
   23         static private void CancelAddFilterRulesCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
   24         {
   25             AddFilterRulePicker obj = (AddFilterRulePicker) sender;
   26             obj.OnCancelAddFilterRulesExecuted( e );
   27         }
   28 
   29         /// <summary>
   30         /// Called when CancelAddFilterRules executes.
   31         /// </summary>
   32         /// <remarks>
   33         /// Closes the picker and unchecks all items in the panel.
   34         /// </remarks>
   35         protected virtual void OnCancelAddFilterRulesExecuted(ExecutedRoutedEventArgs e)
   36         {
   37             OnCancelAddFilterRulesExecutedImplementation(e);
   38         }
   39 
   40         partial void OnCancelAddFilterRulesExecutedImplementation(ExecutedRoutedEventArgs e);
   41 
   42         //
   43         // OkAddFilterRules routed command
   44         //
   45         /// <summary>
   46         /// Closes the picker and calls AddFilterRulesCommand with the collection of checked items from the picker.
   47         /// </summary>
   48         public static readonly RoutedCommand OkAddFilterRulesCommand = new RoutedCommand("OkAddFilterRules",typeof(AddFilterRulePicker));
   49 
   50         static private void OkAddFilterRulesCommand_CommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
   51         {
   52             AddFilterRulePicker obj = (AddFilterRulePicker) sender;
   53             obj.OnOkAddFilterRulesCanExecute( e );
   54         }
   55 
   56         static private void OkAddFilterRulesCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
   57         {
   58             AddFilterRulePicker obj = (AddFilterRulePicker) sender;
   59             obj.OnOkAddFilterRulesExecuted( e );
   60         }
   61 
   62         /// <summary>
   63         /// Called to determine if OkAddFilterRules can execute.
   64         /// </summary>
   65         protected virtual void OnOkAddFilterRulesCanExecute(CanExecuteRoutedEventArgs e)
   66         {
   67             OnOkAddFilterRulesCanExecuteImplementation(e);
   68         }
   69 
   70         partial void OnOkAddFilterRulesCanExecuteImplementation(CanExecuteRoutedEventArgs e);
   71 
   72         /// <summary>
   73         /// Called when OkAddFilterRules executes.
   74         /// </summary>
   75         /// <remarks>
   76         /// Closes the picker and calls AddFilterRulesCommand with the collection of checked items from the picker.
   77         /// </remarks>
   78         protected virtual void OnOkAddFilterRulesExecuted(ExecutedRoutedEventArgs e)
   79         {
   80             OnOkAddFilterRulesExecutedImplementation(e);
   81         }
   82 
   83         partial void OnOkAddFilterRulesExecutedImplementation(ExecutedRoutedEventArgs e);
   84 
   85         //
   86         // AddFilterRulesCommand dependency property
   87         //
   88         /// <summary>
   89         /// Identifies the AddFilterRulesCommand dependency property.
   90         /// </summary>
   91         public static readonly DependencyProperty AddFilterRulesCommandProperty = DependencyProperty.Register( "AddFilterRulesCommand", typeof(ICommand), typeof(AddFilterRulePicker), new PropertyMetadata( null, AddFilterRulesCommandProperty_PropertyChanged) );
   92 
   93         /// <summary>
   94         /// Gets or sets the command used to communicate that the action has occurred.
   95         /// </summary>
   96         [Bindable(true)]
   97         [Category("Common Properties")]
   98         [Description("Gets or sets the command used to communicate that the action has occurred.")]
   99         [Localizability(LocalizationCategory.None)]
  100         public ICommand AddFilterRulesCommand
  101         {
  102             get
  103             {
  104                 return (ICommand) GetValue(AddFilterRulesCommandProperty);
  105             }
  106             set
  107             {
  108                 SetValue(AddFilterRulesCommandProperty,value);
  109             }
  110         }
  111 
  112         static private void AddFilterRulesCommandProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
  113         {
  114             AddFilterRulePicker obj = (AddFilterRulePicker) o;
  115             obj.OnAddFilterRulesCommandChanged( new PropertyChangedEventArgs<ICommand>((ICommand)e.OldValue, (ICommand)e.NewValue) );
  116         }
  117 
  118         /// <summary>
  119         /// Occurs when AddFilterRulesCommand property changes.
  120         /// </summary>
  121         public event EventHandler<PropertyChangedEventArgs<ICommand>> AddFilterRulesCommandChanged;
  122 
  123         /// <summary>
  124         /// Called when AddFilterRulesCommand property changes.
  125         /// </summary>
  126         protected virtual void OnAddFilterRulesCommandChanged(PropertyChangedEventArgs<ICommand> e)
  127         {
  128             OnAddFilterRulesCommandChangedImplementation(e);
  129             RaisePropertyChangedEvent(AddFilterRulesCommandChanged, e);
  130         }
  131 
  132         partial void OnAddFilterRulesCommandChangedImplementation(PropertyChangedEventArgs<ICommand> e);
  133 
  134         //
  135         // AddFilterRulesCommandTarget dependency property
  136         //
  137         /// <summary>
  138         /// Identifies the AddFilterRulesCommandTarget dependency property.
  139         /// </summary>
  140         public static readonly DependencyProperty AddFilterRulesCommandTargetProperty = DependencyProperty.Register( "AddFilterRulesCommandTarget", typeof(IInputElement), typeof(AddFilterRulePicker), new PropertyMetadata( null, AddFilterRulesCommandTargetProperty_PropertyChanged) );
  141 
  142         /// <summary>
  143         /// Gets or sets a target of the Command.
  144         /// </summary>
  145         [Bindable(true)]
  146         [Category("Common Properties")]
  147         [Description("Gets or sets a target of the Command.")]
  148         [Localizability(LocalizationCategory.None)]
  149         public IInputElement AddFilterRulesCommandTarget
  150         {
  151             get
  152             {
  153                 return (IInputElement) GetValue(AddFilterRulesCommandTargetProperty);
  154             }
  155             set
  156             {
  157                 SetValue(AddFilterRulesCommandTargetProperty,value);
  158             }
  159         }
  160 
  161         static private void AddFilterRulesCommandTargetProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
  162         {
  163             AddFilterRulePicker obj = (AddFilterRulePicker) o;
  164             obj.OnAddFilterRulesCommandTargetChanged( new PropertyChangedEventArgs<IInputElement>((IInputElement)e.OldValue, (IInputElement)e.NewValue) );
  165         }
  166 
  167         /// <summary>
  168         /// Occurs when AddFilterRulesCommandTarget property changes.
  169         /// </summary>
  170         public event EventHandler<PropertyChangedEventArgs<IInputElement>> AddFilterRulesCommandTargetChanged;
  171 
  172         /// <summary>
  173         /// Called when AddFilterRulesCommandTarget property changes.
  174         /// </summary>
  175         protected virtual void OnAddFilterRulesCommandTargetChanged(PropertyChangedEventArgs<IInputElement> e)
  176         {
  177             OnAddFilterRulesCommandTargetChangedImplementation(e);
  178             RaisePropertyChangedEvent(AddFilterRulesCommandTargetChanged, e);
  179         }
  180 
  181         partial void OnAddFilterRulesCommandTargetChangedImplementation(PropertyChangedEventArgs<IInputElement> e);
  182 
  183         //
  184         // IsOpen dependency property
  185         //
  186         /// <summary>
  187         /// Identifies the IsOpen dependency property.
  188         /// </summary>
  189         public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof(bool), typeof(AddFilterRulePicker), new PropertyMetadata( BooleanBoxes.FalseBox, IsOpenProperty_PropertyChanged) );
  190 
  191         /// <summary>
  192         /// Gets or sets a value indicating whether the Popup is visible.
  193         /// </summary>
  194         [Bindable(true)]
  195         [Category("Common Properties")]
  196         [Description("Gets or sets a value indicating whether the Popup is visible.")]
  197         [Localizability(LocalizationCategory.None)]
  198         public bool IsOpen
  199         {
  200             get
  201             {
  202                 return (bool) GetValue(IsOpenProperty);
  203             }
  204             set
  205             {
  206                 SetValue(IsOpenProperty,BooleanBoxes.Box(value));
  207             }
  208         }
  209 
  210         static private void IsOpenProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
  211         {
  212             AddFilterRulePicker obj = (AddFilterRulePicker) o;
  213             obj.OnIsOpenChanged( new PropertyChangedEventArgs<bool>((bool)e.OldValue, (bool)e.NewValue) );
  214         }
  215 
  216         /// <summary>
  217         /// Occurs when IsOpen property changes.
  218         /// </summary>
  219         public event EventHandler<PropertyChangedEventArgs<bool>> IsOpenChanged;
  220 
  221         /// <summary>
  222         /// Called when IsOpen property changes.
  223         /// </summary>
  224         protected virtual void OnIsOpenChanged(PropertyChangedEventArgs<bool> e)
  225         {
  226             OnIsOpenChangedImplementation(e);
  227             RaisePropertyChangedEvent(IsOpenChanged, e);
  228         }
  229 
  230         partial void OnIsOpenChangedImplementation(PropertyChangedEventArgs<bool> e);
  231 
  232         /// <summary>
  233         /// Called when a property changes.
  234         /// </summary>
  235         private void RaisePropertyChangedEvent<T>(EventHandler<PropertyChangedEventArgs<T>> eh, PropertyChangedEventArgs<T> e)
  236         {
  237             if (eh != null)
  238             {
  239                 eh(this,e);
  240             }
  241         }
  242 
  243         //
  244         // Static constructor
  245         //
  246 
  247         /// <summary>
  248         /// Called when the type is initialized.
  249         /// </summary>
  250         static AddFilterRulePicker()
  251         {
  252             DefaultStyleKeyProperty.OverrideMetadata(typeof(AddFilterRulePicker), new FrameworkPropertyMetadata(typeof(AddFilterRulePicker)));
  253             CommandManager.RegisterClassCommandBinding( typeof(AddFilterRulePicker), new CommandBinding( AddFilterRulePicker.CancelAddFilterRulesCommand, CancelAddFilterRulesCommand_CommandExecuted ));
  254             CommandManager.RegisterClassCommandBinding( typeof(AddFilterRulePicker), new CommandBinding( AddFilterRulePicker.OkAddFilterRulesCommand, OkAddFilterRulesCommand_CommandExecuted, OkAddFilterRulesCommand_CommandCanExecute ));
  255             StaticConstructorImplementation();
  256         }
  257 
  258         static partial void StaticConstructorImplementation();
  259 
  260     }
  261 }
  262 #endregion