private void writeHeader() { switch (headerType) { case HeaderType.Traditional: string newDate = string.Format("{0}{1}{2}", DateTime.Now.Year, DateTime.Now.Month.ToString("D2"), DateTime.Now.Day.ToString("D2")); sHelper.WriteBytes(ByteConverterExt.ToBytes(newDate, Encoding.Default)); sHelper.WriteString(string.Format("........RDB Written with Daedalus v{0} by iSmokeDrow.", System.Diagnostics.FileVersionInfo.GetVersionInfo("Daedalus.dll").FileVersion.Remove(0, 2)), 120); if (lua.SpecialCase) { switch (lua.Case) { case SpecialCase.DOUBLE_LOOP: int pVal = 0; int lCount = 0; for (int r = 0; r < RowCount; r++) { int cVal = (int)rows[r].GetValueByFlag(FlagType.LOOP_COUNTER); if (pVal != cVal) { pVal = cVal; lCount++; } } sHelper.WriteInt32(lCount); break; } } else { sHelper.WriteInt32(RowCount); } break; case HeaderType.Defined: writeRow(dHeader, SenderType.WRITE_HEADER); break; } }