Example #1
0
        private void buttonUpgrade_Click(object sender, EventArgs e)
        {
            this.target = Target.Upgrade;

            if (Client.Instance.Map.GetAllOthersAtLocation(Client.Instance.Selected).Count > 0)
            {
                Select form = new Select("Select object to upgrade", Client.Instance.Map.GetAllAtLocation(Client.Instance.Selected.Location));
                form.ShowDialog();
                this.newComponents = new LcogClient.Model.Collections.Components();
                this.targetObj = Client.Instance.Target.Clone();
                if (Client.Instance.Target.GetType() == typeof(Planet))
                {
                    this.isPlanet = true;
                }
                else
                {
                    this.isPlanet = false;
                }
            }
            else
            {
                this.newComponents = new LcogClient.Model.Collections.Components();
                this.targetObj = Client.Instance.Selected.Clone();
                if (Client.Instance.Selected.GetType() == typeof(Planet))
                {
                    this.isPlanet = true;
                }
                else
                {
                    this.isPlanet = false;
                }
            }
            this.UpdateView();
        }
Example #2
0
 private void buttonClear_Click(object sender, EventArgs e)
 {
     if (this.target == Target.NewShip)
     {
         this.targetObj = new Ship();
     }
     else
     {
         this.newComponents = new LcogClient.Model.Collections.Components();
         this.targetObj = Client.Instance.Target.Clone();
     }
     this.UpdateView();
 }