本文整理汇总了C#中System.ComponentModel.CollectionChangeEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CollectionChangeEventArgs类的具体用法?C# CollectionChangeEventArgs怎么用?C# CollectionChangeEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CollectionChangeEventArgs类属于System.ComponentModel命名空间,在下文中一共展示了CollectionChangeEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Remove
protected internal void Remove(Binding binding)
{
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Remove, binding);
this.OnCollectionChanging(e);
this.RemoveCore(binding);
this.OnCollectionChanged(e);
}
示例2: OnCollectionChanged
protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent)
{
if (this.onCollectionChanged != null)
{
this.onCollectionChanged(this, ccevent);
}
}
示例3: OnCollectionChanging
protected virtual void OnCollectionChanging(CollectionChangeEventArgs e)
{
if (this.onCollectionChanging != null)
{
this.onCollectionChanging(this, e);
}
}
示例4: Add
protected internal void Add(Binding binding)
{
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, binding);
this.OnCollectionChanging(e);
this.AddCore(binding);
this.OnCollectionChanged(e);
}
示例5: Clear
protected internal void Clear()
{
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null);
this.OnCollectionChanging(e);
this.ClearCore();
this.OnCollectionChanged(e);
}
示例6: ClearCore
protected virtual void ClearCore()
{
CollectionChangeEventArgs args = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null);
OnCollectionChanging (args);
base.List.Clear();
OnCollectionChanged (args);
}
示例7: OnCollectionChanged
protected void OnCollectionChanged(CollectionChangeEventArgs e)
{
if (this.onCollectionChanged != null)
{
this.onCollectionChanged(this, e);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:AutoCompleteStringCollection.cs
示例8: DataBindingsCollectionChanged
private void DataBindingsCollectionChanged(object sender, CollectionChangeEventArgs e)
{
System.Windows.Forms.Control component = base.Component as System.Windows.Forms.Control;
if (component != null)
{
if ((component.DataBindings.Count == 0) && this.removalNotificationHooked)
{
IComponentChangeService service = (IComponentChangeService) this.GetService(typeof(IComponentChangeService));
if (service != null)
{
service.ComponentRemoved -= new ComponentEventHandler(this.DataSource_ComponentRemoved);
}
this.removalNotificationHooked = false;
}
else if ((component.DataBindings.Count > 0) && !this.removalNotificationHooked)
{
IComponentChangeService service2 = (IComponentChangeService) this.GetService(typeof(IComponentChangeService));
if (service2 != null)
{
service2.ComponentRemoved += new ComponentEventHandler(this.DataSource_ComponentRemoved);
}
this.removalNotificationHooked = true;
}
}
}
示例9: OnCollectionChanged
protected void OnCollectionChanged (CollectionChangeEventArgs e)
{
if(CollectionChanged == null)
return;
CollectionChanged (this, e);
}
示例10: OnCollectionChanged
protected virtual void OnCollectionChanged(CollectionChangeEventArgs e)
{
if (onCollectionChanged != null)
{
onCollectionChanged(this, e);
}
}
示例11: ObjectStateManager_ObjectStateManagerChanged
private void ObjectStateManager_ObjectStateManagerChanged(Object sender, CollectionChangeEventArgs e) {
if(e.Action == CollectionChangeAction.Add) {
if(e.Element is Event) {
((Event)e.Element).objectContext = objectContext;
}
}
}
示例12: OnUIAGridCellChanged
private void OnUIAGridCellChanged (object sender, CollectionChangeEventArgs args)
{
SWF.DataGridCell cell = (SWF.DataGridCell) args.Element;
if (cell.ColumnNumber == editProvider.ItemProvider.GetColumnIndexOf (editProvider)
&& cell.RowNumber == editProvider.ItemProvider.Index)
RaiseAutomationPropertyChangedEvent ();
}
示例13: AddCore
protected virtual void AddCore (Binding dataBinding)
{
CollectionChangeEventArgs args = new CollectionChangeEventArgs (CollectionChangeAction.Add, dataBinding);
OnCollectionChanging (args);
base.List.Add(dataBinding);
OnCollectionChanged (args);
}
示例14: OnElementSelectedEvent
private void OnElementSelectedEvent (object sender, CollectionChangeEventArgs args)
{
ListItemProvider provider = (ListItemProvider) Provider;
if (provider.ListProvider.SelectedItemsCount == 1
&& provider.ListProvider.IsItemSelected (provider))
RaiseAutomationEvent ();
}
示例15: ColumnCollectionChanged
private void ColumnCollectionChanged(object sender, CollectionChangeEventArgs e) {
DataView dv = (DataView)_dvWeak.Target;
if (dv != null) {
dv.ColumnCollectionChangedInternal(sender, e);
}
else {
CleanUp(true);
}
}