Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        private void button14_Click(object sender, EventArgs e)
        {
            //get ship
            StringBuilder strResult = new StringBuilder(1000);

            int nTroops = BUSTroops.CountShips(BUSCity.GetCurrentCity());

            for (int i = 0; i < nTroops; i++)
            {
                DTOTroops troop = BUSTroops.GetShipsInCity(BUSCity.GetCurrentCity(), i);

                strResult.Append("  " + troop.Type);
                strResult.Append(" " + troop.Quality);
                strResult.Append(" is unit: " + troop.IsUnits);
                strResult.Append("\r\n");
            }

            tbResult.Text = strResult.ToString();
        }
Ejemplo n.º 3
0
        private void button9_Click(object sender, EventArgs e)
        {
            StringBuilder strResult = new StringBuilder(1000);

            int nBuildings = BUSBuilding.Count(BUSCity.GetCurrentCity());

            for (int i = 0; i < nBuildings; i++)
            {
                DTOBuilding building = BUSBuilding.GetHouseInfomationInCity(BUSCity.GetCurrentCity(), i);

                strResult.Append("Building: " + 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();
        }