/// <summary/> protected virtual void Dispose(bool fDisposing) { System.Diagnostics.Debug.WriteLineIf(!fDisposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); if (fDisposing && !IsDisposed) { // dispose managed and unmanaged objects ExtraPropChangedAction.AddAndInvokeIfRedo(m_actionHandler, m_action.m_sda, m_action.m_hvo, m_action.m_tag, m_action.m_ihvo, m_action.m_chvoIns, m_action.m_chvoDel, true); } IsDisposed = true; }
internal int m_chvoDel; // On Do, Redo; #inserted on Undo. /// <summary> /// Make an instance and add it to the undo stack. Also, if it's the 'redo' action added after the /// actual changes (fForRedo is true), issue the propchanged at once to complete the original action. /// </summary> public static ExtraPropChangedAction AddAndInvokeIfRedo(IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel, bool fForRedo) { ExtraPropChangedAction action = new ExtraPropChangedAction(sda, hvo, tag, ihvo, chvoIns, chvoDel, fForRedo); actionHandler.AddAction(action); if (fForRedo) { action.Redo(); } return(action); }
/// <summary> /// Make one. /// </summary> public ExtraPropChangedInserter(IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int ihvo, int chvoIns, int chvoDel) { m_actionHandler = actionHandler; m_action = ExtraPropChangedAction.AddAndInvokeIfRedo(m_actionHandler, sda, hvo, tag, ihvo, chvoIns, chvoDel, false); }