Exemplo n.º 1
0
        public void Login(string nation, string name)
        {
            this.Client.Login(nation, name);
            Catalog.Create(this.Client.GetCatalog());
            var view = this.Client.GetView();

            this.Helm     = new RemoteHelm(this.Client, view.Helm);
            this.Ships    = view.Ships.Select(def => new RemoteShip(def)).ToDictionary(s => s.Name);
            this.Missiles = view.Missiles.Select(def => new RemoteMissile(def)).ToList();
            this.Stars    = view.Stars.ToDictionary(s => s.Name);
        }
Exemplo n.º 2
0
        public void Login(string nation, string name)
        {
            Client.Login(nation, name);
            Catalog.Create(Client.GetCatalog());
            var view = Client.GetView();

            Helm     = new RemoteHelm(Client, view.Helm);
            Ships    = view.Ships.OfType <IShip>().ToDictionary(s => s.Name);
            Missiles = view.Missiles.OfType <IMissile>().ToList();
            Stars    = view.Stars.ToDictionary(s => s.Name);
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     if (this.Client != null)
     {
         this.Client.Logout();
     }
     this.Factory.Close();
     this.Ships    = null;
     this.Missiles = null;
     this.Helm     = null;
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     if (Client != null)
     {
         Client.Logout();
     }
     Factory.Close();
     Ships    = null;
     Missiles = null;
     Helm     = null;
 }