Пример #1
0
        public void ENToString()
        {
            EN enInstance = new EN(
                EntityNameUse.Legal, new ENXP[] {
                new ENXP("James", EntityNamePartType.Given),
                new ENXP("T", EntityNamePartType.Given),
                new ENXP("Kirk", EntityNamePartType.Family)
            });

            //Console.Write(enInstance.ToString("|" + "{GIV}{FAM}" + "|"));
            Assert.AreEqual(enInstance.ToString("{GIV}{FAM}"), "James T Kirk");
        }
Пример #2
0
        public void ENExampleTest04()
        {
            EN name = new EN
                      (
                EntityNameUse.Legal,
                new ENXP[] {}
                      );

            name.NullFlavor = NullFlavor.Other;
            Console.WriteLine(name.ToString("{FAM}, {GIV}"));
            // should output James Kirk Tieberius
            Assert.IsTrue(name.Validate());
        }
Пример #3
0
        public void ENExampleTest01()
        {
            EN name = new EN
                      (
                EntityNameUse.Legal,
                new ENXP[] {
                // add name-parts to name
                new ENXP("James", EntityNamePartType.Given),
                new ENXP("Tiberius", EntityNamePartType.Given),
                new ENXP("Kirk", EntityNamePartType.Family),
            }
                      );

            name.NullFlavor = null;
            Console.WriteLine(name.ToString("{FAM}, {GIV}"));
            // should output James Kirk Tieberius
            Assert.IsTrue(name.Validate());
        }
Пример #4
0
        public void ENToString()
        {
            EN enInstance = new EN(
            EntityNameUse.Legal, new ENXP[] { 
            new ENXP("James", EntityNamePartType.Given), 
            new ENXP("T", EntityNamePartType.Given), 
            new ENXP("Kirk", EntityNamePartType.Family) });

            //Console.Write(enInstance.ToString("|" + "{GIV}{FAM}" + "|"));
            Assert.AreEqual(enInstance.ToString("{GIV}{FAM}") ,"James T Kirk");
        }
Пример #5
0
        public void ENExampleTest01()
        {
            EN name = new EN
                (
                    EntityNameUse.Legal,
                    new ENXP[] {

                        // add name-parts to name
                        new ENXP("James", EntityNamePartType.Given),
                        new ENXP("Tiberius", EntityNamePartType.Given),
                        new ENXP("Kirk", EntityNamePartType.Family),
                    }
                );
            name.NullFlavor = null;
            Console.WriteLine(name.ToString("{FAM}, {GIV}"));
            // should output James Kirk Tieberius
            Assert.IsTrue(name.Validate());
        }
Пример #6
0
 public void ENExampleTest04()
 {
     EN name = new EN
         (
             EntityNameUse.Legal,
             new ENXP[] {}
         );
     name.NullFlavor = NullFlavor.Other;
     Console.WriteLine(name.ToString("{FAM}, {GIV}"));
     // should output James Kirk Tieberius
     Assert.IsTrue(name.Validate());
 }
Пример #7
0
 public override string ToString()
 {
     return(Frames.ToString().PadLeft(4, ' ') + (Jump ? ",Jump" : "") + (Save ? ",Save" : "") + (Fire ? ",Fire" : "") + (Bash ? ",Bash" : "") +
            (ChargeJump ? ",CJump" : "") + (Glide ? ",Glide" : "") + (Start ? ",Start" : "") + (Select ? ",Select" : "") + (UI ? ",UI" : "") +
            (Action ? ",Action" : "") + (Esc ? ",Esc" : "") + (Dash ? ",Dash" : "") + (Grenade ? ",Grenade" : "") +
            Axis() + (DLoad ? ",DLoad" : "") + (DSave ? ",DSave" : "") + (SaveSlot >= 0 ? ",Slot," + (SaveSlot + 1) : "") +
            (!Position ? "" : ",Pos," + PositionX.ToString("0.####") + "," + PositionY.ToString("0.####")) +
            (!Speed ? "" : ",Speed," + SpeedX.ToString("0.####") + "," + SpeedY.ToString("0.####")) +
            (XP >= 0 ? ",XP," + XP : "") + (Color ? ",Color" : "") + (Random >= 0 ? ",Random," + Random : "") +
            (!EntityPos ? "" : ",EntityPos," + EntityPosX.ToString("0.####") + "," + EntityPosY.ToString("0.####")) +
            (!BlockPos ? "" : ",BlockPos," + BlockPosX.ToString("0.####") + "," + BlockPosY.ToString("0.####")) +
            (EntityHP < 0 ? "" : ",EntityHP," + EntityHP.ToString("0.##")) + (HP >= 0 ? ",HP," + HP.ToString("0.#") : "") + (EN >= 0 ? ",EN," + EN.ToString("0.##") : "") +
            (Restore ? ",Restore" : "") + (Copy >= 0 ? ",Copy," + (Copy + 1) : "") + (SkillTree >= 0 ? ",SkillTree," + SkillTree : "") +
            (MouseX < 0 && MouseY < 0 ? "" : ",Mouse," + MouseX.ToString("0.####") + "," + MouseY.ToString("0.####")));
 }