Exemplo n.º 1
0
 public void SeperatePlanetsFromSS(LEWrapper le)
 {
     le.ServerResponseEvent += new LEWrapper.ServerResponseHandler(SeperatePlanetsEventHandler);
     foreach (KeyValuePair <string, string> pair in planetList)
     {
         le.BodyGetBuildings(pair.Key.ToString());
     }
 }
Exemplo n.º 2
0
 private void cbPlanetsList_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     //MessageBox.Show("selected index changed");
     labelStatusText.Text = "Selected Planet Changed";
     ClearPlanetMap();
     le.BodyGetBuildings(cbPlanetsList.SelectedValue.ToString());
     le.ServerResponseEvent += (senderR, eR) =>
     {
         Response r = eR as Response;
         if (r.id == 402)
         {
             currentPlanetResponse = r;
             //labelStatusText = "Food: " + currentPlanetResponse.result.buildings.
             //Dictionary<string, r.result.buildings> Buildings = r.result.buildings;
             //MapBuildingInfoToArrayPlanetMap(r.result.buildings);
             PopulatePlanetMap(r.result.buildings);
         }
     };
 }
Exemplo n.º 3
0
        //private LEWrapper le;
        static void Main(string[] args)
        {
/*            string userInput;
 *          do
 *          {
 *              Console.Write("Enter EmpireName:");
 *              userInput = Console.ReadLine();
 *              if (string.IsNullOrEmpty(userInput))
 *              { Console.WriteLine("Thanks"); }
 *              else
 *              {
 *                  Console.WriteLine("Input [" + userInput + "]");
 *                  // other code to process user input
 *              }
 *          } while (!string.IsNullOrEmpty(userInput));
 *
 *          Console.ReadKey();
 */
            string UserName = "******";
            string Password = "******";
            string Server   = "us1";

            LEWrapper       le = new LEWrapper("Jazz", "M", "us1");
            PrintPlanetList p  = new PrintPlanetList();

            p.Subscribe(le);
            le.EmpireLogin();
            //Dictionary<string, string> planetList = p.SortPlanetList();
            Dictionary <string, string> planetList = p.planetList;

            foreach (KeyValuePair <string, string> pair in planetList)
            {
                le.BodyGetBuildings(pair.Key.ToString());
            }
            //planetList =
            //le.CloseLog();
            Console.ReadKey();
            //le.CloseLog();
        }