private void InplaceFilterDrops()
        {
            IEnumerable <BasicItemDropStats> source = (IEnumerable <BasicItemDropStats>) this.mUnfilteredResults;

            if (this.radioButtonMinSamples.Checked && this.numericUpDownMinBattles.Value > 0M)
            {
                source = source.Where <BasicItemDropStats>((Func <BasicItemDropStats, bool>)(x => (Decimal)x.TimesRun >= this.numericUpDownMinBattles.Value));
            }
            else if (this.radioButtonHelp.Checked && this.numericUpDownLowSampleThreshold.Value > 0M)
            {
                source = source.Where <BasicItemDropStats>((Func <BasicItemDropStats, bool>)(x => (Decimal)x.TimesRun <= this.numericUpDownLowSampleThreshold.Value));
            }
            if (this.checkBoxRepeatable.Checked)
            {
                source = source.Where <BasicItemDropStats>((Func <BasicItemDropStats, bool>)(x => x.IsBattleRepeatable));
            }
            if (this.checkBoxNoInactive.Checked)
            {
                AppInitData data = FFRKProxy.Instance.GameState.AppInitData;
                if (data != null)
                {
                    source = source.Where <BasicItemDropStats>((Func <BasicItemDropStats, bool>)(x => data.Worlds.Exists((Predicate <DataWorld>)(y => (int)y.Id == (int)x.WorldId && y.KeptOutAt > data.User.StartTimeOfToday))));
                }
            }
            this.mBinding.Collection             = source.ToList <BasicItemDropStats>();
            this.listViewResults.VirtualListSize = this.mBinding.Collection.Count;
            this.listViewResults.Invalidate();
        }
Exemplo n.º 2
0
        public AppInitData InitData(ResSrv resSrv)
        {
            AppInitData initData = new AppInitData();

            initData.BannerList = resSrv.GetBannerList();

            initData.AppNavList = NavsList();
            return(initData);
        }
Exemplo n.º 3
0
 private void checkBoxNoInactive_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBoxNoInactive.Checked)
     {
         AppInitData data = FFRKProxy.Instance.GameState.AppInitData;
         if (data == null)
         {
             MessageBox.Show("This feature requires FFRK Inspector to have been running when you " +
                             "first launched FFRK.  Please close and restart FFRK and try again.");
             checkBoxNoInactive.Checked = false;
             return;
         }
     }
     InplaceFilterDrops();
 }
Exemplo n.º 4
0
        private void InplaceFilterDrops()
        {
            IEnumerable <BasicItemDropStats> filtered_items = mUnfilteredResults;

            if (radioButtonMinSamples.Checked && numericUpDownMinBattles.Value > 0)
            {
                filtered_items = filtered_items.Where(x => x.TimesRun >= numericUpDownMinBattles.Value);
            }
            else if (radioButtonHelp.Checked && numericUpDownLowSampleThreshold.Value > 0)
            {
                filtered_items = filtered_items.Where(x => x.TimesRun <= numericUpDownLowSampleThreshold.Value);
            }

            if (checkBoxRepeatable.Checked)
            {
                filtered_items = filtered_items.Where(x => x.IsBattleRepeatable);
            }

            if (checkBoxNoInactive.Checked)
            {
                AppInitData data = FFRKProxy.Instance.GameState.AppInitData;
                if (data != null)
                {
                    filtered_items = filtered_items.Where(x =>
                    {
                        // This item should remain in the list if there is an entry in the app init data for this item's
                        // world, AND that world entry has not yet reached the 'kept out at' threshold by start of today.
                        return(data.Worlds.Exists(y => y.Id == x.WorldId && y.KeptOutAt > data.User.StartTimeOfToday));
                    });
                }
            }

            mBinding.Collection             = filtered_items.ToList();
            listViewResults.VirtualListSize = mBinding.Collection.Count;
            listViewResults.Invalidate();
        }
Exemplo n.º 5
0
        public override void Handle(Session Session)
        {
            AppInitData result = JsonConvert.DeserializeObject <AppInitData>(GetResponseBody(Session));

            FFRKProxy.Instance.GameState.AppInitData = result;
        }