public PDFCreator(PrintablePlayerCharacter printablePlayerCharacter) { this._character = printablePlayerCharacter; this._FinishedCharacterSheet = $"{System.IO.Directory.GetCurrentDirectory()}\\Output\\{printablePlayerCharacter.CharacterName.Replace("\"", "")}.pdf"; if (_character.CharacterImageFilePath != null) { string FileName = string.Empty; if (_character.CharacterName.Contains("\"")) { FileName = _character.CharacterName.Replace("\"", ""); } else { FileName = _character.CharacterName; } if (File.Exists($"{System.IO.Directory.GetCurrentDirectory()}\\Images\\{_character.CharacterImageFilePath}.jpeg")) { this.Character_Image = $"{System.IO.Directory.GetCurrentDirectory()}\\Images\\{FileName}.jpeg"; } if (File.Exists($"{System.IO.Directory.GetCurrentDirectory()}\\Images\\{FileName}.jpeg")) { this.Character_Image = $"{System.IO.Directory.GetCurrentDirectory()}\\Images\\{FileName}.jpeg"; } if (File.Exists(_character.FactionImageFilePath)) { this.Faction_Image = _character.FactionImageFilePath; } } BuildCharacterSheet(); //BuildSpellSheet(); }
public Converter(pc playerCharacter) { if (playerCharacter != null) { this._pc = playerCharacter; } this._printablePlayerCharacter = new PrintablePlayerCharacter(); }
public Converter() { this._pc = new pc(); this._printablePlayerCharacter = new PrintablePlayerCharacter(); }