Пример #1
0
 public override void Initialize()
 {
     this.fleetlist    = new FleetWidget(this._app, this.UI.Path(this.ID, "gameFleetList"));
     this.workingfleet = new FleetWidget(this._app, this.UI.Path(this.ID, "gameWorkingFleet"));
     this.fleetlist.DisableTooltips    = true;
     this.workingfleet.DisableTooltips = true;
     this.fleetlist.LinkWidget(this.workingfleet);
     this.workingfleet.LinkWidget(this.fleetlist);
     if (this._app.CurrentState == this._app.GetGameState <FleetManagerState>())
     {
         this._app.UI.SetVisible(this._app.UI.Path(this.ID, "FleetManager"), false);
     }
     else
     {
         this._app.UI.SetVisible(this._app.UI.Path(this.ID, "FleetManager"), true);
     }
     this.fleetlist.SetSyncedFleets(this._app.GameDatabase.GetFleetsByPlayerAndSystem(this.App.LocalPlayer.ID, this._systemid, FleetType.FL_NORMAL | FleetType.FL_RESERVE | FleetType.FL_DEFENSE).Where <FleetInfo>((Func <FleetInfo, bool>)(x => x.ID != this.fleetid)).ToList <FleetInfo>());
     this.workingfleet.SetSyncedFleets(this.fleetid);
     OverlayMission.RefreshFleetAdmiralDetails(this.App, this.ID, this.fleetid, "admiralDetails");
 }
Пример #2
0
 private void SelectReaction(
     OverlayReactionlMission.ReactionUIContainer reaction)
 {
     if (this._selectedReaction != null)
     {
         this._app.UI.SetVisible(this.UI.Path(this._selectedReaction.ListItemID, "reaction_selection"), false);
     }
     this._selectedReaction = reaction;
     if (this._selectedReaction == null)
     {
         return;
     }
     this.SelectedFleet = this._selectedReaction.Reaction.fleet.ID;
     this._app.UI.SetVisible(this.UI.Path(this._selectedReaction.ListItemID, "reaction_selection"), true);
     this._reactionfleet.SetSyncedFleets(this._selectedReaction.Reaction.fleet.ID);
     OverlayMission.RefreshFleetAdmiralDetails(this.App, this.ID, this._selectedReaction.Reaction.fleet.ID, "admiralDetails1");
     this.SelectedFleet              = 0;
     this.SelectedPlanet             = 0;
     this._fleetWidget.Selected      = -1;
     this._fleetWidget.SelectedFleet = 0;
     this._fleetWidget.SetSyncedFleets(this._selectedReaction.Reaction.fleetsInRange);
     if (this._selectedReaction.TargetFleet.HasValue)
     {
         this._fleetWidget.Selected      = this._selectedReaction.TargetFleet.Value;
         this._fleetWidget.SelectedFleet = this._selectedReaction.TargetFleet.Value;
     }
     else
     {
         this.SelectedFleet              = 0;
         this.SelectedPlanet             = 0;
         this._fleetWidget.Selected      = -1;
         this._fleetWidget.SelectedFleet = 0;
     }
     this.FocusOnStarSystem(this._selectedReaction.Reaction.fleet.SystemID);
     this._systemWidget.Sync(this._selectedReaction.Reaction.fleet.SystemID);
 }