private static void CreateNumericPoints(NumberingCache nc, int count) { var np1 = nc.Elements<NumericPoint>().ElementAt(0); for (int i = 0; i < count; i++) { var npref = nc.Elements<NumericPoint>().ElementAt(i); var np = (NumericPoint)np1.Clone(); np.Index = (UInt32)i + 1; nc.InsertAfter(np, npref); } }
private static void CreateNumericPoints(NumberingCache nc, int count,bool deleteClone) { Repository.Utility.WriteLog("CreateNumericPoints started", System.Diagnostics.EventLogEntryType.Information); var np1 = nc.Elements<NumericPoint>().ElementAt(0); for (int i = nc.Elements<NumericPoint>().Count() - 1; i > 0; i--) { nc.Elements<NumericPoint>().ElementAt(i).Remove(); } for (int i = 0; i < count; i++) { var npref = nc.Elements<NumericPoint>().ElementAt(i); var np = (NumericPoint)np1.Clone(); np.Index = (UInt32)i + 1; nc.InsertAfter(np, npref); } np1.Remove(); Repository.Utility.WriteLog("CreateNumericPoints completed successfully", System.Diagnostics.EventLogEntryType.Information); }