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++; } }
public NewSystem(TreeView t1) { tree = t1; _systemSQL = mainFrm.systems; InitializeComponent(); }