public void Initialize(XlLocation insertAt) { // This did not initialize everything //RedContent = new CellFormatSpecification("RedContent"); RedContent = insertAt.CreateCellFormat("RedContent", insertAt.ContentLeftFormat); //XlLocation.InitializeFont(insertAt.ContentLeftFormat, RedContent); RedContent.Font.Color = Color.Red; RedContent.Font.Bold = true; WITContent = insertAt.CreateCellFormat("WITContent", insertAt.ContentLeftFormat); //XlLocation.InitializeFont(insertAt.ContentLeftFormat, WITContent); WITContent.Font.Color = Color.Green; WITContent.Font.Bold = true; DateLabel = insertAt.CreateCellFormat("DateLabel", insertAt.LabelRightFormat); //XlLocation.InitializeFont(insertAt.LabelRightFormat, DateLabel); DateLabel.Font.Color = Color.DarkOrange; DateContent = insertAt.CreateCellFormat("DateContent", insertAt.ContentLeftFormat); //XlLocation.InitializeFont(insertAt.ContentLeftFormat, DateContent); DateContent.Font.Color = Color.Orange; DateContent.Font.Bold = true; IsInitialized = true; }
internal static void Add_TP_WorkItemTypes(XlHlp.XlLocation insertAt) { long startTicks = Log.APPLICATION("Enter", Common.PROJECT_NAME); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "Team Project"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "Name"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "Count"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "FieldCount"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "LastCreateDate"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "LastChangedDate"); XlHlp.AddColumnHeaderToSheet(insertAt.AddOffsetColumn(), 20, "LastRevisedDate"); // TODO(crhodes) // Since we now can pass in a CellFormatSpecification, might be able to go back to just using insertAt.AddOffsetColumn insertAt.AddOffsetColumnX(); CellFormatSpecification lucidia7 = insertAt.CreateCellFormat("lucidia7", fontSize: 7); lucidia7.Font.Name = "Lucida Sans Typewriter"; XlHlp.AddColumnHeaderToSheetX(insertAt.workSheet, insertAt.RowCurrent, insertAt.ColumnOffset, 180, "Transitions", lucidia7); insertAt.IncrementRows(); Log.APPLICATION("Exit", Common.PROJECT_NAME, startTicks); }