예제 #1
0
        private string GetOOBType(ArmyTypeEnum at)
        {
            switch (at)
            {
            case ArmyTypeEnum.Theatre:
                return("land");

            case ArmyTypeEnum.ArmyGroup:
                return("land");

            case ArmyTypeEnum.Army:
                return("land");

            case ArmyTypeEnum.Corps:
                return("land");

            case ArmyTypeEnum.Division:
                return("land");

            case ArmyTypeEnum.Navy:
                return("sea");

            case ArmyTypeEnum.Air:
                return("air");

            default:
                return("");
            }
        }
예제 #2
0
        private void btn_AddAttachment_Click(object sender, EventArgs e)
        {
            //OOBInfo

            OOBInfo oobInfo = new OOBInfo();

            this.lastOobID++;
            oobInfo.id = lastOobID;
            if (acNum == 0)
            {
                oobInfo.name = this.txt_BasicName.Text.Trim();
            }
            string       basicTypeName = (string)cbb_BasicType.SelectedItem;//获取当前选中项
            ArmyTypeEnum armyTypeEnum  = ConvertArmyTypeStringToEnum(basicTypeName);

            if (armyTypeEnum.Equals(ArmyTypeEnum.Navy))
            {
                oobInfo.type = "destroyer";
            }
            else if (armyTypeEnum.Equals(ArmyTypeEnum.Air))
            {
                oobInfo.type = "interceptor";
            }
            else
            {
                oobInfo.type = "hq_brigade";
            }

            ShowUserControl(oobInfo);
            acNum++;
        }
예제 #3
0
 public AddMilitaryForm(LocalisationInfo localisationModel, PathInfo pathInfo, string countryCode, List <MilitaryTypeInfo> militaryTypeList, int parentID, int lastOobID, ArmyTypeEnum armyType)
 {
     this.parentID          = parentID;
     this.lastOobID         = lastOobID;
     this.localisationModel = localisationModel;
     this.countryCode       = countryCode;
     this.pathInfo          = pathInfo;
     this.militaryTypeList  = militaryTypeList;
     this.armyType          = armyType;
     InitializeComponent();
     BindCbb_BasicType();
     this.cb_Reserve.Enabled = false;
     this.lastOobID++;
     this.txt_BasicID.Text = this.lastOobID.ToString();
 }
예제 #4
0
 public SelectLeaderForm(List <OOBInfo> oobList, PathInfo pathInfo, string countryCode, int leaderID, List <LeaderTraitInfo> leaderTraitList, List <LeaderInfo> leaderList, ArmyTypeEnum armyTypeEnum)
 {
     this.leaderID        = leaderID;
     this.oobList         = oobList;
     this.countryCode     = countryCode;
     this.pathInfo        = pathInfo;
     this.leaderTraitList = leaderTraitList;
     this.leaderList      = leaderList;
     this.armyTypeEnum    = armyTypeEnum;
     InitializeComponent();
     BindDetail();
     DataGridViewBind();
     BindLeaderMaxSkill();
     BindLeaderTrait();
     //SizeColumnsToContent(dataGridView1, leaderList.Count);
 }
예제 #5
0
        private string GetOOBType(ArmyTypeEnum at)
        {
            switch (at)
            {
            case ArmyTypeEnum.Theatre:
                return("战区");

            case ArmyTypeEnum.ArmyGroup:
                return("集团军群");

            case ArmyTypeEnum.Army:
                return("集团军");

            case ArmyTypeEnum.Corps:
                return("军");

            case ArmyTypeEnum.Division:
                return("师");

            case ArmyTypeEnum.Regiment:
                return("旅");

            case ArmyTypeEnum.Navy:
                return("舰队");

            case ArmyTypeEnum.Ship:
                return("战舰");

            case ArmyTypeEnum.Air:
                return("航空联队");

            case ArmyTypeEnum.Wing:
                return("飞机");

            default:
                return("");
            }
        }