Ejemplo n.º 1
0
        private void mainFrm_Load(object sender, EventArgs e)
        {
            pCanvas1.BackColor = Color.Black;
            factions           = new FactionSql();
            systems            = new SystemsSql();
            sectors            = new SectorsSql();
            baseAssets         = new BaseAssetSQL();
            mobs = new MobsSQL();

            TreeWindow treeWindow = new TreeWindow(systems.getSystemTable(), sectors.getSectorTable());

            treeView1.Nodes.AddRange(treeWindow.setupInitialTree());

            HE_GlobalVars._ListofFactions = new string[factions.getFactionTable().Rows.Count + 1];
            int factionCount = 1;

            HE_GlobalVars._ListofFactions[0] = "None";
            DataTable factionTmp = factions.getFactionTable();

            foreach (DataRow r in factionTmp.Rows)
            {
                HE_GlobalVars._ListofFactions[factionCount] = r["name"].ToString();
                factionCount++;
            }
        }
Ejemplo n.º 2
0
        private void populateCombos()
        {
            //Populate Level Combo
            for (int i = 0; i < 67; i++)
            {
                levelCombo.Items.Add(i);
            }

            //Populate Type combo
            typeCombo.Items.Add("Cybernetic");
            typeCombo.Items.Add("Structural");
            typeCombo.Items.Add("Organic_Red");
            typeCombo.Items.Add("Organic_Green");
            typeCombo.Items.Add("Crystalline");
            typeCombo.Items.Add("Energy");
            typeCombo.Items.Add("Rock Based");

            for (int i = -1; i < 67; i++)
            {
                comboBox1.Items.Add(i);
            }

            //Populate Faction Combo
            factionCombo.Items.Add("Please Make A Selection");

            foreach (DataRow fr in factions.getFactionTable().Rows)
            {
                factionCombo.Items.Add(fr["name"].ToString());
            }
        }