private void root_ChildRemoved(object sender, ChildEventArgs e) { if (m_lastRemoveIndex >= 0) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(m_lastRemoveIndex, e.Child, e.Parent)); } }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { if (IsPrototypeItem(e.Child, e.Parent)) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, e.Child, e.Parent)); } }
private void root_ChildRemoved(object sender, ChildEventArgs e) { if (m_lastRemoveIndex >= 0) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(m_lastRemoveIndex, e.Child, e.Parent)); m_root.As <SceneDocument>().Dirty = true; } }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { Character character = e.Child.As <Character>(); if (character != null) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, character)); } }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { Event _event = e.Child.As <Event>(); if (_event != null) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, _event)); } }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { Resource resource = e.Child.As <Resource>(); if (resource != null) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, resource)); } }
/// <summary> /// Performs initialization when the adapter's node is set. /// Subscribes to events for DomNode tree changes and raises Reloaded event.</summary> protected override void OnNodeSet() { DomNode.AttributeChanged += (sender, e) => ItemChanged.Raise(this, new ItemChangedEventArgs <object>(e.DomNode)); DomNode.ChildInserted += (sender, e) => ItemInserted.Raise(this, new ItemInsertedEventArgs <object>(e.Index, e.Child, e.Parent)); DomNode.ChildRemoved += (sender, e) => ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, e.Child, e.Parent)); Reloaded.Raise(this, EventArgs.Empty); base.OnNodeSet(); }
private void DomNodeChildRemoving(object sender, ChildEventArgs e) { if (!e.Child.Is <SledLuaStateType>()) { return; } ItemRemoved.Raise( this, new ItemRemovedEventArgs <object>(e.Index, e.Child.As <SledLuaStateType>())); }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { if (!IsHandledType(e.Child)) { return; } ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(-1, e.Child, e.Parent)); if (!IsMasterContext) { MasterContext.DomNode_ChildRemoved(sender, e); } }
private void RemoveItem(KeyValue item) { if (item == null) { return; } // if (item.Parent != null) // item.Parent.Children.Remove(item); // else // m_data.Remove(item); ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(-1, item)); }
protected virtual void OnDomNodeChildRemoving(object sender, ChildEventArgs e) { if (!e.Child.Is <T>()) { return; } ItemRemoved.Raise( this, new ItemRemovedEventArgs <object>( e.Index, e.Child.As <T>(), e.Parent.As <T>())); }
public void RemoveItem(object item) { // not very efficient, but hopefully not a common occurrence foreach (KeyValuePair <string, List <object> > pair in m_categories) { int index = pair.Value.IndexOf(item); if (index >= 0) { pair.Value.RemoveAt(index); ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(index, item, pair.Key)); break; } } }
/// <summary> /// Removes an item from the DArray without tracking the free indices. /// </summary> /// <param name="index">The zero-based index of the item to remove.</param> void RemoveAtUntracked(int index) { var item = _buffer[index]; _buffer[index] = default(T); _isIndexUsed[index] = false; // Notify listeners OnItemRemoved(item, index); if (ItemRemoved != null) { ItemRemoved.Raise(this, new DArrayEventArgs <T>(item, index)); } }
private void RemoveItem(DataItem item) { if (item == null) { return; } if (item.Parent != null) { item.Parent.Children.Remove(item); } else { m_data.Remove(item); } ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(-1, item)); }
private void DomNode_ChildRemoved(object sender, ChildEventArgs e) { RemoveNode(e.Child); if (IsCircuitItem(e.Child, e.Parent)) { if (e.Child.Is <Wire>()) { var connection = e.Child.Cast <Wire>(); if (connection.InputElement.Is <Group>()) { connection.InputElement.Cast <Group>().Dirty = true; } if (connection.OutputElement.Is <Group>()) { connection.OutputElement.Cast <Group>().Dirty = true; } } ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, e.Child, e.Parent)); var circuitValidator = DomNode.GetRoot().As <CircuitValidator>(); if (circuitValidator != null) { var transactionContext = circuitValidator.ActiveHistoryContext; if (transactionContext != null && transactionContext != this) { if (transactionContext.DomNode.Ancestry.FirstOrDefault(x => x == e.Parent) != null) { if (transactionContext.InTransaction) { transactionContext.AddOperation(new ChildRemovedOperation(e)); #if DEBUG_VERBOSE var parent = transactionContext.DomNode.Ancestry.FirstOrDefault(x => x == e.Parent); Trace.TraceInformation("PARENT GRAPH {0} -- Removed {1} from parent {2}", CircuitUtil.GetDomNodeName(parent), CircuitUtil.GetDomNodeName(e.Child), CircuitUtil.GetDomNodeName(e.Parent)); #endif } } } } } }
private void root_ChildRemoved(object sender, ChildEventArgs e) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(-1, e.Child, e.Parent)); }
/// <summary> /// Raises the ItemRemoved event</summary> /// <param name="e">Event args</param> protected virtual void OnItemRemoved(ItemRemovedEventArgs <T> e) { ItemRemoved.Raise(this, e); }
/// <summary> /// Raises the ItemRemoved event and performs custom processing</summary> /// <param name="e">ItemRemovedEventArgs containing event data</param> protected virtual void OnObjectRemoved(ItemRemovedEventArgs <object> e) { ItemRemoved.Raise(this, e); }
void DomNode_ChildRemoved(object sender, ChildEventArgs e) { ItemRemoved.Raise(this, new ItemRemovedEventArgs <object>(e.Index, e.Child, e.Parent)); }