示例#1
0
 public PageCoordinates(PageSide side, Vector2 pageCoords)
 {
     this.side   = side;
     this.coords = pageCoords;
 }
示例#2
0
        public static void GenerateRow(PageSide pageSide, Employee employee, ref Row row)
        {
            int    cellInt         = -1;
            string concatenatedStr = string.Empty;

            switch (pageSide)
            {
            case PageSide.LeftSide:
                cellInt = 0;
                break;

            case PageSide.RightSide:
                cellInt = 2;
                break;

            default:
                Console.WriteLine("Invalid Page Side provided: " + pageSide.ToString());
                break;
            }

            if (!string.IsNullOrWhiteSpace(employee.PhoneNumber))
            {
                row.Cells[cellInt].AddParagraph(employee.PhoneNumber);
            }
            cellInt++;
            if (!string.IsNullOrWhiteSpace(employee.Name))
            {
                row.Cells[cellInt].AddParagraph(employee.Name);
            }
            if (!string.IsNullOrWhiteSpace(employee.Title))
            {
                row.Cells[cellInt].AddParagraph("Title: " + employee.Title);
            }
            if (!string.IsNullOrWhiteSpace(employee.Department))
            {
                row.Cells[cellInt].AddParagraph("Dept: " + employee.Department);
            }
            if (!string.IsNullOrWhiteSpace(employee.Building))
            {
                concatenatedStr = "Bldg: " + employee.Building;
            }
            //row.Cells[cellInt].AddParagraph("Bldg: " + employee.Building);
            if (!string.IsNullOrWhiteSpace(employee.Building) && !string.IsNullOrWhiteSpace(employee.Office))
            {
                concatenatedStr += " Office/Room: " + employee.Office;
            }
            //row.Cells[cellInt].AddParagraph("Office: " + employee.Office);
            if (!string.IsNullOrEmpty(concatenatedStr))
            {
                row.Cells[cellInt].AddParagraph(concatenatedStr);
            }
            if (!string.IsNullOrWhiteSpace(employee.EmailAddress))
            {
                row.Cells[cellInt].AddParagraph("Email: " + employee.EmailAddress);
            }
            if (!string.IsNullOrWhiteSpace(employee.FaxNumber))
            {
                row.Cells[cellInt].AddParagraph("Fax: " + employee.FaxNumber);
            }
            row.Cells[cellInt].AddParagraph("");
        }