statName() 공개 정적인 메소드

public static statName ( int s, bool abr = false ) : string
s int
abr bool
리턴 string
예제 #1
0
        private void initStuff()
        {
            InitializeComponent();
            multSetter = new MultiplierSetting[] { multiplierSettingHP, multiplierSettingSt, multiplierSettingOx, multiplierSettingFo, multiplierSettingWe, multiplierSettingDm, multiplierSettingSp, multiplierSettingTo };
            int[] serverStatIndices = new int[] { 0, 1, 3, 4, 7, 8, 9, 2 };
            for (int s = 0; s < 8; s++)
            {
                multSetter[s].StatName = Utils.statName(s) + " [" + serverStatIndices[s].ToString() + "]";
            }

            customSCStarving.Title = "Starving: ";
            customSCWakeup.Title   = "Wakeup: ";
            customSCBirth.Title    = "Birth: ";

            // Tooltips
            tt = new ToolTip();
            tt.SetToolTip(numericUpDownAutosaveMinutes, "To disable set to 0");
            tt.SetToolTip(chkExperimentalOCR, "Experimental! Works well for 1920 and mostly for 1680. May not work for other resolutions at all.");
            tt.SetToolTip(chkCollectionSync, "If checked, the tool automatically reloads the library if it was changed. Use if multiple persons editing the file, e.g. via a shared folder.\nIt's recommened to check this along with \"Auto Save\"");
            tt.SetToolTip(checkBoxAutoSave, "If checked, the library is saved after each change automatically.\nIt's recommened to check this along with \"Auto Update Collection File\"");
            tt.SetToolTip(numericUpDownMaxChartLevel, "This number defines the level that is shown as maximum in the charts.\nUsually it's good to set this value to one third of the max wild level.");
            tt.SetToolTip(labelTameAdd, "PerLevelStatsMultiplier_DinoTamed_Add");
            tt.SetToolTip(labelTameAff, "PerLevelStatsMultiplier_DinoTamed_Affinity");
            tt.SetToolTip(labelWildLevel, "PerLevelStatsMultiplier_DinoTamed");
            tt.SetToolTip(labelTameLevel, "PerLevelStatsMultiplier_DinoWild");
            tt.SetToolTip(chkbSpeechRecognition, "If the overlay is enabled, you can ask via the microphone for taming-infos,\ne.g.\"Argentavis level 30\" to display basic taming-infos in the overlay");
            tt.SetToolTip(labelBabyFoodConsumptionSpeed, "BabyFoodConsumptionSpeedMultiplier");
            tt.SetToolTip(checkBoxOxygenForAll, "Enable if you have the oxygen-values of all creatures, e.g. by using a mod.");
        }
예제 #2
0
 public StatPotential(int stat, bool percent)
 {
     InitializeComponent();
     statIndex    = stat;
     this.percent = percent;
     label1.Text  = Utils.statName(stat, true);
 }
예제 #3
0
        public StatsMultiplierTesting()
        {
            InitializeComponent();

            statControls = new List <StatMultiplierTestingControl>();
            for (int s = 0; s < 8; s++)
            {
                var sc = new StatMultiplierTestingControl();
                sc.StatName           = Utils.statName(s, true);
                sc.OnLevelChanged    += Sc_OnLevelChanged;
                sc.OnValueChangedTE  += setTE;
                sc.OnValueChangedIB  += setIB;
                sc.OnValueChangedIBM += setIBM;
                flowLayoutPanel1.Controls.Add(sc);
                flowLayoutPanel1.SetFlowBreak(sc, true);
                statControls.Add(sc);
            }
            // set level-control to last
            flowLayoutPanel1.Controls.Add(gbLevel);

            statControls[5].Percent = true;
            statControls[6].Percent = true;
            statControls[1].NoIB    = true;
            statControls[2].NoIB    = true;

            fineAdjustmentRange = new MinMaxDouble(0);
            rbTamed.Checked     = true;
            gbFineAdjustment.Hide();
        }
예제 #4
0
        private void initializeVars()
        {
            InitializeComponent();
            this.creature  = null;
            stats          = new StatDisplay[] { statDisplayHP, statDisplaySt, statDisplayOx, statDisplayFo, statDisplayWe, statDisplayDm, statDisplaySp, statDisplayTo };
            numUDLevelsDom = new NumericUpDown[] { numericUpDown1, numericUpDown2, numericUpDown3, numericUpDown4, numericUpDown5, numericUpDown6, numericUpDown7 };
            for (int s = 0; s < 8; s++)
            {
                stats[s].Title = Utils.statName(s, true);
            }
            stats[5].Percent                       = true;
            stats[6].Percent                       = true;
            statDisplayTo.ShowBars                 = false;
            parentComboBoxMother.naLabel           = "- Mother n/a";
            parentComboBoxFather.naLabel           = "- Father n/a";
            regionColorChooser1.RegionColorChosen += RegionColorChooser1_RegionColorChosen;

            // tooltips
            tt.SetToolTip(labelHeaderDomLevelSet, "Set the spend domesticated Levels here");
            tt.SetToolTip(labelSex, "Sex of the Creature");
            tt.SetToolTip(labelStatHeader, "Wild-levels, Domesticated-levels, Value that is inherited, Current Value of the Creature");
            tt.SetToolTip(buttonEdit, "Edit");
            tt.SetToolTip(labelM, "Mother");
            tt.SetToolTip(labelF, "Father");
            tt.SetToolTip(textBoxNote, "Note");
            tt.SetToolTip(labelParents, "Mother and Father (if bred and choosen)");
            tt.SetToolTip(buttonSex, "Sex");
            tt.SetToolTip(buttonStatus, "Status: Available, Unavailable, Dead");
        }
예제 #5
0
        public void setCreature(Creature creature)
        {
            this.creature  = creature;
            groupBox1.Text = (!onlyLevels && creature.status != CreatureStatus.Available ? "(" + Utils.statusSymbol(creature.status) + ") " : "") + creature.name + " (" + creature.levelHatched + (totalLevelUnknown ? "+" : "") + ")";
            if (!onlyLevels && creature.status == CreatureStatus.Dead)
            {
                groupBox1.ForeColor = SystemColors.GrayText;
                tt.SetToolTip(groupBox1, "Creature has passed away");
            }
            else if (!onlyLevels && creature.status == CreatureStatus.Unavailable)
            {
                groupBox1.ForeColor = SystemColors.GrayText;
                tt.SetToolTip(groupBox1, "Creature is currently not available");
            }

            for (int s = 0; s < 7; s++)
            {
                if (creature.levelsWild[s] < 0)
                {
                    labels[s].Text      = "?";
                    labels[s].BackColor = Color.WhiteSmoke;
                    labels[s].ForeColor = Color.LightGray;
                }
                else
                {
                    labels[s].Text      = creature.levelsWild[s].ToString();
                    labels[s].BackColor = Utils.getColorFromPercent((int)(creature.levelsWild[s] * 2.5), (creature.topBreedingStats[s] ? 0.2 : 0.7));
                    labels[s].ForeColor = SystemColors.ControlText;
                    tt.SetToolTip(labels[s], Utils.statName(s) + ": " + (creature.valuesBreeding[s] * (Utils.precision(s) == 3 ? 100 : 1)).ToString() + (Utils.precision(s) == 3 ? "%" : ""));
                }
                labels[s].Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, (creature.topBreedingStats[s] ? System.Drawing.FontStyle.Bold : System.Drawing.FontStyle.Regular), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            }
            if (onlyLevels)
            {
                labelSex.Visible    = false;
                pictureBox1.Visible = false;
                plainTextcurrentValuesToolStripMenuItem.Visible = false;
                aRKChatcurrentValuesToolStripMenuItem.Visible   = false;
            }
            else
            {
                labelSex.Visible   = true;
                labelSex.Text      = Utils.sexSymbol(creature.gender);
                labelSex.BackColor = creature.neutered ? SystemColors.GrayText : Utils.sexColor(creature.gender);
                // creature Colors
                pictureBox1.Image   = CreatureColored.getColoredCreature(creature.colors, "", enabledColorRegions, 24, 22, true);
                labelSex.Visible    = true;
                pictureBox1.Visible = true;
                plainTextcurrentValuesToolStripMenuItem.Visible = true;
                aRKChatcurrentValuesToolStripMenuItem.Visible   = true;
            }
            labelMutations.BackColor = Color.FromArgb(225, 192, 255);
            labelMutations.Text      = creature.mutationCounter.ToString();
            labelMutations.Visible   = creature.mutationCounter > 0;
            contextMenuAvailable     = true;
        }
예제 #6
0
        private void initStuff()
        {
            InitializeComponent();
            multSetter = new MultiplierSetting[] { multiplierSettingHP, multiplierSettingSt, multiplierSettingOx, multiplierSettingFo, multiplierSettingWe, multiplierSettingDm, multiplierSettingSp, multiplierSettingTo };
            for (int s = 0; s < 8; s++)
            {
                multSetter[s].StatName = Utils.statName(s);
            }

            // Tooltips
            ToolTip tt = new ToolTip();

            tt.SetToolTip(numericUpDownAutosaveMinutes, "To disable set to 0");
            tt.SetToolTip(chkExperimentalOCR, "Experimental! Works well for 1920 and mostly for 1680. May not work for other resolutions at all.");
        }
예제 #7
0
        private void initStuff()
        {
            InitializeComponent();
            multSetter = new MultiplierSetting[] { multiplierSettingHP, multiplierSettingSt, multiplierSettingOx, multiplierSettingFo, multiplierSettingWe, multiplierSettingDm, multiplierSettingSp, multiplierSettingTo };
            for (int s = 0; s < 8; s++)
            {
                multSetter[s].StatName = Utils.statName(s);
            }

            // Tooltips
            ToolTip tt = new ToolTip();

            tt.SetToolTip(numericUpDownAutosaveMinutes, "To disable set to 0");
            tt.SetToolTip(chkExperimentalOCR, "Experimental! Works well for 1920 and mostly for 1680. May not work for other resolutions at all.");
            tt.SetToolTip(chkCollectionSync, "If checked, the tool automatically reloads the library if it was changed. Use if multiple persons editing the file, e.g. via a shared folder.\nIt's recommened to check this along with \"Auto Save\"");
            tt.SetToolTip(checkBoxAutoSave, "If checked, the library is saved after each change automatically.\nIt's recommened to check this along with \"Auto Update Collection File\"");
        }
예제 #8
0
        public void setCreature(Creature creature)
        {
            Clear();
            this.creature = creature;
            regionColorChooser1.setCreature(creature.species, creature.colors);
            colorRegionUseds = regionColorChooser1.ColorRegionsUseds;

            bool glowSpecies = Values.V.glowSpecies.Contains(creature.species);

            for (int s = 0; s < 8; s++)
            {
                stats[s].Title = Utils.statName(s, true, glowSpecies);
            }

            updateLabel();
            renewLargeImage = true;
        }
예제 #9
0
 private void InitC()
 {
     InitializeComponent();
     tt.InitialDelay = 100;
     tt.SetToolTip(labelHP, Utils.statName(StatNames.Health));
     tt.SetToolTip(labelSt, Utils.statName(StatNames.Stamina));
     tt.SetToolTip(labelOx, Utils.statName(StatNames.Oxygen));
     tt.SetToolTip(labelFo, Utils.statName(StatNames.Food));
     tt.SetToolTip(labelWe, Utils.statName(StatNames.Weight));
     tt.SetToolTip(labelDm, Utils.statName(StatNames.MeleeDamageMultiplier));
     tt.SetToolTip(labelSp, Utils.statName(StatNames.SpeedMultiplier));
     tt.SetToolTip(labelCr, Utils.statName(StatNames.CraftingSpeedMultiplier));
     tt.SetToolTip(labelSex, "Sex");
     tt.SetToolTip(labelMutations, "Mutation-Counter");
     labels = new List <Label> {
         labelHP, labelSt, labelOx, labelFo, labelWe, labelDm, labelSp, labelCr
     };
     SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
     Disposed += PedigreeCreature_Disposed;
 }
예제 #10
0
        private void initStuff()
        {
            InitializeComponent();
            multSetter = new MultiplierSetting[] { multiplierSettingHP, multiplierSettingSt, multiplierSettingOx, multiplierSettingFo, multiplierSettingWe, multiplierSettingDm, multiplierSettingSp, multiplierSettingTo };
            for (int s = 0; s < 8; s++)
            {
                multSetter[s].StatName = Utils.statName(s);
            }

            // Tooltips
            ToolTip tt = new ToolTip();

            tt.SetToolTip(numericUpDownAutosaveMinutes, "To disable set to 0");
            tt.SetToolTip(chkExperimentalOCR, "Experimental! Works well for 1920 and mostly for 1680. May not work for other resolutions at all.");
            tt.SetToolTip(chkCollectionSync, "If checked, the tool automatically reloads the library if it was changed. Use if multiple persons editing the file, e.g. via a shared folder.\nIt's recommened to check this along with \"Auto Save\"");
            tt.SetToolTip(checkBoxAutoSave, "If checked, the library is saved after each change automatically.\nIt's recommened to check this along with \"Auto Update Collection File\"");
            tt.SetToolTip(numericUpDownMaxChartLevel, "This number defines the level that is shown as maximum in the charts.\nUsually it's good to set this value to one third of the max wild level.");
            tt.SetToolTip(labelTameAdd, "PerLevelStatsMultiplier_DinoTamed_Add");
            tt.SetToolTip(labelTameAff, "PerLevelStatsMultiplier_DinoTamed_Affinity");
            tt.SetToolTip(labelWildLevel, "PerLevelStatsMultiplier_DinoTamed");
            tt.SetToolTip(labelTameLevel, "PerLevelStatsMultiplier_DinoWild");
        }
예제 #11
0
        private void setLocalizations(bool init = true)
        {
            if (init)
            {
                initLocalization();
            }

            // menu
            Loc.ControlText(fileToolStripMenuItem);
            Loc.ControlText(newToolStripMenuItem);
            Loc.ControlText(loadToolStripMenuItem);
            Loc.ControlText(loadAndAddToolStripMenuItem);
            Loc.ControlText(saveToolStripMenuItem);
            Loc.ControlText(saveAsToolStripMenuItem);
            Loc.ControlText(importingFromSavegameToolStripMenuItem);
            Loc.ControlText(importingFromSavegameEmptyToolStripMenuItem);
            //Loc.ControlText(runDefaultExtractionAndImportFileToolStripMenuItem);
            //Loc.ControlText(runDefaultExtractionToolStripMenuItem);
            //Loc.ControlText(importCreatedJsonfileToolStripMenuItem);
            Loc.ControlText(importExportedCreaturesToolStripMenuItem);
            //Loc.ControlText(runDefaultExtractionAndImportFileToolStripMenuItem);
            //Loc.ControlText(runDefaultExtractionToolStripMenuItem);
            //Loc.ControlText(importCreatedJsonfileToolStripMenuItem);
            Loc.ControlText(modValueManagerToolStripMenuItem);
            Loc.ControlText(settingsToolStripMenuItem);
            Loc.ControlText(openSettingsToolStripMenuItem);
            Loc.ControlText(quitToolStripMenuItem);
            Loc.ControlText(editToolStripMenuItem);
            Loc.ControlText(exportValuesToClipboardToolStripMenuItem);
            Loc.ControlText(importValuesFromClipboardToolStripMenuItem);
            Loc.ControlText(setStatusToolStripMenuItem);
            Loc.ControlText(multiSetterToolStripMenuItem);
            Loc.ControlText(deleteSelectedToolStripMenuItem);
            Loc.ControlText(findDuplicatesToolStripMenuItem);
            Loc.ControlText(copyCreatureToolStripMenuItem);
            Loc.ControlText(pasteCreatureToolStripMenuItem);
            Loc.ControlText(viewToolStripMenuItem);
            Loc.ControlText(deadCreaturesToolStripMenuItem);
            Loc.ControlText(unavailableCreaturesToolStripMenuItem);
            Loc.ControlText(obeliskCreaturesToolStripMenuItem);
            Loc.ControlText(neuteredCreaturesToolStripMenuItem);
            Loc.ControlText(mutatedCreaturesToolStripMenuItem);
            Loc.ControlText(femalesToolStripMenuItem);
            Loc.ControlText(malesToolStripMenuItem);
            Loc.ControlText(helpToolStripMenuItem);
            Loc.ControlText(aboutToolStripMenuItem);
            Loc.ControlText(onlinehelpToolStripMenuItem);
            Loc.ControlText(BreedingPlanHelpToolStripMenuItem);
            Loc.ControlText(extractionIssuesToolStripMenuItem);
            Loc.ControlText(checkForUpdatedStatsToolStripMenuItem);
            Loc.ControlText(toolStripButtonCopy2Tester);
            Loc.ControlText(toolStripButtonCopy2Extractor);
            Loc.ControlText(toolStripButtonClear);
            Loc.ControlText(toolStripButtonAddNote);
            Loc.ControlText(toolStripButtonRemoveNote);
            Loc.ControlText(toolStripButtonDeleteExpiredIncubationTimers);
            Loc.ControlText(toolStripButtonSaveCreatureValuesTemp);
            Loc.ControlText(toolStripButtonDeleteTempCreature);
            Loc.ControlText(tsBtAddAsExtractionTest);
            Loc.ControlText(copyToMultiplierTesterToolStripButton);

            // top bar
            Loc.ControlText(cbGuessSpecies, tt);
            Loc.ControlText(btReadValuesFromArk, tt);
            Loc.ControlText(btImportLastExported, tt);
            Loc.ControlText(cbToggleOverlay);

            // tester
            Loc.ControlText(tabPageStatTesting, "statTesting");
            Loc.ControlText(rbWildTester, "wild");
            Loc.ControlText(rbTamedTester, "tamed");
            Loc.ControlText(rbBredTester, "bred");
            Loc.ControlText(lbTesterWildLevel, "wildLvl");
            Loc.ControlText(lbTesterDomLevel, "domLvl");
            Loc.ControlText(lbCurrentValue, "currentValue");
            Loc.ControlText(lbBreedingValueTester, "breedingValue");
            Loc.ControlText(lbNotYetTamed);
            Loc.ControlText(gpPreviewEdit);
            Loc.ControlText(lbTestingInfo);
            Loc.ControlText(gbStatChart, "statChart");
            Loc.ControlText(lbCurrentCreature, "CurrentCreature");
            Loc.setToolTip(lbImprintedCount, tt);
            Loc.setToolTip(lbTesterDomLevel, "domLevelExplanation", tt);
            Loc.setToolTip(lbTesterWildLevel, "wildLevelExplanation", tt);

            // extractor
            Loc.ControlText(tabPageExtractor, "extractor");
            Loc.ControlText(lbCurrentStatEx, "currentStatValue");
            Loc.ControlText(lbExtractorWildLevel, "wildLvl");
            Loc.ControlText(lbExtractorDomLevel, "domLvl");
            Loc.ControlText(lbSum);
            Loc.ControlText(lbShouldBe);
            Loc.ControlText(lbImprintingFailInfo);
            Loc.ControlText(cbExactlyImprinting, tt);
            Loc.ControlText(btExtractLevels);
            Loc.ControlText(cbQuickWildCheck, tt);
            Loc.ControlText(rbWildExtractor, "wild");
            Loc.ControlText(rbTamedExtractor, "tamed");
            Loc.ControlText(rbBredExtractor, "bred");
            Loc.setToolTip(lbImprintingCuddleCountExtractor, tt);
            Loc.setToolTip(lbSumWild, tt);
            Loc.setToolTip(lbSumDom, tt);
            Loc.setToolTip(lbSumDomSB, tt);
            Loc.setToolTip(lbListening, tt);
            Loc.setToolTip(lbExtractorDomLevel, "domLevelExplanation", tt);
            Loc.setToolTip(lbExtractorWildLevel, "wildLevelExplanation", tt);

            // library
            Loc.ControlText(tabPageLibrary, "library");
            columnHeaderName.Text       = Loc.s("Name");
            columnHeaderOwner.Text      = Loc.s("Owner");
            columnHeaderNote.Text       = Loc.s("Note");
            columnHeaderServer.Text     = Loc.s("Server");
            columnHeaderHP.Text         = Utils.statName(StatNames.Health, true);
            columnHeaderSt.Text         = Utils.statName(StatNames.Stamina, true);
            columnHeaderOx.Text         = Utils.statName(StatNames.Oxygen, true);
            columnHeaderFo.Text         = Utils.statName(StatNames.Food, true);
            columnHeaderWe.Text         = Utils.statName(StatNames.Weight, true);
            columnHeaderDm.Text         = Utils.statName(StatNames.MeleeDamageMultiplier, true);
            columnHeaderSp.Text         = Utils.statName(StatNames.SpeedMultiplier, true);
            columnHeaderTo.Text         = Utils.statName(StatNames.Torpidity, true);
            columnHeaderWa.Text         = Utils.statName(StatNames.CraftingSpeedMultiplier, true);
            columnHeaderTemp.Text       = Utils.statName(StatNames.Temperature, true);
            columnHeaderCr.Text         = Utils.statName(StatNames.Water, true);
            columnHeaderFr.Text         = Utils.statName(StatNames.TemperatureFortitude, true);
            columnHeaderTopStatsNr.Text = Loc.s("Top");
            columnHeaderTopness.Text    = Loc.s("topPercentage");
            columnHeaderGen.Text        = Loc.s("Generation_Abb");
            columnHeaderLW.Text         = Loc.s("LevelWild_Abb");
            columnHeaderMutations.Text  = Loc.s("Mutations_Abb");
            columnHeaderAdded.Text      = Loc.s("added");
            columnHeaderCooldown.Text   = Loc.s("cooldownGrowing");
            columnHeaderColor0.Text     = Loc.s("C0");
            columnHeaderColor1.Text     = Loc.s("C1");
            columnHeaderColor2.Text     = Loc.s("C2");
            columnHeaderColor3.Text     = Loc.s("C3");
            columnHeaderColor4.Text     = Loc.s("C4");
            columnHeaderColor5.Text     = Loc.s("C5");

            // other tabs
            Loc.ControlText(tabPagePedigree, "pedigree");
            Loc.ControlText(tabPageTaming, "Taming");
            Loc.ControlText(tabPageBreedingPlan, "BreedingPlan");
            Loc.ControlText(tabPageRaising, "Raising");
            Loc.ControlText(tabPagePlayerTribes, "Player");

            // other controls
            creatureInfoInputTester.SetLocalizations();
            creatureInfoInputExtractor.SetLocalizations();
            pedigree1.SetLocalizations();
            tamingControl1.SetLocalizations();
            breedingPlan1.SetLocalizations();
        }
예제 #12
0
        private void CopyExtractionToClipboard()
        {
            bool header = true;
            bool table  = MessageBox.Show("Results can be copied as own table or as a long table-row. Should it be copied as own table?",
                                          "Copy as own table?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;

            if (extractor.validResults && speciesSelector1.SelectedSpecies != null)
            {
                List <string> tsv = new List <string>();
                string        rowLevel = speciesSelector1.SelectedSpecies.name + "\t\t", rowValues = "";
                // if taming effectiveness is unique, display it, too
                string effString = "";
                double eff       = extractor.UniqueTE();
                if (eff >= 0)
                {
                    effString = "\tTamingEff:\t" + (100 * eff) + "%";
                }
                // headerrow
                if (table || header)
                {
                    if (table)
                    {
                        tsv.Add(speciesSelector1.SelectedSpecies.name + "\tLevel " + numericUpDownLevel.Value + effString);
                        tsv.Add("Stat\tWildLevel\tDomLevel\tBreedingValue");
                    }
                    else
                    {
                        tsv.Add("Species\tName\tSex\tHP-Level\tSt-Level\tOx-Level\tFo-Level\tWe-Level\tDm-Level\tSp-Level\tTo-Level\tHP-Value\tSt-Value\tOx-Value\tFo-Value\tWe-Value\tDm-Value\tSp-Value\tTo-Value");
                    }
                }
                for (int s = 0; s < Values.STATS_COUNT; s++)
                {
                    if (extractor.chosenResults[s] < extractor.results[s].Count)
                    {
                        string breedingV = "";
                        if (activeStats[s])
                        {
                            breedingV = statIOs[s].BreedingValue.ToString();
                        }
                        if (table)
                        {
                            tsv.Add(Utils.statName(s) + "\t" + (statIOs[s].LevelWild >= 0 ? statIOs[s].LevelWild.ToString() : "") + "\t" + (statIOs[s].LevelWild >= 0 ? statIOs[s].LevelWild.ToString() : "") + "\t" + breedingV);
                        }
                        else
                        {
                            rowLevel  += "\t" + (activeStats[s] ? statIOs[s].LevelWild.ToString() : "");
                            rowValues += "\t" + breedingV;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
                if (!table)
                {
                    tsv.Add(rowLevel + rowValues);
                }
                Clipboard.SetText(string.Join("\n", tsv));
            }
        }
예제 #13
0
        public void setLevels(int[] levels)
        {
            if (levels != null && levels.Length > 6 && maxR > 5)
            {
                Bitmap   bmp = new Bitmap(Width, Height);
                Graphics g   = Graphics.FromImage(bmp);
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

                double angleSeven = Math.PI / 3.5;
                double offset     = Math.PI / 2;

                for (int s = 0; s < 7; s++)
                {
                    if (levels[s] != oldLevels[s])
                    {
                        oldLevels[s] = levels[s];
                        int r = levels[s] * maxR / maxLevel;
                        if (r < 0)
                        {
                            r = 0;
                        }
                        if (r > maxR)
                        {
                            r = maxR;
                        }
                        double angle = angleSeven * s - offset;
                        ps[s] = new Point(xm + (int)(r * Math.Cos(angle)), ym + (int)(r * Math.Sin(angle)));
                    }
                }
                g.FillEllipse(grBrushBG, xm - maxR, ym - maxR, 2 * maxR + 1, 2 * maxR + 1);

                Pen penL = new Pen(Color.FromArgb(128, 255, 255, 255));
                g.FillPolygon(grBrushFG, ps.ToArray());
                g.DrawPolygon(penL, ps.ToArray());

                double stepFactor = (double)step / maxLevel;
                for (int r = 0; r < 5; r++)
                {
                    g.DrawEllipse(new Pen(Utils.getColorFromPercent((int)(100 * r * stepFactor), -0.4)), (int)(xm - maxR * r * stepFactor), (int)(ym - maxR * r * stepFactor), (int)(2 * maxR * r * stepFactor + 1), (int)(2 * maxR * r * stepFactor + 1));
                }
                g.DrawEllipse(new Pen(Utils.getColorFromPercent(100, -0.4)), xm - maxR, ym - maxR, 2 * maxR + 1, 2 * maxR + 1);

                Pen pen = new Pen(Color.Black);
                for (int s = 0; s < 7; s++)
                {
                    pen.Width = 1;
                    pen.Color = Color.Gray;
                    g.DrawLine(pen, xm, ym, maxPs[s].X, maxPs[s].Y);
                    Color cl = Utils.getColorFromPercent(100 * levels[s] / maxLevel);
                    pen.Color = cl;
                    pen.Width = 3;
                    g.DrawLine(pen, xm, ym, ps[s].X, ps[s].Y);
                    Brush b = new SolidBrush(cl);
                    g.FillEllipse(b, ps[s].X - 4, ps[s].Y - 4, 8, 8);
                    g.DrawEllipse(penL, ps[s].X - 4, ps[s].Y - 4, 8, 8);
                    b.Dispose();
                }
                for (int r = 1; r < 5; r++)
                {
                    g.DrawString((step * r).ToString("N0"), new System.Drawing.Font("Microsoft Sans Serif", 8f), new System.Drawing.SolidBrush(Color.FromArgb(190, 255, 255, 255)), xm - 8, ym - 6 + r * maxR / 5);
                }
                g.DrawString((maxLevel).ToString("N0"), new System.Drawing.Font("Microsoft Sans Serif", 8f), new System.Drawing.SolidBrush(Color.FromArgb(190, 255, 255, 255)), xm - 8, ym - 11 + maxR);

                g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
                for (int s = 0; s < 7; s++)
                {
                    double angle = angleSeven * s - offset;
                    g.DrawString(Utils.statName(s, true), new System.Drawing.Font("Microsoft Sans Serif", 8f), new System.Drawing.SolidBrush(Color.Black), xm - 9 + (int)((maxR + 10) * Math.Cos(angle)), ym - 5 + (int)((maxR + 10) * Math.Sin(angle)));
                }

                g.Dispose();

                Image = bmp;
            }
        }