private void calculationOptionControl_Changed(object sender, EventArgs e)
        {
            if (!_loadingCalculationOptions)
            {
                labelAverageLag.Text   = trackBarAverageLag.Value.ToString();
                labelReactionTime.Text = trackBarReactionTime.Value.ToString();
                labelSRMana.Text       = trackbarSRMana.Value.ToString();

                _calcOpts.SetBoss(bosslist.GetBossFromBetterName(comboBoxBoss.Text));
                _calcOpts.FightLength        = (float)cmbLength.Value;
                _calcOpts.MainhandImbue      = (string)comboBoxMainhandImbue.SelectedItem;
                _calcOpts.OffhandImbue       = (string)comboBoxOffhandImbue.SelectedItem;
                _calcOpts.CalculationToGraph = (string)comboBoxCalculationToGraph.SelectedItem;
                _calcOpts.AverageLag         = trackBarAverageLag.Value;
                _calcOpts.ReactionTime       = trackBarReactionTime.Value;
                _calcOpts.BaseStatOption     = chbBaseStatOption.Checked;
                _calcOpts.UseMana            = chbMana.Checked;
                _calcOpts.StatsList[0]       = chkStatsStrength.Checked;
                _calcOpts.StatsList[1]       = chkStatsAgility.Checked;
                _calcOpts.StatsList[2]       = chkStatsAP.Checked;
                _calcOpts.StatsList[3]       = chkStatsCrit.Checked;
                _calcOpts.StatsList[4]       = chkStatsHit.Checked;
                _calcOpts.StatsList[5]       = chkStatsExp.Checked;
                _calcOpts.StatsList[6]       = chkStatsHaste.Checked;
                _calcOpts.StatsList[7]       = chkStatsArP.Checked;
                _calcOpts.StatsList[8]       = chkStatsSP.Checked;
                _calcOpts.StatsList[9]       = chkStatsInt.Checked;
                SavePriorities();
                Character.OnCalculationsInvalidated();
            }
        }
Exemple #2
0
        private void CB_BossList_SelectedIndexChanged(object sender, SelectionChangedEventArgs e)
        {
            string addInfo = "No Additional Info";

            try {
                if (!isLoading)
                {
                    addInfo = "Not Loading";
                    if (CB_BossList.SelectedIndex != 0)   // "Custom"
                    {
                        addInfo  += "\r\nCB_BossList.SelectedIndex != 0";
                        isLoading = true;
                        // Get Values
                        BossHandler boss = bosslist.GetBossFromBetterName(CB_BossList.SelectedItem.ToString()).Clone(); // "T7 : Naxxramas : 10 man : Patchwerk"
                        BossOptions.CloneThis(boss);
                        addInfo += "\r\nBoss Info Set";

                        // Set Controls to those Values
                        TB_BossInfo.Text = boss.GenInfoString(Character);

                        // Save the new names
                        if (!firstload)
                        {
                            addInfo += "\r\n!firstlost";
                            BossOptions.FilterType = (BossList.FilterType)CB_BL_FilterType.SelectedIndex;
                            BossOptions.Filter     = CB_BL_Filter.SelectedItem.ToString();
                            BossOptions.BossName   = CB_BossList.SelectedItem.ToString();
                        }
                        isLoading = false;
                    }
                    else
                    {
                        addInfo  += "\r\nCB_BossList.SelectedIndex == 0";
                        isLoading = true;
                        BossHandler boss = new BossHandler();
                        //
                        boss.Name            = "Custom";
                        BossOptions.BossName = boss.Name;
                        //
                        TB_BossInfo.Text = boss.GenInfoString(Character);
                        isLoading        = false;
                    }
                    bossOpts_PropertyChanged(null, null);
                }
            } catch (Exception ex) {
                new Base.ErrorBox()
                {
                    Title        = "Error in setting BossPicker Character settings from Boss",
                    Function     = "CB_BossList_SelectedIndexChanged()",
                    TheException = ex,
                }.Show();
                isLoading = false;
            }
        }