public FleetWidget.FilterShips FleetWidgetShipFilter(
            ShipInfo ship,
            DesignInfo design)
        {
            int num1 = 0;

            foreach (DesignSectionInfo designSection in design.DesignSections)
            {
                ShipSectionAsset shipSectionAsset = this.App.AssetDatabase.GetShipSectionAsset(designSection.FilePath);
                if (shipSectionAsset.BattleRiderType != BattleRiderTypes.Unspecified)
                {
                    int battleRiderType = (int)shipSectionAsset.BattleRiderType;
                }
                num1 += RiderManager.GetNumRiderSlots(this.App, designSection);
            }
            int num2 = 0;

            foreach (DesignSectionInfo designSection in design.DesignSections)
            {
                num2 += this.App.AssetDatabase.GetShipSectionAsset(designSection.FilePath).ReserveSize;
            }
            if (num2 > 0 || num1 > 0)
            {
                return(FleetWidget.FilterShips.Enable);
            }
            return(design.Class == ShipClass.BattleRider ? FleetWidget.FilterShips.Ignore : FleetWidget.FilterShips.Ignore);
        }
    // Use this for initialization
    void Start()
    {
        mapManager   = GetComponent <MapManager>();
        riderManager = GetComponent <RiderManager>();

        mapManager.CreateMap();
        riderManager.CreateRider();
    }
        public ActionResult GetRiders()
        {
            if (Session[Shared.Constants.SESSION_ADMIN] == null)
            {
                return(RedirectToAction("Login"));
            }

            List <Rider> lstRider = RiderManager.GetRider("", null);

            return(View("Riders", lstRider));
        }
        public ActionResult AddRider(Rider objRider)
        {
            if (Session[Shared.Constants.SESSION_ADMIN] == null)
            {
                return(RedirectToAction("Login"));
            }

            string ret = Shared.Constants.MSG_ERR_NOUSEREXIST.Text;

            ret = RiderManager.SaveRider(objRider);
            if (ret.Equals(Shared.Constants.MSG_OK_DBSAVE.Text))
            {
                return(RedirectToAction("GetRiders", "Admin"));
            }
            return(RedirectToAction("AddRider", "Admin"));
        }
        protected override void OnEnter()
        {
            this.App.UI.SetScreen("RiderManager");
            this._manager                = new RiderManager(this.App, "RiderManager");
            this._camera                 = new OrbitCameraController(this.App);
            this._camera.DesiredPitch    = MathHelper.DegreesToRadians(0.0f);
            this._camera.TargetPosition  = new Vector3(0.0f, 0.0f, 0.0f);
            this._camera.MaxDistance     = 6000f;
            this._camera.DesiredDistance = this._camera.MaxDistance;
            this._manager.PostSetProp("CameraController", (IGameObject)this._camera);
            this._manager.PostSetActive(true);
            IEnumerable <FleetInfo> byPlayerAndSystem = this.App.GameDatabase.GetFleetsByPlayerAndSystem(this.App.LocalPlayer.ID, this._targetSystemID, FleetType.FL_ALL);

            this._manager.SetSyncedFleets(byPlayerAndSystem.ToList <FleetInfo>());
            this.SyncFleetShipModels();
            this._fleetWidget.ShipFilter     += new FleetWidget.FleetWidgetShipFilter(this.FleetWidgetShipFilter);
            this._fleetWidget.ShowEmptyFleets = false;
            this._fleetWidget.SetSyncedFleets(byPlayerAndSystem.ToList <FleetInfo>());
            this._manager.PostSetProp("SetFleetWidget", (IGameObject)this._fleetWidget);
            this.App.HotKeyManager.AddListener((IKeyBindListener)this);
        }