Ejemplo n.º 1
0
        private void btnRandomizeIdeal_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("把所有武將的相性及相性考慮隨機化,是否確認?", "隨機化相性", MessageBoxButton.OKCancel);

            if (result == MessageBoxResult.OK)
            {
                foreach (Person p in scen.Persons)
                {
                    p.Ideal = GameObject.Random(0, 149);
                    p.IdealTendencyIDString = scen.GameCommonData.AllIdealTendencyKinds.GetRandomObject().ID;
                }
                personTab.setup();
            }
        }
Ejemplo n.º 2
0
        private void populateTables(bool hasScen)
        {
            if (hasScen)
            {
                personTab = new PersonTab(scen, dgPerson, lblColumnHelp);
                personTab.setup();
                fatherTab = new DictionaryTab <int, int>(scen.FatherIds, "FatherIds", dgFatherId);
                fatherTab.setup();
                motherTab = new DictionaryTab <int, int>(scen.MotherIds, "MotherIds", dgMotherId);
                motherTab.setup();
                spouseTab = new DictionaryTab <int, int>(scen.SpouseIds, "SpouseIds", dgSpouseId);
                spouseTab.setup();
                // new DictionaryTab<int, int[]>(scen.BrotherIds, "BrotherIds", dgBrotherId).setup();
                architectureTab = new ArchitectureTab(scen, dgArchitecture, lblColumnHelp);
                architectureTab.setup();
                factionTab = new FactionTab(scen, dgFaction, lblColumnHelp);
                factionTab.setup();
                new MilitaryTab(scen, dgMilitary, lblColumnHelp).setup();
                new TroopTab(scen, dgTroop, lblColumnHelp).setup();
                new CaptiveTab(scen, dgCaptive, lblColumnHelp).setup();
                new EventTab(scen, dgEvent, lblColumnHelp).setup();
                new TroopEventTab(scen, dgTroopEvent, lblColumnHelp).setup();
                new TreasureTab(scen, dgTreasure, lblColumnHelp).setup();
                new FacilityTab(scen, dgFacility, lblColumnHelp).setup();
                new BiographyTab(scen, dgBiography, lblColumnHelp).setup();
            }

            // Common
            new TitleTab(scen, dgTitle, lblColumnHelp).setup();
            new SkillTab(scen, dgSkill, lblColumnHelp).setup();
            new StuntTab(scen, dgStunt, lblColumnHelp).setup();
            new CombatMethodTab(scen, dgCombatMethod, lblColumnHelp).setup();
            new InfleunceTab(scen, dgInfluence, lblColumnHelp).setup();
            new InfleunceKindTab(scen, dgInflunceKind, lblColumnHelp).setup();
            new ConditionTab(scen, dgCondition, lblColumnHelp).setup();
            new ConditionKindTab(scen, dgConditionKind, lblColumnHelp).setup();
            new EventEffectTab(scen, dgEventEffect, lblColumnHelp).setup();
            new EventEffectKindTab(scen, dgEventEffectKind, lblColumnHelp).setup();
            new TroopEventEffectTab(scen, dgTroopEventEffect, lblColumnHelp).setup();
            new TroopEventEffectKindTab(scen, dgTroopEventEffectKind, lblColumnHelp).setup();
            new FacilityKindTab(scen, dgFacilityKind, lblColumnHelp).setup();
            new ArchitectureKindTab(scen, dgArchitectureKind, lblColumnHelp).setup();
            new MilitaryKindTab(scen, dgMilitaryKind, lblColumnHelp).setup();
            new TechniqueTab(scen, dgTechniques, lblColumnHelp).setup();
        }