示例#1
0
 public void abstractOut(FuncPart headerFunc, FuncPart contentFunc, string filepath)
 {
     try
     {
         //File.CreateText(filepath);
         StreamWriter sw = new StreamWriter(filepath, false, Encoding.GetEncoding("gb2312"));
         headerFunc(ref sw);
         contentFunc(ref sw);
         sw.Close();
     }
     catch (Exception e)
     {
         System.Console.WriteLine(e);
     }
 }
示例#2
0
    /// <summary>
    /// 注册部件
    /// </summary>
    protected virtual void registParts()
    {
        _list = new PlayerBasePart[17];
        int i = 0;

        system = new SystemPart();
        system.setMe(this);
        _list[i++] = system;

        func = new FuncPart();
        func.setMe(this);
        _list[i++] = func;

        activity = new ActivityPart();
        activity.setMe(this);
        _list[i++] = activity;

        role = new RolePart();
        role.setMe(this);
        _list[i++] = role;

        scene = new ScenePart();
        scene.setMe(this);
        _list[i++] = scene;

        character = new CharacterPart();
        character.setMe(this);
        _list[i++] = character;

        social = new SocialPart();
        social.setMe(this);
        _list[i++] = social;

        bag = new BagPart();
        bag.setMe(this);
        _list[i++] = bag;

        mail = new MailPart();
        mail.setMe(this);
        _list[i++] = mail;

        quest = new QuestPart();
        quest.setMe(this);
        _list[i++] = quest;

        guide = new GuidePart();
        guide.setMe(this);
        _list[i++] = guide;

        friend = new FriendPart();
        friend.setMe(this);
        _list[i++] = friend;

        equip = new EquipPart();
        equip.setMe(this);
        _list[i++] = equip;

        team = new TeamPart();
        team.setMe(this);
        _list[i++] = team;

        union = new UnionPart();
        union.setMe(this);
        _list[i++] = union;

        achievement = new AchievementPart();
        achievement.setMe(this);
        _list[i++] = achievement;

        pet = new PetPart();
        pet.setMe(this);
        _list[i++] = pet;
    }