/// <summary> /// Instantiates a <c><see cref="Restorable"/></c> array of rows when /// user changes state. /// </summary> /// <param name="rows">quantity of rows in the Row-array</param> /// <param name="type"><c><see cref="UrType.rt_ArrayDelete">UrType.rt_ArrayDelete</see></c> /// for row(s) to be deleted or /// <c><see cref="UrType.rt_ArrayInsert">UrType.rt_ArrayInsert</see></c> /// for row(s) to be inserted</param> /// <returns></returns> internal static Restorable createArray(int rows, UrType type) { Restorable it; it.RestoreType = type; it.cell = null; // not used it.pretext = // not used it.postext = null; // not used it.r = // not used it.rPre = // not used it.rPos = null; // not used it.array = new Row[rows]; // is used by current action it.isSaved = IsSavedType.is_None; return(it); }
/// <summary> /// Instantiates a <c><see cref="Restorable"/></c> row when user changes /// state - ie inserts or deletes a row. /// </summary> /// <param name="row">a table <c><see cref="Row"/></c> object</param> /// <param name="type"><c><see cref="UrType.rt_Delete">UrType.rt_Delete</see></c> /// for a row to be deleted or /// <c><see cref="UrType.rt_Insert">UrType.rt_Insert</see></c> for a row /// to be inserted</param> /// <returns></returns> internal static Restorable createRow(ICloneable row, UrType type) { Restorable it; it.RestoreType = type; it.cell = null; // not used it.pretext = // not used it.postext = null; // not used it.r = row.Clone() as Row; // is used by current action it.rPre = // not used it.rPos = null; // not used it.array = null; // not used it.isSaved = IsSavedType.is_None; return(it); }