void _userControlEvent_OnAfterEdit(object sender, CollectionEditEventArgs e) { FormHostingContainer.Instance.ActiveHosting.MakeDirty(); SEUndoUnitEventEdit undoUnit = new SEUndoUnitEventEdit(e); undoUnit.Action = new Action <SEUndoUnitAbstract, SEUndoEngine.Type>( delegate(SEUndoUnitAbstract unit, SEUndoEngine.Type type) { EventBase even = undoUnit.Value as EventBase; if (even == null) { if (undoUnit.Values.Count > 0) { even = undoUnit.Values[0] as EventBase; } } if (even != null) { IEventSupport eventSupport = (IEventSupport)even.HostEntity; eventSupport.EventUpdate(this); } } ); FormHostingContainer.Instance.ActiveHosting.UndoEngine.AddUndoUnit(undoUnit); }
private void EventUpdate() { IEventSupport eventSupport = this.HostEntity as IEventSupport; if (eventSupport != null) { eventSupport.EventUpdate(this); } }