コード例 #1
0
        private void ListShower()
        {
            if (selectedNation == 100 && selectedRank == 100)
            {
                planesToListView         = PlaneCollection.GetPlane();
                TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
                _TheBestListView.Adapter = TheBestlistView;
            }
            else

            if (selectedNation == 100)
            {
                List <Plane> planesAll = PlaneCollection.GetPlane();
                var          planevar  = from p in planesAll
                                         where p.RankId == selectedRank
                                         select p;
                planesToListView         = planevar.ToList <Plane>();
                TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
                _TheBestListView.Adapter = TheBestlistView;
            }
            else

            if (selectedRank == 100)
            {
                List <Plane> planesAll = PlaneCollection.GetPlane();
                var          planevar  = from p in planesAll
                                         where p.NationId == selectedNation
                                         select p;
                planesToListView         = planevar.ToList <Plane>();
                TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
                _TheBestListView.Adapter = TheBestlistView;
            }
            else
            {
                planesToListView         = PlaneSelector(selectedNation, selectedRank);
                TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
                _TheBestListView.Adapter = TheBestlistView;
            }
        }
コード例 #2
0
 private void TaskSelector()
 {
     if (SelectedTask == 1)
     {
         var planevar = from p in planesForTask
                        orderby p.MaxSpeedAt0 descending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 2)
     {
         var planevar = from p in planesForTask
                        orderby p.MaxSpeedAt5000 descending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 3)
     {
         var planevar = from p in planesForTask
                        orderby p.Climb ascending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 4)
     {
         var planevar = from p in planesForTask
                        orderby p.TurnAt0 ascending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 5)
     {
         var planevar = from p in planesForTask
                        orderby p.BombLoad descending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 6)
     {
         var planevar = from p in planesForTask
                        orderby p.ThrustToWeightRatio descending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
     if (SelectedTask == 7)
     {
         var planevar = from p in planesForTask
                        orderby p.WeaponVolleyPerSecond descending
                        select p;
         planesToListView         = planevar.ToList <Plane>();
         TheBestlistView          = new ListViewTheBestAdapter(this, planesToListView);
         _TheBestListView.Adapter = TheBestlistView;
     }
 }