diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index c094701c..a82b64e0 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -107,6 +107,12 @@ + + UserControl + + + StatPotential.cs + UserControl @@ -214,6 +220,12 @@ Component + + UserControl + + + StatPotentials.cs + @@ -226,6 +238,9 @@ OffspringPossibilities.cs + + StatPotential.cs + StatWeighting.cs @@ -241,6 +256,9 @@ TribesControl.cs + + StatPotentials.cs + diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 0ed13021..4fc148ba 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -46,6 +46,9 @@ True + + + diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index 0dfefc4d..b47e8b42 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -113,6 +113,7 @@ private void InitializeComponent() this.radioButtonWild = new System.Windows.Forms.RadioButton(); this.tabControlMain = new System.Windows.Forms.TabControl(); this.tabPageStatTesting = new System.Windows.Forms.TabPage(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); this.panelWildTamedBredTester = new System.Windows.Forms.Panel(); this.radioButtonTesterBred = new System.Windows.Forms.RadioButton(); this.radioButtonTesterTamed = new System.Windows.Forms.RadioButton(); @@ -230,6 +231,7 @@ private void InitializeComponent() this.toolStripButtonExtract = new System.Windows.Forms.ToolStripButton(); this.toolStripButtonAddPlayer = new System.Windows.Forms.ToolStripButton(); this.toolStripButtonAddTribe = new System.Windows.Forms.ToolStripButton(); + this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); this.radarChart1 = new ARKBreedingStats.RadarChart(); this.statTestingHealth = new ARKBreedingStats.StatIO(); this.statTestingStamina = new ARKBreedingStats.StatIO(); @@ -256,7 +258,6 @@ private void InitializeComponent() this.timerList1 = new ARKBreedingStats.TimerList(); this.tribesControl1 = new ARKBreedingStats.TribesControl(); this.tamingControl1 = new ARKBreedingStats.TamingControl(); - this.groupBox8 = new System.Windows.Forms.GroupBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -273,6 +274,7 @@ private void InitializeComponent() this.panelWildTamedBred.SuspendLayout(); this.tabControlMain.SuspendLayout(); this.tabPageStatTesting.SuspendLayout(); + this.groupBox8.SuspendLayout(); this.panelWildTamedBredTester.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox5.SuspendLayout(); @@ -303,7 +305,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.statTestingTamingEffectiveness)).BeginInit(); this.toolStrip2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); - this.groupBox8.SuspendLayout(); this.SuspendLayout(); // // aboutToolStripMenuItem @@ -1071,6 +1072,7 @@ private void InitializeComponent() // // tabPageStatTesting // + this.tabPageStatTesting.Controls.Add(this.statPotentials1); this.tabPageStatTesting.Controls.Add(this.groupBox8); this.tabPageStatTesting.Controls.Add(this.panelWildTamedBredTester); this.tabPageStatTesting.Controls.Add(this.groupBox2); @@ -1086,6 +1088,16 @@ private void InitializeComponent() this.tabPageStatTesting.Text = "Stat Testing"; this.tabPageStatTesting.UseVisualStyleBackColor = true; // + // groupBox8 + // + this.groupBox8.Controls.Add(this.radarChart1); + this.groupBox8.Location = new System.Drawing.Point(556, 43); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(213, 228); + this.groupBox8.TabIndex = 11; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "Stat-Chart"; + // // panelWildTamedBredTester // this.panelWildTamedBredTester.Controls.Add(this.radioButtonTesterBred); @@ -2310,6 +2322,13 @@ private void InitializeComponent() this.toolStripButtonAddTribe.Visible = false; this.toolStripButtonAddTribe.Click += new System.EventHandler(this.toolStripButtonAddTribe_Click); // + // statPotentials1 + // + this.statPotentials1.Location = new System.Drawing.Point(556, 278); + this.statPotentials1.Name = "statPotentials1"; + this.statPotentials1.Size = new System.Drawing.Size(293, 361); + this.statPotentials1.TabIndex = 12; + // // radarChart1 // this.radarChart1.Location = new System.Drawing.Point(6, 19); @@ -2465,7 +2484,7 @@ private void InitializeComponent() // // creatureInfoInputTester // - this.creatureInfoInputTester.Cooldown = new System.DateTime(2017, 2, 5, 1, 44, 34, 283); + this.creatureInfoInputTester.Cooldown = new System.DateTime(2017, 2, 5, 19, 14, 44, 905); this.creatureInfoInputTester.CreatureName = ""; this.creatureInfoInputTester.CreatureNote = ""; this.creatureInfoInputTester.CreatureOwner = ""; @@ -2473,7 +2492,7 @@ private void InitializeComponent() this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; this.creatureInfoInputTester.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 11, 41, 997); this.creatureInfoInputTester.father = null; - this.creatureInfoInputTester.Grown = new System.DateTime(2017, 2, 5, 1, 44, 34, 283); + this.creatureInfoInputTester.Grown = new System.DateTime(2017, 2, 5, 19, 14, 44, 906); this.creatureInfoInputTester.Location = new System.Drawing.Point(321, 305); this.creatureInfoInputTester.mother = null; this.creatureInfoInputTester.MutationCounter = 0; @@ -2638,7 +2657,7 @@ private void InitializeComponent() // // creatureInfoInputExtractor // - this.creatureInfoInputExtractor.Cooldown = new System.DateTime(2017, 2, 5, 1, 44, 34, 309); + this.creatureInfoInputExtractor.Cooldown = new System.DateTime(2017, 2, 5, 19, 14, 44, 927); this.creatureInfoInputExtractor.CreatureName = ""; this.creatureInfoInputExtractor.CreatureNote = ""; this.creatureInfoInputExtractor.CreatureOwner = ""; @@ -2646,7 +2665,7 @@ private void InitializeComponent() this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; this.creatureInfoInputExtractor.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 12, 15, 968); this.creatureInfoInputExtractor.father = null; - this.creatureInfoInputExtractor.Grown = new System.DateTime(2017, 2, 5, 1, 44, 34, 310); + this.creatureInfoInputExtractor.Grown = new System.DateTime(2017, 2, 5, 19, 14, 44, 927); this.creatureInfoInputExtractor.Location = new System.Drawing.Point(321, 325); this.creatureInfoInputExtractor.mother = null; this.creatureInfoInputExtractor.MutationCounter = 0; @@ -2727,16 +2746,6 @@ private void InitializeComponent() this.tamingControl1.Size = new System.Drawing.Size(870, 639); this.tamingControl1.TabIndex = 0; // - // groupBox8 - // - this.groupBox8.Controls.Add(this.radarChart1); - this.groupBox8.Location = new System.Drawing.Point(556, 43); - this.groupBox8.Name = "groupBox8"; - this.groupBox8.Size = new System.Drawing.Size(213, 228); - this.groupBox8.TabIndex = 11; - this.groupBox8.TabStop = false; - this.groupBox8.Text = "Stat-Chart"; - // // Form1 // this.AcceptButton = this.buttonExtract; @@ -2776,6 +2785,7 @@ private void InitializeComponent() this.panelWildTamedBred.PerformLayout(); this.tabControlMain.ResumeLayout(false); this.tabPageStatTesting.ResumeLayout(false); + this.groupBox8.ResumeLayout(false); this.panelWildTamedBredTester.ResumeLayout(false); this.panelWildTamedBredTester.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -2817,7 +2827,6 @@ private void InitializeComponent() this.toolStrip2.ResumeLayout(false); this.toolStrip2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); - this.groupBox8.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -3051,5 +3060,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; private RadarChart radarChart1; private System.Windows.Forms.GroupBox groupBox8; + private uiControls.StatPotentials statPotentials1; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 3f46c7ff..8e840339 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -224,6 +224,13 @@ private void Form1_Load(object sender, EventArgs e) tamingControl1.selectedSpeciesIndex = -1; tamingControl1.selectedSpeciesIndex = 0; + int selectedSpecies = Values.V.speciesNames.IndexOf(Properties.Settings.Default.lastSpecies); + if (selectedSpecies >= 0) + { + comboBoxSpeciesExtractor.SelectedIndex = selectedSpecies; + cbbStatTestingSpecies.SelectedIndex = selectedSpecies; + } + clearAll(); // UI loaded @@ -752,6 +759,8 @@ private void cbbStatTestingRace_SelectedIndexChanged(object sender, EventArgs e) } updateAllTesterValues(); creatureInfoInputTester.SpeciesIndex = i; + statPotentials1.speciesIndex = i; + statPotentials1.setLevels(testingIOs.Select(s => s.LevelWild).ToArray(), true); } //breedingInfo1.displayData(i); setTesterInfoInputCreature(); @@ -1612,6 +1621,9 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e) Properties.Settings.Default.customStatWeights = custWd.ToArray(); Properties.Settings.Default.customStatWeightNames = custWs.ToArray(); + // save last selected species in combobox + Properties.Settings.Default.lastSpecies = comboBoxSpeciesExtractor.SelectedItem.ToString(); + // save settings for next session Properties.Settings.Default.Save(); @@ -2271,7 +2283,10 @@ private void statIOUpdateValue(StatIO sIo) labelTesterTotalLevel.Text = "Total Levels: " + (testingIOs[7].LevelWild + domLevels + 1) + "/" + (testingIOs[7].LevelWild + 1 + creatureCollection.maxDomLevel); creatureInfoInputTester.parentListValid = false; - radarChart1.setLevels(testingIOs.Select(s => s.LevelWild).ToArray()); + int[] levelsWild = testingIOs.Select(s => s.LevelWild).ToArray(); + if (!testingIOs[2].Enabled) levelsWild[2] = 0; + radarChart1.setLevels(levelsWild); + statPotentials1.setLevels(levelsWild, false); } private void onlinehelpToolStripMenuItem_Click(object sender, EventArgs e) @@ -2788,6 +2803,8 @@ private void applyLevelSettings() } breedingPlan1.maxWildLevels = creatureCollection.maxWildLevel; radarChart1.initializeVariables(creatureCollection.maxChartLevel); + statPotentials1.levelDomMax = creatureCollection.maxDomLevel; + statPotentials1.levelGraphMax = creatureCollection.maxChartLevel; } /// diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 97a3f437..502de4ce 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.20.12")] +[assembly: AssemblyFileVersion("0.21.0")] diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index a3c6927b..2dcc192a 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -199,5 +199,17 @@ public bool celsius { this["celsius"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string lastSpecies { + get { + return ((string)(this["lastSpecies"])); + } + set { + this["lastSpecies"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index 46a3259a..3650464b 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -47,5 +47,8 @@ True + + + \ No newline at end of file diff --git a/ARKBreedingStats/Settings.cs b/ARKBreedingStats/Settings.cs index 8d51dfbf..ee70ce48 100644 --- a/ARKBreedingStats/Settings.cs +++ b/ARKBreedingStats/Settings.cs @@ -44,6 +44,7 @@ private void initStuff() 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. Usually it's good to set this value to one third of the max wild level."); } private void loadSettings(CreatureCollection cc) diff --git a/ARKBreedingStats/uiControls/StatPotential.Designer.cs b/ARKBreedingStats/uiControls/StatPotential.Designer.cs new file mode 100644 index 00000000..92aed183 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotential.Designer.cs @@ -0,0 +1,100 @@ +namespace ARKBreedingStats +{ + partial class StatPotential + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.labelDomLevels = new System.Windows.Forms.Label(); + this.labelImprinting = new System.Windows.Forms.Label(); + this.labelWildLevels = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // labelDomLevels + // + this.labelDomLevels.BackColor = System.Drawing.Color.Gold; + this.labelDomLevels.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.labelDomLevels.Location = new System.Drawing.Point(286, 0); + this.labelDomLevels.Name = "labelDomLevels"; + this.labelDomLevels.Size = new System.Drawing.Size(92, 23); + this.labelDomLevels.TabIndex = 3; + this.labelDomLevels.Text = "label3"; + this.labelDomLevels.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // labelImprinting + // + this.labelImprinting.BackColor = System.Drawing.Color.SkyBlue; + this.labelImprinting.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.labelImprinting.Location = new System.Drawing.Point(165, 0); + this.labelImprinting.Name = "labelImprinting"; + this.labelImprinting.Size = new System.Drawing.Size(115, 23); + this.labelImprinting.TabIndex = 2; + this.labelImprinting.Text = "label2"; + this.labelImprinting.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // labelWildLevels + // + this.labelWildLevels.BackColor = System.Drawing.Color.LightCoral; + this.labelWildLevels.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.labelWildLevels.Location = new System.Drawing.Point(31, 0); + this.labelWildLevels.Name = "labelWildLevels"; + this.labelWildLevels.Size = new System.Drawing.Size(128, 23); + this.labelWildLevels.TabIndex = 1; + this.labelWildLevels.Text = "label1"; + this.labelWildLevels.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 5); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(22, 13); + this.label1.TabIndex = 4; + this.label1.Text = "HP"; + // + // StatPotential + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label1); + this.Controls.Add(this.labelDomLevels); + this.Controls.Add(this.labelImprinting); + this.Controls.Add(this.labelWildLevels); + this.Name = "StatPotential"; + this.Size = new System.Drawing.Size(386, 24); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label labelWildLevels; + private System.Windows.Forms.Label labelDomLevels; + private System.Windows.Forms.Label labelImprinting; + private System.Windows.Forms.Label label1; + } +} diff --git a/ARKBreedingStats/uiControls/StatPotential.cs b/ARKBreedingStats/uiControls/StatPotential.cs new file mode 100644 index 00000000..09af3e5f --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotential.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats +{ + public partial class StatPotential : UserControl + { + private int statIndex; + public int maxDomLevel; + public int levelGraphMax; + private bool percent; + + public StatPotential() + { + InitializeComponent(); + } + public StatPotential(int stat, bool percent) + { + InitializeComponent(); + statIndex = stat; + this.percent = percent; + label1.Text = Utils.statName(stat, true); + } + + public void setLevels(int speciesIndex, int wildLevel) + { + if (levelGraphMax > 0) + { + SuspendLayout(); + labelWildLevels.Width = 60 + 68 * (wildLevel > levelGraphMax ? levelGraphMax : wildLevel) / levelGraphMax; + labelImprinting.Width = 60; + labelDomLevels.Width = 60; + labelImprinting.Location = new Point(33 + labelWildLevels.Width, 0); + labelDomLevels.Location = new Point(35 + labelWildLevels.Width + labelImprinting.Width, 0); + + labelWildLevels.Text = (Stats.calculateValue(speciesIndex, statIndex, wildLevel, 0, true, 1, 0) * (percent ? 100 : 1)).ToString() + (percent ? "%" : ""); + labelImprinting.Text = (Stats.calculateValue(speciesIndex, statIndex, wildLevel, 0, true, 1, 1) * (percent ? 100 : 1)).ToString() + (percent ? "%" : ""); + labelDomLevels.Text = (Stats.calculateValue(speciesIndex, statIndex, wildLevel, maxDomLevel, true, 1, 1) * (percent ? 100 : 1)).ToString() + (percent ? "%" : ""); + ResumeLayout(); + } + } + } +} diff --git a/ARKBreedingStats/uiControls/StatPotential.resx b/ARKBreedingStats/uiControls/StatPotential.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotential.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/StatPotentials.Designer.cs b/ARKBreedingStats/uiControls/StatPotentials.Designer.cs new file mode 100644 index 00000000..d92ee56e --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotentials.Designer.cs @@ -0,0 +1,115 @@ +namespace ARKBreedingStats.uiControls +{ + partial class StatPotentials + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StatPotentials)); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(0, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(295, 361); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Stat-Potentials"; + // + // label3 + // + this.label3.BackColor = System.Drawing.Color.Gold; + this.label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label3.Location = new System.Drawing.Point(206, 28); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(80, 23); + this.label3.TabIndex = 3; + this.label3.Text = "Dom-Leveling"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label2 + // + this.label2.BackColor = System.Drawing.Color.SkyBlue; + this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label2.Location = new System.Drawing.Point(120, 28); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(80, 23); + this.label2.TabIndex = 2; + this.label2.Text = "Imprinting"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.LightCoral; + this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.label1.Location = new System.Drawing.Point(34, 28); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(80, 23); + this.label1.TabIndex = 1; + this.label1.Text = "Wild-Levels"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(0, 304); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(295, 56); + this.label4.TabIndex = 4; + this.label4.Text = resources.GetString("label4.Text"); + // + // StatPotentials + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox1); + this.Name = "StatPotentials"; + this.Size = new System.Drawing.Size(295, 361); + this.groupBox1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label4; + } +} diff --git a/ARKBreedingStats/uiControls/StatPotentials.cs b/ARKBreedingStats/uiControls/StatPotentials.cs new file mode 100644 index 00000000..ac9c9d0e --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotentials.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + public partial class StatPotentials : UserControl + { + private List stats; + public int speciesIndex; + private int[] oldLevels; + + public StatPotentials() + { + InitializeComponent(); + + stats = new List(); + StatPotential stat; + for (int s = 0; s < 8; s++) + { + stat = new StatPotential(s, Utils.precision(s) == 3); + groupBox1.Controls.Add(stat); + stat.Location = new Point(3, 58 + s * 30); + stats.Add(stat); + } + oldLevels = new int[8]; + } + + public void setLevels(int[] levelsWild, bool forceUpdate) + { + SuspendLayout(); + for (int s = 0; s < 8; s++) + { + if (forceUpdate || oldLevels[s] != levelsWild[s]) + { + oldLevels[s] = levelsWild[s]; + stats[s].setLevels(speciesIndex, levelsWild[s]); + } + } + ResumeLayout(); + } + + public int levelDomMax + { + set + { + for (int s = 0; s < 8; s++) + stats[s].maxDomLevel = value; + } + } + + public int levelGraphMax + { + set + { + for (int s = 0; s < 8; s++) + stats[s].levelGraphMax = value; + } + } + } +} diff --git a/ARKBreedingStats/uiControls/StatPotentials.resx b/ARKBreedingStats/uiControls/StatPotentials.resx new file mode 100644 index 00000000..900871e8 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatPotentials.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Shows the potential of each stat with the given wild levels. The blue rectangle shows the base-value after 100% imprinting, the yellow rectangle shows the value when all available domesticated levels are spend in this particular stat. + + \ No newline at end of file diff --git a/ARKBreedingStats/ver.txt b/ARKBreedingStats/ver.txt index 74f0a566..f64ece55 100644 --- a/ARKBreedingStats/ver.txt +++ b/ARKBreedingStats/ver.txt @@ -1 +1 @@ -2540000,0.20.11.2 \ No newline at end of file +2540000,0.21.0 \ No newline at end of file