コード例 #1
0
        private void Setup()
        {
            CB_Species.Items.Clear();
            CB_HeldItem.Items.Clear();
            CB_Move1.Items.Clear();
            CB_Move2.Items.Clear();
            CB_Move3.Items.Clear();
            CB_Move4.Items.Clear();

            CB_Species.InitializeBinding();
            CB_Species.DataSource = new BindingSource(GameInfo.SpeciesDataSource.Skip(1).Where(s => s.Value <= SAV.MaxSpeciesID).ToList(), null);

            CB_Move1.InitializeBinding();
            CB_Move2.InitializeBinding();
            CB_Move3.InitializeBinding();
            CB_Move4.InitializeBinding();

            var MoveList = GameInfo.MoveDataSource;

            CB_Move1.DataSource = new BindingSource(MoveList, null);
            CB_Move2.DataSource = new BindingSource(MoveList, null);
            CB_Move3.DataSource = new BindingSource(MoveList, null);
            CB_Move4.DataSource = new BindingSource(MoveList, null);

            CB_HeldItem.InitializeBinding();
            CB_HeldItem.DataSource = new BindingSource(GameInfo.ItemDataSource, null);
        }
コード例 #2
0
    private void Setup()
    {
        CB_Species.Items.Clear();
        CB_HeldItem.Items.Clear();
        CB_Move1.Items.Clear();
        CB_Move2.Items.Clear();
        CB_Move3.Items.Clear();
        CB_Move4.Items.Clear();

        var filtered = GameInfo.FilteredSources;

        CB_Species.InitializeBinding();
        CB_Species.DataSource = new BindingSource(filtered.Species, null);

        CB_Move1.InitializeBinding();
        CB_Move2.InitializeBinding();
        CB_Move3.InitializeBinding();
        CB_Move4.InitializeBinding();

        var MoveList = filtered.Moves;

        CB_Move1.DataSource = new BindingSource(MoveList, null);
        CB_Move2.DataSource = new BindingSource(MoveList, null);
        CB_Move3.DataSource = new BindingSource(MoveList, null);
        CB_Move4.DataSource = new BindingSource(MoveList, null);

        CB_HeldItem.InitializeBinding();
        CB_HeldItem.DataSource = new BindingSource(filtered.Items, null);
    }
コード例 #3
0
        private void SetupComboBoxes()
        {
            CB_Ball.InitializeBinding();
            CB_HeldItem.InitializeBinding();
            CB_Species.InitializeBinding();
            CB_Nature.InitializeBinding();
            CB_Ability.InitializeBinding();
            CB_Form.InitializeBinding();

            var filtered = GameInfo.FilteredSources;

            CB_Ball.DataSource     = new BindingSource(filtered.Balls, null);
            CB_HeldItem.DataSource = new BindingSource(filtered.Items, null);
            CB_Species.DataSource  = new BindingSource(filtered.Species, null);
            CB_Nature.DataSource   = new BindingSource(filtered.Natures, null);

            CB_Move1.InitializeBinding();
            CB_Move2.InitializeBinding();
            CB_Move3.InitializeBinding();
            CB_Move4.InitializeBinding();

            var moves = filtered.Moves;

            CB_Move1.DataSource = new BindingSource(moves, null);
            CB_Move2.DataSource = new BindingSource(moves, null);
            CB_Move3.DataSource = new BindingSource(moves, null);
            CB_Move4.DataSource = new BindingSource(moves, null);
        }
コード例 #4
0
        private void SetupComboBoxes()
        {
            CB_Ball.InitializeBinding();
            CB_HeldItem.InitializeBinding();
            CB_Species.InitializeBinding();
            CB_Nature.InitializeBinding();
            CB_Ability.InitializeBinding();
            CB_Form.InitializeBinding();

            CB_Ball.DataSource     = new BindingSource(GameInfo.BallDataSource.Where(b => b.Value <= SAV.MaxBallID).ToList(), null);
            CB_HeldItem.DataSource = new BindingSource(GameInfo.ItemDataSource.Where(i => i.Value < SAV.MaxItemID).ToList(), null);
            CB_Species.DataSource  = new BindingSource(GameInfo.SpeciesDataSource.Where(s => s.Value <= SAV.MaxSpeciesID).ToList(), null);
            CB_Nature.DataSource   = new BindingSource(GameInfo.NatureDataSource, null);

            CB_Move1.InitializeBinding();
            CB_Move2.InitializeBinding();
            CB_Move3.InitializeBinding();
            CB_Move4.InitializeBinding();

            var moves = GameInfo.MoveDataSource;

            CB_Move1.DataSource = new BindingSource(moves, null);
            CB_Move2.DataSource = new BindingSource(moves, null);
            CB_Move3.DataSource = new BindingSource(moves, null);
            CB_Move4.DataSource = new BindingSource(moves, null);
        }