예제 #1
0
        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();
        }
예제 #2
0
 public Converter(pc playerCharacter)
 {
     if (playerCharacter != null)
     {
         this._pc = playerCharacter;
     }
     this._printablePlayerCharacter = new PrintablePlayerCharacter();
 }
예제 #3
0
 public Converter()
 {
     this._pc = new pc();
     this._printablePlayerCharacter = new PrintablePlayerCharacter();
 }