Exemplo n.º 1
0
 void FFRKProxy_OnPartyList(DataPartyDetails party)
 {
     BeginInvoke((Action)(() =>
     {
         mAnalyzer.Items = party.Equipments;
         mAnalyzer.Buddies = party.Buddies;
         mAnalyzer.Run();
         UpdatePartyGrid(party.Buddies.ToList());
         UpdateEquipmentGrid(party.Equipments);
     }));
 }
Exemplo n.º 2
0
        private void FFRKViewInventory_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }

            if (FFRKProxy.Instance != null)
            {
                mAnalyzerSettings = AnalyzerSettings.DefaultSettings;
                mAnalyzerSettings.LevelConsideration = TranslateLevelConsideration((ScoreUpgradeModeComboIndex)comboBoxScoreSelection.SelectedIndex);
                mAnalyzer = new EquipmentAnalyzer(mAnalyzerSettings);

                FFRKProxy.Instance.OnPartyList += FFRKProxy_OnPartyList;

                DataPartyDetails party = FFRKProxy.Instance.GameState.PartyDetails;
                if (party != null)
                {
                    // Run the initial analysis before updating the grids, so we can pass the
                    // scores straight through.  We'll run the analysis again every time they
                    // change one of the settings, so that the scores update on the fly.
                    mAnalyzer.Items   = party.Equipments;
                    mAnalyzer.Buddies = party.Buddies;
                    mAnalyzer.Run();
                    UpdatePartyGrid(party.Buddies.ToList());
                    UpdateEquipmentGrid(party.Equipments);
                }
            }
        }