Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ protected override void EndProcessing()
if (newSubscriber != null)
{
DebugHelper.WriteLog("RegisterCimIndicationCommand::EndProcessing subscribe to Unsubscribed event", 4);
newSubscriber.Unsubscribed += new PSEventUnsubscribedEventHandler(newSubscriber_Unsubscribed);
newSubscriber.Unsubscribed += newSubscriber_Unsubscribed;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ internal HelpViewModel(PSObject psObj, Paragraph documentParagraph)
this.helpBuilder = new HelpParagraphBuilder(documentParagraph, psObj);
this.helpBuilder.BuildParagraph();
this.searcher = new ParagraphSearcher();
this.helpBuilder.PropertyChanged += new PropertyChangedEventHandler(this.HelpBuilder_PropertyChanged);
this.helpBuilder.PropertyChanged += this.HelpBuilder_PropertyChanged;
this.helpTitle = string.Format(
CultureInfo.CurrentCulture,
HelpWindowResources.HelpTitleFormat,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public HelpWindow(PSObject helpObject)

this.ReadZoomUserSetting();

this.viewModel.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.ViewModel_PropertyChanged);
this.viewModel.PropertyChanged += this.ViewModel_PropertyChanged;
this.DataContext = this.viewModel;

this.Loaded += new RoutedEventHandler(this.HelpDialog_Loaded);
this.Closed += new System.EventHandler(this.HelpDialog_Closed);
this.Loaded += this.HelpDialog_Loaded;
this.Closed += this.HelpDialog_Closed;
}

/// <summary>
Expand Down Expand Up @@ -222,9 +222,9 @@ private void HelpDialog_StateChanged(object sender, System.EventArgs e)
/// <param name="e">Event arguments.</param>
private void HelpDialog_Loaded(object sender, RoutedEventArgs e)
{
this.StateChanged += new System.EventHandler(this.HelpDialog_StateChanged);
this.LocationChanged += new System.EventHandler(this.HelpDialog_LocationChanged);
this.SizeChanged += new SizeChangedEventHandler(this.HelpDialog_SizeChanged);
this.StateChanged += this.HelpDialog_StateChanged;
this.LocationChanged += this.HelpDialog_LocationChanged;
this.SizeChanged += this.HelpDialog_SizeChanged;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void Select()
{
if (!this.IsLoaded)
{
this.Loaded += new RoutedEventHandler(this.ListOrganizerItem_Loaded_SelectItem);
this.Loaded += this.ListOrganizerItem_Loaded_SelectItem;
this.ApplyTemplate();
return;
}
Expand Down Expand Up @@ -189,7 +189,7 @@ private void UpdateTextContentBindings()
{
if (!this.IsLoaded)
{
this.Loaded += new RoutedEventHandler(this.ListOrganizerItem_Loaded_UpdateTextContentBindings);
this.Loaded += this.ListOrganizerItem_Loaded_UpdateTextContentBindings;
this.ApplyTemplate();
return;
}
Expand Down Expand Up @@ -230,13 +230,13 @@ partial void PostOnApplyTemplate()
private void AttachToVisualTree()
{
this.editBox.IsVisibleChanged += new DependencyPropertyChangedEventHandler(this.EditBox_IsVisibleChanged);
this.editBox.KeyDown += new KeyEventHandler(this.EditBox_KeyDown);
this.editBox.LostFocus += new RoutedEventHandler(this.EditBox_LostFocus);
this.editBox.KeyDown += this.EditBox_KeyDown;
this.editBox.LostFocus += this.EditBox_LostFocus;

this.templatedParent = this.TemplatedParent as FrameworkElement;
if (this.templatedParent != null)
{
this.templatedParent.KeyDown += new KeyEventHandler(this.TemplatedParent_OnKeyDown);
this.templatedParent.KeyDown += this.TemplatedParent_OnKeyDown;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private void ApplyDropDownButtonTemplate()
if (!this.IsLoaded)
{
this.ApplyTemplate();
this.Loaded += new RoutedEventHandler(this.PickerBase_Loaded_ApplyDropDownButtonTemplate);
this.Loaded += this.PickerBase_Loaded_ApplyDropDownButtonTemplate;
return;
}

Expand Down Expand Up @@ -76,7 +76,7 @@ private void FocusDropDown()
{
if (!this.dropDown.IsLoaded)
{
this.dropDown.Loaded += new RoutedEventHandler(this.DropDown_Loaded_FocusDropDown);
this.dropDown.Loaded += this.DropDown_Loaded_FocusDropDown;
}

if (this.dropDown.Child != null && !this.dropDown.IsAncestorOf((DependencyObject)Keyboard.FocusedElement))
Expand Down Expand Up @@ -116,8 +116,8 @@ partial void PreOnApplyTemplate()

private void AttachToVisualTree()
{
this.dropDown.Opened += new EventHandler(this.DropDown_Opened);
this.dropDown.Closed += new EventHandler(this.DropDown_Closed);
this.dropDown.Opened += this.DropDown_Opened;
this.dropDown.Closed += this.DropDown_Closed;
}

private void DetachFromVisualTree()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public ReadOnlyObservableAsyncCollection(IList<T> list)
{
this.asyncProgress = list as IAsyncProgress;

((INotifyCollectionChanged)this.Items).CollectionChanged += new NotifyCollectionChangedEventHandler(this.HandleCollectionChanged);
((INotifyPropertyChanged)this.Items).PropertyChanged += new PropertyChangedEventHandler(this.HandlePropertyChanged);
((INotifyCollectionChanged)this.Items).CollectionChanged += this.HandleCollectionChanged;
((INotifyPropertyChanged)this.Items).PropertyChanged += this.HandlePropertyChanged;
}
#endregion Constructors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static bool RetryActionAfterLoaded<T>(FrameworkElement element, RetryActi

data.Enqueue(callback, parameter);

element.Loaded += new RoutedEventHandler(Element_Loaded);
element.Loaded += Element_Loaded;
element.ApplyTemplate();

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void AddFilterExpressionProvider(IFilterExpressionProvider provider)
}

this.filterExpressionProviders.Add(provider);
provider.FilterExpressionChanged += new EventHandler(this.FilterProvider_FilterExpressionChanged);
provider.FilterExpressionChanged += this.FilterProvider_FilterExpressionChanged;
}

/// <summary>
Expand All @@ -168,7 +168,7 @@ public void RemoveFilterExpressionProvider(IFilterExpressionProvider provider)
}

this.filterExpressionProviders.Remove(provider);
provider.FilterExpressionChanged -= new EventHandler(this.FilterProvider_FilterExpressionChanged);
provider.FilterExpressionChanged -= this.FilterProvider_FilterExpressionChanged;
}

#region NotifyPropertyChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public IsBetweenFilterRule()
this.DisplayName = UICultureResources.FilterRule_IsBetween;

this.StartValue = new ValidatingValue<T>();
this.StartValue.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.StartValue.PropertyChanged += this.Value_PropertyChanged;

this.EndValue = new ValidatingValue<T>();
this.EndValue.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.EndValue.PropertyChanged += this.Value_PropertyChanged;
}

#endregion Ctor
Expand Down Expand Up @@ -111,8 +111,8 @@ private void Value_PropertyChanged(object sender, PropertyChangedEventArgs e)
[OnDeserialized]
private void Initialize(StreamingContext context)
{
this.StartValue.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.EndValue.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.StartValue.PropertyChanged += this.Value_PropertyChanged;
this.EndValue.PropertyChanged += this.Value_PropertyChanged;
}

#endregion Value Change Handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class PropertiesTextContainsFilterRule : TextFilterRule
public PropertiesTextContainsFilterRule()
{
this.PropertyNames = new List<string>();
this.EvaluationResultInvalidated += new EventHandler(this.PropertiesTextContainsFilterRule_EvaluationResultInvalidated);
this.EvaluationResultInvalidated += this.PropertiesTextContainsFilterRule_EvaluationResultInvalidated;
}

/// <summary>
Expand Down Expand Up @@ -124,7 +124,7 @@ private void PropertiesTextContainsFilterRule_EvaluationResultInvalidated(object
[OnDeserialized]
private void Initialize(StreamingContext context)
{
this.EvaluationResultInvalidated += new EventHandler(this.PropertiesTextContainsFilterRule_EvaluationResultInvalidated);
this.EvaluationResultInvalidated += this.PropertiesTextContainsFilterRule_EvaluationResultInvalidated;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ValidatingSelectorValue<FilterRule> AvailableRules
public SelectorFilterRule()
{
this.AvailableRules = new ValidatingSelectorValue<FilterRule>();
this.AvailableRules.SelectedValueChanged += new EventHandler<PropertyChangedEventArgs<FilterRule>>(this.AvailableRules_SelectedValueChanged);
this.AvailableRules.SelectedValueChanged += this.AvailableRules_SelectedValueChanged;
}

#endregion Ctor
Expand Down Expand Up @@ -86,8 +86,8 @@ protected void OnSelectedValueChanged(FilterRule oldValue, FilterRule newValue)
FilterRuleCustomizationFactory.FactoryInstance.TransferValues(oldValue, newValue);
FilterRuleCustomizationFactory.FactoryInstance.ClearValues(oldValue);

newValue.EvaluationResultInvalidated += new EventHandler(this.SelectedValue_EvaluationResultInvalidated);
oldValue.EvaluationResultInvalidated -= new EventHandler(this.SelectedValue_EvaluationResultInvalidated);
newValue.EvaluationResultInvalidated += this.SelectedValue_EvaluationResultInvalidated;
oldValue.EvaluationResultInvalidated -= this.SelectedValue_EvaluationResultInvalidated;

this.NotifyEvaluationResultInvalidated();
}
Expand All @@ -104,8 +104,8 @@ private void SelectedValue_EvaluationResultInvalidated(object sender, EventArgs
[OnDeserialized]
private void Initialize(StreamingContext context)
{
this.AvailableRules.SelectedValueChanged += new EventHandler<PropertyChangedEventArgs<FilterRule>>(this.AvailableRules_SelectedValueChanged);
this.AvailableRules.SelectedValue.EvaluationResultInvalidated += new EventHandler(this.SelectedValue_EvaluationResultInvalidated);
this.AvailableRules.SelectedValueChanged += this.AvailableRules_SelectedValueChanged;
this.AvailableRules.SelectedValue.EvaluationResultInvalidated += this.SelectedValue_EvaluationResultInvalidated;
}

private void AvailableRules_SelectedValueChanged(object sender, PropertyChangedEventArgs<FilterRule> e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public override bool IsValid
protected SingleValueComparableValueFilterRule()
{
this.Value = new ValidatingValue<T>();
this.Value.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.Value.PropertyChanged += this.Value_PropertyChanged;
}

#endregion Ctor
Expand All @@ -65,7 +65,7 @@ private void Value_PropertyChanged(object sender, PropertyChangedEventArgs e)
[OnDeserialized]
private void Initialize(StreamingContext context)
{
this.Value.PropertyChanged += new PropertyChangedEventHandler(this.Value_PropertyChanged);
this.Value.PropertyChanged += this.Value_PropertyChanged;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public FilterRulePanel()
{
this.InitializeTemplates();

this.Controller.FilterExpressionChanged += new EventHandler(this.Controller_FilterExpressionChanged);
this.Controller.FilterExpressionChanged += this.Controller_FilterExpressionChanged;
}

#endregion Ctor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void AddFilterRulePanelItem(FilterRulePanelItem item)
int insertionIndex = this.GetInsertionIndex(item);
this.filterRulePanelItems.Insert(insertionIndex, item);

item.Rule.EvaluationResultInvalidated += new EventHandler(this.Rule_EvaluationResultInvalidated);
item.Rule.EvaluationResultInvalidated += this.Rule_EvaluationResultInvalidated;

this.UpdateFilterRulePanelItemTypes();

Expand All @@ -121,7 +121,7 @@ public void RemoveFilterRulePanelItem(FilterRulePanelItem item)
throw new ArgumentNullException("item");
}

item.Rule.EvaluationResultInvalidated -= new EventHandler(this.Rule_EvaluationResultInvalidated);
item.Rule.EvaluationResultInvalidated -= this.Rule_EvaluationResultInvalidated;

this.filterRulePanelItems.Remove(item);
this.UpdateFilterRulePanelItemTypes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ internal InnerListGridView(ObservableCollection<InnerListColumn> availableColumn
this.AvailableColumns = availableColumns;
this.AvailableColumns_CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, availableColumns));

availableColumns.CollectionChanged += new NotifyCollectionChangedEventHandler(this.AvailableColumns_CollectionChanged);
this.Columns.CollectionChanged += new NotifyCollectionChangedEventHandler(this.Columns_CollectionChanged);
availableColumns.CollectionChanged += this.AvailableColumns_CollectionChanged;
this.Columns.CollectionChanged += this.Columns_CollectionChanged;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ internal void SetColumnHeaderActions()
if (header != null)
{
// header Click
header.Click += new RoutedEventHandler(this.Header_Click);
header.PreviewKeyDown += new KeyEventHandler(this.Header_KeyDown);
header.Click += this.Header_Click;
header.PreviewKeyDown += this.Header_KeyDown;
}

// If it is a GridViewColumnHeader we will not have the same nice sorting and grouping
Expand Down Expand Up @@ -695,7 +695,7 @@ private bool SetColumnPickerContextMenuItem()
MenuItem columnPicker = new MenuItem();
AutomationProperties.SetAutomationId(columnPicker, "ChooseColumns");
columnPicker.Header = UICultureResources.ColumnPicker;
columnPicker.Click += new RoutedEventHandler(this.innerGrid.OnColumnPicker);
columnPicker.Click += this.innerGrid.OnColumnPicker;

this.contextMenu.Items.Add(columnPicker);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ partial void OnEvaluatorChangedImplementation(PropertyChangedEventArgs<ItemsCont
{
e.OldValue.RemoveFilterExpressionProvider(this.SearchBox);
e.OldValue.RemoveFilterExpressionProvider(this.FilterRulePanel);
e.OldValue.FilterExpressionChanged -= new EventHandler(this.Evaluator_FilterExpressionChanged);
e.NewValue.PropertyChanged -= new PropertyChangedEventHandler(this.Evaluator_PropertyChanged);
e.OldValue.FilterExpressionChanged -= this.Evaluator_FilterExpressionChanged;
e.NewValue.PropertyChanged -= this.Evaluator_PropertyChanged;
}

// Register the new evaluator \\
e.NewValue.FilterTarget = this.List;
e.NewValue.AddFilterExpressionProvider(this.SearchBox);
e.NewValue.AddFilterExpressionProvider(this.FilterRulePanel);
e.NewValue.FilterExpressionChanged += new EventHandler(this.Evaluator_FilterExpressionChanged);
e.NewValue.PropertyChanged += new PropertyChangedEventHandler(this.Evaluator_PropertyChanged);
e.NewValue.FilterExpressionChanged += this.Evaluator_FilterExpressionChanged;
e.NewValue.PropertyChanged += this.Evaluator_PropertyChanged;
}

private void Evaluator_PropertyChanged(object sender, PropertyChangedEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public partial class CmdletControl : UserControl
public CmdletControl()
{
InitializeComponent();
this.NotImportedControl.ImportModuleButton.Click += new RoutedEventHandler(ImportModuleButton_Click);
this.NotImportedControl.ImportModuleButton.Click += ImportModuleButton_Click;
this.ParameterSetTabControl.DataContextChanged += new DependencyPropertyChangedEventHandler(this.ParameterSetTabControl_DataContextChanged);
this.KeyDown += new System.Windows.Input.KeyEventHandler(this.CmdletControl_KeyDown);
this.helpButton.innerButton.Click += new RoutedEventHandler(this.HelpButton_Click);
this.KeyDown += this.CmdletControl_KeyDown;
this.helpButton.innerButton.Click += this.HelpButton_Click;
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public partial class ImageButton : ImageButtonBase
public ImageButton()
{
InitializeComponent();
this.Loaded += new System.Windows.RoutedEventHandler(this.ImageButton_Loaded);
this.Loaded += this.ImageButton_Loaded;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class ImageToggleButton : ImageButtonBase
public ImageToggleButton()
{
InitializeComponent();
this.Loaded += new System.Windows.RoutedEventHandler(this.ImageButton_Loaded);
this.Loaded += this.ImageButton_Loaded;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private static TextBox CreateTextBoxControl(ParameterViewModel parameterViewMode
textBox.AcceptsReturn = true;
textBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
textBox.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
textBox.Loaded += new RoutedEventHandler(ParameterSetControl.MultiLineTextBox_Loaded);
textBox.Loaded += ParameterSetControl.MultiLineTextBox_Loaded;
}

return textBox;
Expand All @@ -238,7 +238,7 @@ private static TextBox CreateTextBoxControl(ParameterViewModel parameterViewMode
private static void MultiLineTextBox_Loaded(object sender, RoutedEventArgs e)
{
TextBox senderTextBox = (TextBox)sender;
senderTextBox.Loaded -= new RoutedEventHandler(ParameterSetControl.MultiLineTextBox_Loaded);
senderTextBox.Loaded -= ParameterSetControl.MultiLineTextBox_Loaded;

// This will set the height to about 3 lines since the total height of the
// TextBox is a bit greater than a line's height
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public ShowModuleControl()
InitializeComponent();

// See comment in method summary to understand why this event is handled
this.CommandList.PreviewMouseMove += new MouseEventHandler(this.CommandList_PreviewMouseMove);
this.CommandList.PreviewMouseMove += this.CommandList_PreviewMouseMove;

// See comment in method summary to understand why this event is handled
this.CommandList.SelectionChanged += new SelectionChangedEventHandler(this.CommandList_SelectionChanged);
this.CommandList.SelectionChanged += this.CommandList_SelectionChanged;
}

/// <summary>
Expand Down
Loading