private void FillPlayedGameHistory() { INIFile tableIni = new INIFile(Table.iniPath); Tournament tnmt = new Tournament(); tnmt.Getter(); Team calledTeam = new Team(); calledTeam.Getter(calledTeamId); /// <summary> /// <para> /// 0,1: [0/1, 0/1/2, 0/1] -> 1/2 RUN 1/2/3 GAME 1/2 TEAM-POINTS /// </para> /// <para> /// 2: [0/1, 0/1/2, 2] -> 1/2 RUN 1/2/3 GAME X GAME ID /// </para> /// <para> /// 3: [0/1, 0/1/2, 2] -> 1/2 RUN 1/2/3 GAME X TABLE /// </para> /// <para> /// 4: [0/1, 0/1/2, 3] -> 1/2 RUN 1/2/3 GAME X APPONEND TEAM ID /// </para> /// </summary> //int[,,] gameStandings = GetGameStandings(calledTeam.teamId, tnmt); gameData[,] gameData = GetGameData(calledTeam.teamId, tnmt); int gamePointsTotal = 0; int diffTotal = 0; int rowsPerRun = 2 + tnmt.tnmtGameProRunCnt; cnvs_playedGameHistory.MinHeight = tnmt.tnmtRunCnt * rowsPerRun * 28 + 200; tableLable = new Label[tnmt.tnmtRunCnt * tnmt.tnmtGameProRunCnt, 6]; int gameDataIdentifyer = -1; for (int i = 0; i < tnmt.tnmtRunCnt; i++) { for (int x = -3; x < tnmt.tnmtGameProRunCnt; x++) { Label lbl_runId = new Label(); Label lbl_gameId = new Label(); Label lbl_calledTeam = new Label(); Label lbl_colon = new Label(); Label lbl_oppondTeam = new Label(); Label lbl_diffCalledTeam = new Label(); lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryDefLabel"]; if (x >= 0) { if (gameData[i, x].tableId != NOT_PLAYED) { gameDataIdentifyer++; lbl_runId.Content = String.Empty; lbl_gameId.Content = Convert.ToString(gameData[i, x].gameId); lbl_gameId.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_calledTeam.Content = Convert.ToString(gameData[i, x].calledTeamPoints); lbl_calledTeam.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_colon.Content = ":"; lbl_colon.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_oppondTeam.Content = (gameData[i, x].oppondTeamPoints < 10 ? " " : "") + Convert.ToString(gameData[i, x].oppondTeamPoints); lbl_oppondTeam.HorizontalContentAlignment = HorizontalAlignment.Left; lbl_diffCalledTeam.Content = Convert.ToString(gameData[i, x].calledTeamPoints - gameData[i, x].oppondTeamPoints); lbl_diffCalledTeam.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_runId.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_gameId.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_calledTeam.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_colon.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_oppondTeam.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_diffCalledTeam.MouseEnter += new MouseEventHandler(MarkUpActRow); lbl_runId.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_gameId.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_calledTeam.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_colon.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_oppondTeam.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_diffCalledTeam.MouseLeave += new MouseEventHandler(MarkDownActRow); lbl_runId.Uid = Convert.ToString(gameDataIdentifyer); lbl_gameId.Uid = Convert.ToString(gameDataIdentifyer); lbl_calledTeam.Uid = Convert.ToString(gameDataIdentifyer); lbl_colon.Uid = Convert.ToString(gameDataIdentifyer); lbl_oppondTeam.Uid = Convert.ToString(gameDataIdentifyer); lbl_diffCalledTeam.Uid = Convert.ToString(gameDataIdentifyer); tableLable[gameDataIdentifyer, 0] = lbl_runId; tableLable[gameDataIdentifyer, 1] = lbl_gameId; tableLable[gameDataIdentifyer, 2] = lbl_calledTeam; tableLable[gameDataIdentifyer, 3] = lbl_colon; tableLable[gameDataIdentifyer, 4] = lbl_oppondTeam; tableLable[gameDataIdentifyer, 5] = lbl_diffCalledTeam; gamePointsTotal += gameData[i, x].calledTeamPoints; diffTotal += gameData[i, x].calledTeamPoints - gameData[i, x].oppondTeamPoints; } else { lbl_runId.Content = String.Empty; lbl_gameId.Content = "-"; lbl_gameId.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_calledTeam.Content = "0"; lbl_calledTeam.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_colon.Content = ":"; lbl_colon.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_oppondTeam.Content = " 0"; lbl_oppondTeam.HorizontalContentAlignment = HorizontalAlignment.Left; lbl_diffCalledTeam.Content = "0"; lbl_diffCalledTeam.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; } } else { if (x == -3) { lbl_runId.Content = Convert.ToString(gameData[i, 0].runId); lbl_runId.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_gameId.Content = String.Empty; lbl_calledTeam.Content = "Tisch " + (gameData[i, 0].tableId == NOT_PLAYED ? "X" : Convert.ToString(gameData[i, 0].tableId)); lbl_colon.Content = String.Empty; lbl_oppondTeam.Content = String.Empty; lbl_diffCalledTeam.Content = String.Empty; if (gameData[i, 0].tableId != NOT_PLAYED) { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel"]; } else { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryRunTableHeaderLabel_NOTPLAYED"]; } } else if (x == -2) { Team opponedTeam = new Team(); opponedTeam.Getter(gameData[i, 0].oppondTeamId); lbl_runId.Content = String.Empty; lbl_gameId.Content = String.Empty; lbl_calledTeam.Content = calledTeam.teamName; lbl_calledTeam.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_colon.Content = "gegen"; lbl_colon.HorizontalContentAlignment = HorizontalAlignment.Center; if (opponedTeam.teamName != null) { lbl_oppondTeam.Content = opponedTeam.teamName; lbl_oppondTeam.HorizontalContentAlignment = HorizontalAlignment.Center; } else { lbl_oppondTeam.Content = String.Empty; } lbl_diffCalledTeam.Content = String.Empty; if (gameData[i, 0].tableId != NOT_PLAYED) { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel"]; } else { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryTeamNamesLabel_NOTPLAYED"]; } } else { lbl_runId.Content = String.Empty; lbl_gameId.Content = String.Empty; lbl_calledTeam.Content = "Gewinn-Punkte: " + Convert.ToString(gameData[i, 0].winPointsTeamCalled); lbl_calledTeam.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_colon.Content = "zu"; lbl_colon.HorizontalContentAlignment = HorizontalAlignment.Center; lbl_oppondTeam.Content = Convert.ToString(gameData[i, 0].winPointsTeamOppond); lbl_diffCalledTeam.Content = String.Empty; if (gameData[i, 0].tableId != NOT_PLAYED) { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel"]; } else { lbl_runId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_gameId.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_calledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_colon.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_oppondTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; lbl_diffCalledTeam.Style = (Style)Application.Current.Resources["playedGameHistoryGameDataLabel_NOTPLAYED"]; } } } //Separator sep = new Separator(); stp_RunDATA.Children.Add(lbl_runId); //stp_RunDATA.Children.Add(sep); //sep = new Separator(); stp_GameNrDATA.Children.Add(lbl_gameId); //stp_GameNrDATA.Children.Add(sep); //sep = new Separator(); stp_CalledTeamNameDATA.Children.Add(lbl_calledTeam); //stp_CalledTeamNameDATA.Children.Add(sep); //sep = new Separator(); stp_ColonDATA.Children.Add(lbl_colon); //stp_ColonDATA.Children.Add(sep); //sep = new Separator(); stp_OppondTeamNameDATA.Children.Add(lbl_oppondTeam); //stp_OppondTeamNameDATA.Children.Add(sep); //sep = new Separator(); stp_DiffDATA.Children.Add(lbl_diffCalledTeam); //stp_DiffDATA.Children.Add(sep); } } lbl_oGamePointsTotal.Content = "Spiel-Punkte gesamt: " + (gamePointsTotal < 10 ? " " : " ") + Convert.ToString(gamePointsTotal); lbl_oGamePointsTotal.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_oWinPointsTotal.Content = "Gewinn-Punkte gesamt:" + (calledTeam.winPoints <10 && calledTeam.winPoints> -10 ? " " : " ") + Convert.ToString(calledTeam.winPoints); lbl_oWinPointsTotal.HorizontalContentAlignment = HorizontalAlignment.Right; lbl_oDiffTotal.Content = "Gesamt: " + (diffTotal <10 && diffTotal> -10 ? " " : " ") + Convert.ToString(diffTotal); lbl_oDiffTotal.HorizontalContentAlignment = HorizontalAlignment.Right; }
public static void SaveEva() { Tournament tnmt = new Tournament(); INIFile tnmtIni = new INIFile(Tournament.iniPath); tnmt.Getter(); Team[] evaTeams = new Team[tnmt.tnmtTeamCnt]; for (int i = 0; i < evaTeams.Length; i++) { Team addTeam = new Team(); addTeam.Getter(i + 1); evaTeams[i] = addTeam; } SortTeamsByWinAndGamePoints(evaTeams); PdfDocument pdf = new PdfDocument(); PdfPage page = pdf.AddPage(); XGraphics graph = XGraphics.FromPdfPage(page); XFont fontHeader = new XFont("Verdana", 20, XFontStyle.Bold); XFont fontLine = new XFont("Courier New", 12, XFontStyle.Regular); XFont fontLineInfo = new XFont("Courier New", 12, XFontStyle.Bold); XFont fontNotFinishedState = new XFont("Courier New", 12, XFontStyle.Bold); //graph.DrawString("Ranglist " + tnmt.tnmtName, fontHeader, XBrushes.Black, new XRect(10, 10, page.Width.Point, page.Height.Point), XStringFormats.TopCenter); SetHeader(tnmt, fontHeader, page, graph); string line = ""; int yPoint = 40; //if (CheckTnmtNotFinishState(tnmtIni)) //{ // line = "ZUM ZEITPUNKT DER ERSTELLUNG DIESER DATEI WAR DAS TURNIER NOCH NICHT BEENDET!"; // graph.DrawString(line, notFinishedState, XBrushes.Black, new XRect(10, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); // yPoint += 20; //} SetTnmtNotFinishState(tnmtIni, line, fontNotFinishedState, page, graph, ref yPoint); //line = "Allgemine Daten:"; //graph.DrawString(line, fontLineInfo, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 20; //line = " Anzahl Durchgänge: " + Convert.ToString(tnmt.tnmtRunCnt); //graph.DrawString(line, fontLine, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 20; //line = " Anzahl Spiel/Druchgang: " + Convert.ToString(tnmt.tnmtGameProRunCnt); //graph.DrawString(line, fontLine, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 20; //line = " Anzahl Teams: " + Convert.ToString(tnmt.tnmtTeamCnt); //graph.DrawString(line, fontLine, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 50; SetDefaultData(tnmt, ref line, fontLineInfo, fontLine, page, graph, ref yPoint); int x = 0; line = ""; //line = Const.posHeader + "|" + Const.teamNumberHeader + "|" + Const.teamNameHeader + "|" + Const.winPointsHeader + "|" + Const.gamePointsDiffHeader; //graph.DrawString(line, fontLineInfo, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 20; //line = ""; int pageNumber = 1; double rowCntperPage = 22; double pageCnt = tnmt.tnmtTeamCnt <= rowCntperPage ? 1 : (tnmt.tnmtTeamCnt / rowCntperPage); pageCnt = (int)pageCnt < (tnmt.tnmtTeamCnt / rowCntperPage) ? pageCnt + 1 : pageCnt; SetPageNumber(ref line, pageNumber, (int)pageCnt, fontLineInfo, page, graph, ref yPoint); SetTableHeader(ref line, fontLineInfo, page, graph, ref yPoint); //graph.DrawString(SetRow(), fontLineInfo, XBrushes.Black, new XRect(40, yPoint, page.Width.Point, page.Height.Point), XStringFormats.TopLeft); //yPoint += 20; int rowCnt = 0; foreach (Team team in evaTeams) { if (rowCnt < rowCntperPage) { x++; SetTableRowData(ref line, team, x, fontLineInfo, fontLine, page, graph, ref yPoint); rowCnt++; } else { page = pdf.AddPage(); graph = XGraphics.FromPdfPage(page); rowCnt = 1; yPoint = 40; pageNumber += 1; SetTimeStamp(ref line, fontLineInfo, page, graph, ref yPoint); yPoint += 110; SetPageNumber(ref line, pageNumber, (int)pageCnt, fontLineInfo, page, graph, ref yPoint); SetTableHeader(ref line, fontLineInfo, page, graph, ref yPoint); x++; SetTableRowData(ref line, team, x, fontLineInfo, fontLine, page, graph, ref yPoint); } } if (!Directory.Exists(tnmt.tnmtSpecPath)) { Directory.CreateDirectory(tnmt.tnmtSpecPath); Log.Create("Directory: " + tnmt.tnmtSpecPath); } string pdfFileName = ""; string pdfFilePath = ""; try { pdfFileName = "Rangliste_" + tnmt.tnmtName + "_" + DateTime.Now.ToShortDateString() + ".pdf"; pdfFilePath = System.IO.Path.Combine(tnmt.tnmtSpecPath, pdfFileName); pdf.Save(pdfFilePath); Log.Create("Evaluation-PDF: " + pdfFileName + " | saved at: " + pdfFilePath); } catch { Log.Error("creating Evaluation-PDF: " + pdfFileName + " tried to save at: " + pdfFilePath); } }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { Directory.CreateDirectory(Const.iniFolderPath); INIFile logFile = IniFileDataTemplate.CheckIfIniExists(Log.iniPath); INIFile playerData = IniFileDataTemplate.CheckIfIniExists(Player.iniPath); INIFile teamData = IniFileDataTemplate.CheckIfIniExists(Team.iniPath); INIFile tournamentData = IniFileDataTemplate.CheckIfIniExists(Tournament.iniPath); INIFile gameData = IniFileDataTemplate.CheckIfIniExists(Game.iniPath); INIFile tableData = IniFileDataTemplate.CheckIfIniExists(Table.iniPath); INIFile signedUpTeamsData = IniFileDataTemplate.CheckIfIniExists(SignedUpTeam.iniPath); actionMenueButton[0] = btn_GoToAddTeam; actionMenueButton[1] = btn_GoToEvaluation; actionMenueButton[2] = btn_GoToShowTeam; actionMenueButton[3] = btn_GoToTnmtData; actionMenueButton[4] = btn_GoTournamentMenue; Const.SwitchColor(this, actionMenueButton); UserControl creOLoaTnmt = new LoadOrCreateTournament(this); MainContent.Content = creOLoaTnmt; if (!checkIfTournamentIsRuning(tournamentData)) { // No running Tournament! Start New One and get needed Parameters //UserControl addTnmt = new AddTournament(this); //MainContent.Content = addTnmt; Tournament tnmt = new Tournament(); tnmt.Getter(); // Set for first run after creating new Tournament btn_GoToTnmtData.Style = (Style)Application.Current.Resources["StartTnmtButton"]; ActionMenue.Visibility = Visibility.Hidden; cnvs_PWHeader.Visibility = Visibility.Visible; } else if (checkIfTournamentIsInPrepMode(tournamentData)) { UserControl prepMenue = new PrepaireMenue(this); MainContent.Content = prepMenue; ActionMenue.Visibility = Visibility.Hidden; cnvs_PWHeader.Visibility = Visibility.Visible; } else { UserControl main = new Main(this); MainContent.Content = main; btn_GoToAddTeam.IsEnabled = true; btn_GoToShowTeam.IsEnabled = true; btn_GoToTnmtData.IsEnabled = true; btn_GoToEvaluation.IsEnabled = true; ActionMenue.Visibility = Visibility.Visible; cnvs_PWHeader.Visibility = Visibility.Hidden; if (Convert.ToInt32(tournamentData.GetValue(Tournament.tnmtSec, Tournament.tnS_tnmtRunCntAct)) != 0) { btn_GoToAddTeam.Style = (Style)Application.Current.Resources["DisabledButton"]; addTeamImg.Opacity = 0.5; btn_GoToAddTeam.Uid = NO_TEAM_ADDING; } if (Convert.ToInt32(tournamentData.GetValue(Tournament.tnmtSec, Tournament.tnS_tnmtRunCntAct)) == 0) { //btn_GoToTnmtData.Content = ""; btn_GoToTnmtData.Style = (Style)Application.Current.Resources["StartTnmtButton"]; } else { //btn_GoToTnmtData.Content = ""; btn_GoToTnmtData.Style = (Style)Application.Current.Resources["ActionMenueButton_" + tournamentData.GetValue(Const.fileSec, Tournament.fsX_ColorMode)]; } } }
private static void SetHeader(Tournament i_tnmt, XFont i_font, PdfPage i_page, XGraphics i_graph) { i_graph.DrawString("Rangliste " + i_tnmt.tnmtName, i_font, XBrushes.Black, new XRect(10, 10, i_page.Width.Point, i_page.Height.Point), XStringFormats.TopCenter); }