private void button21_Click(object sender, EventArgs e) { //get building all town StringBuilder strResult = new StringBuilder(5000); int nCities = BUSCity.Count(); for (int i = 0; i < nCities; i++) { strResult.Append("---Town: " + BUSCity.GetCity(i).Name + "---\r\n"); BUSBuilding.ForceUpdate(i); int nBuildings = BUSBuilding.Count(i); for (int j = 0; j < nBuildings; j++) { DTOBuilding building = BUSBuilding.GetHouseInfomationInCity(i, j); strResult.Append(" Building " + (j + 1).ToString() + ": " + building.Type); strResult.Append(" " + building.Lvl); if (building.IsBuilding) { strResult.Append(" " + building.IsBuilding); strResult.Append(" " + building.Time); } strResult.Append("\r\n"); } } tbResult.Text = strResult.ToString(); }
private void button23_Click(object sender, EventArgs e) { //all ships StringBuilder strResult = new StringBuilder(5000); int nCities = BUSCity.Count(); for (int i = 0; i < nCities; i++) { strResult.Append("---Town: " + BUSCity.GetCity(i).Name + "---\r\n"); BUSTroops.ForceUpdateShips(i); int nTroops = BUSTroops.CountShips(BUSCity.GetCurrentCity()); for (int j = 0; j < nTroops; j++) { DTOTroops troop = BUSTroops.GetShipsInCity(i, j); strResult.Append(" " + troop.Type); strResult.Append(" " + troop.Quality); strResult.Append(" is unit: " + troop.IsUnits); strResult.Append("\r\n"); } } tbResult.Text = strResult.ToString(); }
private void button28_Click(object sender, EventArgs e) {//town hall inf StringBuilder strResult = new StringBuilder(1000); DTOCity ct = BUSCity.GetTownHallInfomationInCity(Gloval.Database.CurrentCity, true); strResult.Append("---Town: " + BUSCity.GetCity(Gloval.Database.CurrentCity).Name + "---\r\n"); strResult.Append("polimit: " + ct.PopulationLimit); strResult.Append(" pogrow: " + ct.PopulationGrow.ToString()); strResult.Append(" net gold: " + ct.GoldPerHour); strResult.Append(" scientist point per hour: " + ct.ResearchPointPerHour.ToString()); strResult.Append("\r\n"); tbResult.Text = strResult.ToString(); }
private void button2_Click(object sender, EventArgs e) {//get list city string strResult = ""; int nCities = BUSCity.Count(); for (int i = 0; i < nCities; i++) { DTOCity city = BUSCity.GetCity(i); strResult += " X: " + city.X; strResult += " Y: " + city.Y; strResult += " ID: " + city.ID; strResult += " Name: " + city.Name; strResult += " Type: " + city.TypeTradeGood; strResult += "\r\n"; } DTOCity cityFF = BUSCity.GetCity(0); tbResult.Text = strResult; }
private void button29_Click(object sender, EventArgs e) { StringBuilder strResult = new StringBuilder(5000); int nCities = BUSCity.Count(); for (int i = 0; i < nCities; i++) { DTOCity ct = BUSCity.GetTownHallInfomationInCity(i, true); strResult.Append("---Town: " + BUSCity.GetCity(i).Name + "---\r\n"); strResult.Append("polimit: " + ct.PopulationLimit); strResult.Append(" pogrow: " + ct.PopulationGrow.ToString()); strResult.Append(" net gold: " + ct.GoldPerHour); strResult.Append(" scientist point per hour: " + ct.ResearchPointPerHour.ToString()); strResult.Append("\r\n"); } tbResult.Text = strResult.ToString(); }