// Token: 0x0600014F RID: 335 RVA: 0x0000A3A0 File Offset: 0x000085A0 public void Render(TextWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } SchedulingAreaVisualContainer schedulingAreaVisualContainer = base.ViewDays[0]; this.totalNumberOfColumns = this.GetTotalNumberOfColumns(schedulingAreaVisualContainer, this.conflictsPerTimeSlot); this.CalculateStartAndEndTimes(); this.ComputeDayFreeBusy(); writer.Write("<table cellpadding=0 cellspacing=0 class=\"cdayvw\"><caption>"); writer.Write(LocalizedStrings.GetHtmlEncoded(573876176)); writer.Write("</caption>"); string text = DateTimeUtilities.GetDaysFormat(this.UserContext.UserOptions.DateFormat); if (text == null) { text = "%d"; } ExDateTime exDateTime = schedulingAreaVisualContainer.DateRange.Start.IncrementDays(-1); ExDateTime exDateTime2 = schedulingAreaVisualContainer.DateRange.Start.IncrementDays(1); writer.Write("<tr><td rowspan=2 class=\"nv\" align=\"center\"><a href=\"#\" title=\""); writer.Write(LocalizedStrings.GetHtmlEncoded(790373277)); writer.Write("\" onClick=\"return onClkD({0},{1},{2});\"><img src=\"", exDateTime.Year, exDateTime.Month, exDateTime.Day); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.PreviousPage); writer.Write("\" alt=\""); writer.Write(LocalizedStrings.GetHtmlEncoded(790373277)); writer.Write("\"></a><a href=\"#\" title=\""); writer.Write(LocalizedStrings.GetHtmlEncoded(-943287977)); writer.Write("\" onClick=\"return onClkD({0},{1},{2});\"><img src=\"", exDateTime2.Year, exDateTime2.Month, exDateTime2.Day); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.NextPage); writer.Write("\" alt=\""); writer.Write(LocalizedStrings.GetHtmlEncoded(-943287977)); writer.Write("\"></a></td><td colspan="); writer.Write(this.totalNumberOfColumns); writer.Write(" class=\"cvhd"); ExDateTime localTime = DateTimeUtilities.GetLocalTime(); if (schedulingAreaVisualContainer.DateRange.Start.Year == localTime.Year && schedulingAreaVisualContainer.DateRange.Start.Month == localTime.Month && schedulingAreaVisualContainer.DateRange.Start.Day == localTime.Day) { writer.Write(" cd"); } writer.Write("\" align=\"center\"><span>"); writer.Write(Utilities.HtmlEncode(schedulingAreaVisualContainer.DateRange.Start.ToString(text))); writer.Write("</span>"); writer.Write(Utilities.HtmlEncode(schedulingAreaVisualContainer.DateRange.Start.ToString("dddd"))); writer.Write("</td></tr>"); string freeBusyStylePrefix = DailyView.GetFreeBusyStylePrefix(this.dayBusyType); writer.Write("<tr><td colspan={0} class=\"{1}e\">", this.totalNumberOfColumns, freeBusyStylePrefix); if (base.EventArea.Count > 0) { this.RenderEventArea(writer); } else { writer.Write(" "); } writer.Write("</td></tr>"); this.RenderSchedulingArea(writer, schedulingAreaVisualContainer); writer.Write("</table>"); }
// Token: 0x06000153 RID: 339 RVA: 0x0000AA30 File Offset: 0x00008C30 private void RenderSchedulingArea(TextWriter writer, SchedulingAreaVisualContainer day) { int[,] array = this.MapSchedulingAreaData(day, this.totalNumberOfColumns); string text = DateTimeUtilities.GetHoursFormat(this.UserContext.UserOptions.TimeFormat); string arg = "00"; if (text == null) { text = "%h"; } int num = this.renderDayStartTime / 30; int num2 = this.renderDayEndTime / 30; int num3 = this.userDayStartTime / 30; int num4 = this.userDayEndTime / 30; ICalendarDataSource dataSource = base.CalendarAdapter.DataSource; ExDateTime exDateTime = new ExDateTime(this.UserContext.TimeZone, 2000, 1, 1, num / 2, 0, 0); for (int i = num; i < num2; i++) { writer.Write("<tr><td class=\""); if (i == num) { writer.Write("frst "); } if (i % 2 == 0) { if (text[1] == 'h') { if (exDateTime.Hour >= 0 && exDateTime.Hour < 12) { arg = Utilities.HtmlEncode(Culture.AMDesignator); } else if (exDateTime.Hour >= 12) { arg = Utilities.HtmlEncode(Culture.PMDesignator); } } writer.Write("tm\" align=\"right\">{0} <span>{1}</span>", exDateTime.ToString(text), arg); exDateTime = exDateTime.AddHours(1.0); } else { writer.Write("tme\"> "); } writer.Write("</td>"); for (int j = 0; j < this.totalNumberOfColumns; j++) { if (array[i, j] >= 0 && array[i, j] >= 0) { int num5 = j + 1; int num6 = 1; while (num5 < this.totalNumberOfColumns && array[i, num5] == array[i, j]) { array[i, num5] = -1; num5++; } int num7 = num5 - j; if (array[i, j] != 0) { num6 = 1; int num8 = i + 1; while (num8 < num2 && array[num8, j] == array[i, j]) { num6++; for (int k = 0; k < num7; k++) { array[num8, j + k] = -1; } num8++; } } string freeBusyStylePrefix = DailyView.GetFreeBusyStylePrefix(base.RowFreeBusy[0][i]); writer.Write("<td class=\""); if (array[i, j] == 0) { writer.Write(freeBusyStylePrefix); if (i % 2 == 0) { writer.Write("d "); } else { writer.Write("l "); } writer.Write(freeBusyStylePrefix); if (num3 <= num4 && i >= num3 && i < num4) { writer.Write("w"); } else if (num3 > num4 && (i >= num3 || i < num4)) { writer.Write("w"); } else { writer.Write("n"); } } else if (array[i, j] > 0) { writer.Write("v"); int index = array[i, j] - 1; ExDateTime startTime = dataSource.GetStartTime(index); ExDateTime endTime = dataSource.GetEndTime(index); if (startTime.Date < day.DateRange.Start.Date) { writer.Write(" ntp"); } else if (endTime.Date > day.DateRange.Start.Date) { writer.Write(" nbtm"); } } writer.Write("\""); if (num6 > 1) { writer.Write(" rowspan={0}", num6); } if (num7 > 1) { writer.Write(" colspan={0}", num7); } if (num7 < this.totalNumberOfColumns) { writer.Write(" width=\"{0:f}%\"", num7 * 100 / this.totalNumberOfColumns); } if (array[i, j] > 0) { writer.Write(" nowrap"); } writer.Write(">"); if (array[i, j] == 0) { writer.Write(" </td>"); } else if (array[i, j] > 0) { int index2 = array[i, j] - 1; ExDateTime startTime2 = dataSource.GetStartTime(index2); ExDateTime endTime2 = dataSource.GetEndTime(index2); string subject = dataSource.GetSubject(index2); string location = dataSource.GetLocation(index2); OwaStoreObjectId itemId = dataSource.GetItemId(index2); bool isPrivate = dataSource.IsPrivate(index2); CalendarItemTypeWrapper wrappedItemType = dataSource.GetWrappedItemType(index2); bool flag = dataSource.IsMeeting(index2); string text2 = string.Empty; if (flag) { text2 = dataSource.GetOrganizerDisplayName(index2); } bool hasAttachment = dataSource.HasAttachment(index2); int num9 = 64; int num10 = 3; this.ComputeMaxCharactersAndIcons(num6, num7, out num9, out num10); writer.Write("<table cellspacing=0 cellpadding=0 class=\"vis\"><tr>"); BusyTypeWrapper wrappedBusyType = dataSource.GetWrappedBusyType(index2); if (wrappedBusyType != BusyTypeWrapper.Busy) { writer.Write("<td class=\""); switch (wrappedBusyType) { case BusyTypeWrapper.Free: writer.Write("f\"><img src=\""); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Clear); writer.Write("\" alt=\"\"></td>"); break; case BusyTypeWrapper.Tentative: writer.Write("t\"></td>"); break; case BusyTypeWrapper.OOF: writer.Write("o\"></td>"); break; case BusyTypeWrapper.Unknown: writer.Write("u\"></td>"); break; } } writer.Write("<td class=\"txt\">"); switch (num6) { case 1: this.RenderSubject(writer, subject, num9, startTime2, endTime2, location, false, flag, itemId); if (!string.IsNullOrEmpty(subject)) { num9 -= subject.Length; } else if (flag) { num9 -= LocalizedStrings.GetNonEncoded(-1500721828).Length; } else { num9 -= LocalizedStrings.GetNonEncoded(-1178892512).Length; } if (!string.IsNullOrEmpty(location) && (location.Length + 2 <= num9 || num9 >= 5)) { writer.Write("; "); Utilities.CropAndRenderText(writer, location, num9 - 2); } break; case 2: this.RenderSubject(writer, subject, num9, startTime2, endTime2, location, false, flag, itemId); if (!string.IsNullOrEmpty(location)) { writer.Write("<br>"); Utilities.CropAndRenderText(writer, location, num9); num9 -= location.Length; } if (!string.IsNullOrEmpty(text2) && flag && num9 > 3) { writer.Write("; "); Utilities.CropAndRenderText(writer, text2, num9); } break; default: this.RenderSubject(writer, subject, num9, startTime2, endTime2, location, false, flag, itemId); if (!string.IsNullOrEmpty(location)) { writer.Write("<br>"); Utilities.CropAndRenderText(writer, location, num9); } if (!string.IsNullOrEmpty(text2) && flag) { writer.Write("<br>"); Utilities.CropAndRenderText(writer, text2, num9); } break; } writer.Write("</td>"); if (num10 > 0) { writer.Write("<td class=\"icn\" align=\"right\">"); this.RenderIcons(writer, num10, isPrivate, wrappedItemType, hasAttachment); writer.Write("</td>"); } writer.Write("</tr></table></td>"); } } } writer.Write("</tr>"); } int num11 = base.RowFreeBusy[0].Length - 1; string freeBusyStylePrefix2 = DailyView.GetFreeBusyStylePrefix(base.RowFreeBusy[0][num11]); writer.Write("<tr><td class=\"tm\"><img src=\""); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Clear); writer.Write("\" alt=\"\"></td><td colspan=\"{0}\" class=\"{1}d {1}n\"><img src=\"", this.totalNumberOfColumns, freeBusyStylePrefix2); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Clear); writer.Write("\" alt=\"\"></td></tr>"); writer.Write("<tr><td class=\"tme h100\"><img src=\""); this.UserContext.RenderThemeFileUrl(writer, ThemeFileId.Clear); writer.Write("\" alt=\"\"></td><td colspan=\"{0}\" class=\"{1}n\"></td></tr>", this.totalNumberOfColumns, freeBusyStylePrefix2); }