From 9fe38cf2528a6158a58461cf539ddb4cafe7a9d6 Mon Sep 17 00:00:00 2001 From: cadaei Date: Mon, 26 Mar 2018 01:23:30 +0200 Subject: [PATCH] if file is not saveable (e.g. in use by another application like a cloud-service), it will not now try again after a while. the extractor now shows if a level is top or even better. added inputs for multiple preset savegame-files for one-click extraction&import. fixed another rounding-issue with imprinted creatures. added import of exported creatures. added color-selection to creatureInput. fixed issue with overlay that prevented extracted levels to disappear. fixed issue with camelCase species-names (#651). --- ARKBreedingStats/ARKBreedingStats.csproj | 38 + ARKBreedingStats/ARKOverlay.cs | 4 + ARKBreedingStats/App.config | 6 +- ARKBreedingStats/BreedingPlan.cs | 34 +- ARKBreedingStats/Creature.cs | 1 + ARKBreedingStats/CreatureBox.Designer.cs | 111 +- ARKBreedingStats/CreatureBox.cs | 91 +- ARKBreedingStats/CreatureColored.cs | 12 +- .../CreatureInfoInput.Designer.cs | 194 ++- ARKBreedingStats/CreatureInfoInput.cs | 80 +- .../ExportedCreatureList.Designer.cs | 88 ++ ARKBreedingStats/ExportedCreatureList.cs | 67 + ARKBreedingStats/ExportedCreatureList.resx | 123 ++ ARKBreedingStats/Extraction.cs | 8 +- ARKBreedingStats/FileSync.cs | 10 +- ARKBreedingStats/Form1.Designer.cs | 1196 +++++++++-------- ARKBreedingStats/Form1.cs | 320 +++-- ARKBreedingStats/ImportExported.cs | 154 +++ ARKBreedingStats/Importer.cs | 18 +- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- .../Properties/Settings.Designer.cs | 19 +- ARKBreedingStats/Properties/Settings.settings | 5 +- ARKBreedingStats/SpeciesSelector.cs | 26 +- ARKBreedingStats/StatIO.cs | 24 +- ARKBreedingStats/Stats.cs | 4 +- ARKBreedingStats/Utils.cs | 87 +- ARKBreedingStats/Values.cs | 2 +- ARKBreedingStats/json/classicFlyers.json | 2 +- ARKBreedingStats/ocr/ArkOCR.cs | 1 - .../settings/Settings.Designer.cs | 260 ++-- ARKBreedingStats/settings/Settings.cs | 95 +- ARKBreedingStats/settings/Settings.resx | 6 + ARKBreedingStats/species/CreatureColors.cs | 104 ++ ARKBreedingStats/species/CreatureValues.cs | 5 +- .../testCases/ExtractionTestControl.cs | 2 +- .../ExportedCreatureControl.Designer.cs | 86 ++ .../uiControls/ExportedCreatureControl.cs | 49 + .../uiControls/ExportedCreatureControl.resx | 120 ++ .../uiControls/FileSelector.Designer.cs | 87 ++ ARKBreedingStats/uiControls/FileSelector.cs | 102 ++ ARKBreedingStats/uiControls/FileSelector.resx | 120 ++ ARKBreedingStats/uiControls/MultiSetter.cs | 2 +- ARKBreedingStats/uiControls/MyColorPicker.cs | 4 +- .../uiControls/RegionColorChooser.Designer.cs | 138 ++ .../uiControls/RegionColorChooser.cs | 128 ++ .../uiControls/RegionColorChooser.resx | 120 ++ ARKBreedingStats/uiControls/TagSelector.cs | 1 - ARKBreedingStats/ver.txt | 2 +- 48 files changed, 2906 insertions(+), 1252 deletions(-) create mode 100644 ARKBreedingStats/ExportedCreatureList.Designer.cs create mode 100644 ARKBreedingStats/ExportedCreatureList.cs create mode 100644 ARKBreedingStats/ExportedCreatureList.resx create mode 100644 ARKBreedingStats/ImportExported.cs create mode 100644 ARKBreedingStats/species/CreatureColors.cs create mode 100644 ARKBreedingStats/uiControls/ExportedCreatureControl.Designer.cs create mode 100644 ARKBreedingStats/uiControls/ExportedCreatureControl.cs create mode 100644 ARKBreedingStats/uiControls/ExportedCreatureControl.resx create mode 100644 ARKBreedingStats/uiControls/FileSelector.Designer.cs create mode 100644 ARKBreedingStats/uiControls/FileSelector.cs create mode 100644 ARKBreedingStats/uiControls/FileSelector.resx create mode 100644 ARKBreedingStats/uiControls/RegionColorChooser.Designer.cs create mode 100644 ARKBreedingStats/uiControls/RegionColorChooser.cs create mode 100644 ARKBreedingStats/uiControls/RegionColorChooser.resx diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index ef341985..36da73a4 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -60,6 +60,14 @@ AboutBox1.cs + + Form + + + ExportedCreatureList.cs + + + @@ -194,6 +202,18 @@ dhmsInput.cs + + UserControl + + + ExportedCreatureControl.cs + + + UserControl + + + FileSelector.cs + UserControl @@ -210,6 +230,12 @@ PatternEditor.cs + + UserControl + + + RegionColorChooser.cs + Component @@ -357,6 +383,9 @@ ARKOverlay.cs + + ExportedCreatureList.cs + NotesControl.cs @@ -393,12 +422,21 @@ dhmsInput.cs + + ExportedCreatureControl.cs + + + FileSelector.cs + MultiSetterTag.cs PatternEditor.cs + + RegionColorChooser.cs + StatPotential.cs diff --git a/ARKBreedingStats/ARKOverlay.cs b/ARKBreedingStats/ARKOverlay.cs index 6a90f8a5..6e99da91 100644 --- a/ARKBreedingStats/ARKOverlay.cs +++ b/ARKBreedingStats/ARKOverlay.cs @@ -86,6 +86,10 @@ public bool enableInventoryCheckTimer inventoryCheckTimerEnabled = value; inventoryCheckTimer.Enabled = value && timerUpdateTimer.Enabled; } + get + { + return inventoryCheckTimerEnabled; + } } public bool enableOverlayTimers diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index a73ca8b0..5ad69a5f 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -94,9 +94,6 @@ True - - - @@ -115,6 +112,9 @@ + + + diff --git a/ARKBreedingStats/BreedingPlan.cs b/ARKBreedingStats/BreedingPlan.cs index 0ef6bdf3..423fcd0a 100644 --- a/ARKBreedingStats/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlan.cs @@ -6,6 +6,7 @@ using System.Windows.Forms; using ARKBreedingStats.species; using System.Threading; +using System.Threading.Tasks; namespace ARKBreedingStats { @@ -31,6 +32,7 @@ public partial class BreedingPlan : UserControl public StatWeighting statWeighting; public bool breedingPlanNeedsUpdate; public CreatureCollection creatureCollection; + CancellationTokenSource cancelSource; public BreedingPlan() { @@ -56,7 +58,7 @@ public BreedingPlan() tt.SetToolTip(radioButtonBPHighStats, "Check for best next-generation-results.\nThe chance for an overall good creature is better.\nCheck if it's not important to have a Top-Stats-Offspring."); tt.SetToolTip(buttonJustMated, "Click to create an incubation-entry in the Raising-tab"); tt.SetToolTip(nudMutationLimit, "Consider only creatures with at most this many mutations.\nSet to -1 for any number of mutation."); - tt.SetToolTip(cbTagExcludeDefault, "Check if all creatures should be excluded and only be included when have the include-mark on their tag.\nIf this checkbox is unchecked, all creatures will be included by default."); + tt.SetToolTip(cbTagExcludeDefault, "Check if all creatures should be excluded and only be included when have the include-mark on their tag.\nIf this checkbox is unchecked, all creatures will be included by default, and only excluded if one of their tags has the exclude-mark and none has the include-mark."); statWeighting = statWeighting1; breedingPlanNeedsUpdate = false; @@ -113,7 +115,7 @@ public void determineBestBreeding(Creature chosenCreature = null, bool forceUpda bm = BreedingMode.BestNextGen; this.chosenCreature = chosenCreature; - drawBestParents(bm, newSpecies); + calculateBreedingScoresAndDisplayPairs(bm, newSpecies); breedingPlanNeedsUpdate = false; } @@ -162,7 +164,25 @@ public List filterByTags(List cl) } } - public void drawBestParents(BreedingMode breedingMode, bool updateBreedingData = false) + public async void calculateBreedingScoresAndDisplayPairs(BreedingMode breedingMode, bool updateBreedingData = false) + { + cancelSource?.Cancel(); + using (cancelSource = new CancellationTokenSource()) + { + try + { + await Task.Delay(400, cancelSource.Token); // recalculate breedingplan at most a certain interval + AsyncCalculateBreedingScoresAndDisplayPairs(breedingMode, updateBreedingData); + } + catch (TaskCanceledException) + { + return; + } + } + cancelSource = null; + } + + private void AsyncCalculateBreedingScoresAndDisplayPairs(BreedingMode breedingMode, bool updateBreedingData = false) { SuspendLayout(); Cursor.Current = Cursors.WaitCursor; @@ -194,7 +214,7 @@ public void drawBestParents(BreedingMode breedingMode, bool updateBreedingData = breedingPairs.Clear(); double t = 0, tt = 0, eTS; - int o = 0, nrTS; + int nrTS; Int16[] bestPossLevels = new Int16[7]; // best possible levels foreach (Creature female in choosenF) @@ -723,19 +743,19 @@ private void nudMutationLimit_ValueChanged(object sender, EventArgs e) private void radioButtonBPTopStatsCn_CheckedChanged(object sender, EventArgs e) { if (radioButtonBPTopStatsCn.Checked) - drawBestParents(BreedingMode.TopStatsConservative); + calculateBreedingScoresAndDisplayPairs(BreedingMode.TopStatsConservative); } private void radioButtonBPTopStats_CheckedChanged(object sender, EventArgs e) { if (radioButtonBPTopStats.Checked) - drawBestParents(BreedingMode.TopStatsLucky); + calculateBreedingScoresAndDisplayPairs(BreedingMode.TopStatsLucky); } private void radioButtonBPHighStats_CheckedChanged(object sender, EventArgs e) { if (radioButtonBPHighStats.Checked) - drawBestParents(BreedingMode.BestNextGen); + calculateBreedingScoresAndDisplayPairs(BreedingMode.BestNextGen); } public void setSpeciesList(List speciesNames, List creatures) diff --git a/ARKBreedingStats/Creature.cs b/ARKBreedingStats/Creature.cs index 73e8e9bb..8d46f2e6 100644 --- a/ARKBreedingStats/Creature.cs +++ b/ARKBreedingStats/Creature.cs @@ -32,6 +32,7 @@ public class Creature : IEquatable [XmlIgnore] public Int16 topness; // permille of mean of wildlevels compared to toplevels public string owner = ""; + public string imprinterName = ""; // todo implement in creatureInfoInbox public string tribe = ""; public string server = ""; public string note; // user defined note about that creature diff --git a/ARKBreedingStats/CreatureBox.Designer.cs b/ARKBreedingStats/CreatureBox.Designer.cs index 374fc026..9a77a2c6 100644 --- a/ARKBreedingStats/CreatureBox.Designer.cs +++ b/ARKBreedingStats/CreatureBox.Designer.cs @@ -29,15 +29,11 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.regionColorChooser1 = new ARKBreedingStats.uiControls.RegionColorChooser(); this.labelSpecies = new System.Windows.Forms.Label(); - this.buttonColor6 = new System.Windows.Forms.Button(); - this.buttonColor5 = new System.Windows.Forms.Button(); - this.buttonColor4 = new System.Windows.Forms.Button(); - this.buttonColor3 = new System.Windows.Forms.Button(); - this.buttonColor2 = new System.Windows.Forms.Button(); - this.buttonColor1 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.Panel(); + this.buttonEditMore = new System.Windows.Forms.Button(); this.buttonStatus = new System.Windows.Forms.Button(); this.checkBoxIsBred = new System.Windows.Forms.CheckBox(); this.numericUpDown7 = new System.Windows.Forms.NumericUpDown(); @@ -82,7 +78,6 @@ private void InitializeComponent() this.statDisplayOx = new ARKBreedingStats.StatDisplay(); this.statDisplaySt = new ARKBreedingStats.StatDisplay(); this.statDisplayHP = new ARKBreedingStats.StatDisplay(); - this.buttonEditMore = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel1.SuspendLayout(); @@ -98,13 +93,8 @@ private void InitializeComponent() // // groupBox1 // + this.groupBox1.Controls.Add(this.regionColorChooser1); this.groupBox1.Controls.Add(this.labelSpecies); - this.groupBox1.Controls.Add(this.buttonColor6); - this.groupBox1.Controls.Add(this.buttonColor5); - this.groupBox1.Controls.Add(this.buttonColor4); - this.groupBox1.Controls.Add(this.buttonColor3); - this.groupBox1.Controls.Add(this.buttonColor2); - this.groupBox1.Controls.Add(this.buttonColor1); this.groupBox1.Controls.Add(this.pictureBox1); this.groupBox1.Controls.Add(this.panel1); this.groupBox1.Controls.Add(this.labelNotes); @@ -128,6 +118,14 @@ private void InitializeComponent() this.groupBox1.TabStop = false; this.groupBox1.Text = "Creature"; // + // regionColorChooser1 + // + this.regionColorChooser1.Location = new System.Drawing.Point(134, 292); + this.regionColorChooser1.Margin = new System.Windows.Forms.Padding(0); + this.regionColorChooser1.Name = "regionColorChooser1"; + this.regionColorChooser1.Size = new System.Drawing.Size(58, 88); + this.regionColorChooser1.TabIndex = 27; + // // labelSpecies // this.labelSpecies.AutoSize = true; @@ -136,66 +134,6 @@ private void InitializeComponent() this.labelSpecies.Size = new System.Drawing.Size(0, 13); this.labelSpecies.TabIndex = 26; // - // buttonColor6 - // - this.buttonColor6.Location = new System.Drawing.Point(166, 350); - this.buttonColor6.Name = "buttonColor6"; - this.buttonColor6.Size = new System.Drawing.Size(23, 23); - this.buttonColor6.TabIndex = 25; - this.buttonColor6.Text = "5"; - this.buttonColor6.UseVisualStyleBackColor = true; - this.buttonColor6.Click += new System.EventHandler(this.buttonColor6_Click); - // - // buttonColor5 - // - this.buttonColor5.Location = new System.Drawing.Point(140, 350); - this.buttonColor5.Name = "buttonColor5"; - this.buttonColor5.Size = new System.Drawing.Size(23, 23); - this.buttonColor5.TabIndex = 24; - this.buttonColor5.Text = "4"; - this.buttonColor5.UseVisualStyleBackColor = true; - this.buttonColor5.Click += new System.EventHandler(this.buttonColor5_Click); - // - // buttonColor4 - // - this.buttonColor4.Location = new System.Drawing.Point(166, 321); - this.buttonColor4.Name = "buttonColor4"; - this.buttonColor4.Size = new System.Drawing.Size(23, 23); - this.buttonColor4.TabIndex = 23; - this.buttonColor4.Text = "3"; - this.buttonColor4.UseVisualStyleBackColor = true; - this.buttonColor4.Click += new System.EventHandler(this.buttonColor4_Click); - // - // buttonColor3 - // - this.buttonColor3.Location = new System.Drawing.Point(140, 321); - this.buttonColor3.Name = "buttonColor3"; - this.buttonColor3.Size = new System.Drawing.Size(23, 23); - this.buttonColor3.TabIndex = 22; - this.buttonColor3.Text = "2"; - this.buttonColor3.UseVisualStyleBackColor = true; - this.buttonColor3.Click += new System.EventHandler(this.buttonColor3_Click); - // - // buttonColor2 - // - this.buttonColor2.Location = new System.Drawing.Point(166, 292); - this.buttonColor2.Name = "buttonColor2"; - this.buttonColor2.Size = new System.Drawing.Size(23, 23); - this.buttonColor2.TabIndex = 21; - this.buttonColor2.Text = "1"; - this.buttonColor2.UseVisualStyleBackColor = true; - this.buttonColor2.Click += new System.EventHandler(this.buttonColor2_Click); - // - // buttonColor1 - // - this.buttonColor1.Location = new System.Drawing.Point(140, 292); - this.buttonColor1.Name = "buttonColor1"; - this.buttonColor1.Size = new System.Drawing.Size(23, 23); - this.buttonColor1.TabIndex = 20; - this.buttonColor1.Text = "0"; - this.buttonColor1.UseVisualStyleBackColor = true; - this.buttonColor1.Click += new System.EventHandler(this.buttonColor1_Click); - // // pictureBox1 // this.pictureBox1.Location = new System.Drawing.Point(6, 252); @@ -240,6 +178,16 @@ private void InitializeComponent() this.panel1.TabIndex = 15; this.panel1.Visible = false; // + // buttonEditMore + // + this.buttonEditMore.Location = new System.Drawing.Point(6, 177); + this.buttonEditMore.Name = "buttonEditMore"; + this.buttonEditMore.Size = new System.Drawing.Size(63, 23); + this.buttonEditMore.TabIndex = 49; + this.buttonEditMore.Text = "Edit more"; + this.buttonEditMore.UseVisualStyleBackColor = true; + this.buttonEditMore.Click += new System.EventHandler(this.buttonEditMore_Click); + // // buttonStatus // this.buttonStatus.Location = new System.Drawing.Point(40, 205); @@ -649,16 +597,6 @@ private void InitializeComponent() this.statDisplayHP.Size = new System.Drawing.Size(183, 20); this.statDisplayHP.TabIndex = 0; // - // buttonEditMore - // - this.buttonEditMore.Location = new System.Drawing.Point(6, 177); - this.buttonEditMore.Name = "buttonEditMore"; - this.buttonEditMore.Size = new System.Drawing.Size(63, 23); - this.buttonEditMore.TabIndex = 49; - this.buttonEditMore.Text = "Edit more"; - this.buttonEditMore.UseVisualStyleBackColor = true; - this.buttonEditMore.Click += new System.EventHandler(this.buttonEditMore_Click); - // // CreatureBox // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -731,15 +669,10 @@ private void InitializeComponent() private System.Windows.Forms.Label labelNotes; private System.Windows.Forms.Button buttonStatus; private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Button buttonColor1; - private System.Windows.Forms.Button buttonColor6; - private System.Windows.Forms.Button buttonColor5; - private System.Windows.Forms.Button buttonColor4; - private System.Windows.Forms.Button buttonColor3; - private System.Windows.Forms.Button buttonColor2; private ParentComboBox parentComboBoxFather; private ParentComboBox parentComboBoxMother; private System.Windows.Forms.Label labelSpecies; private System.Windows.Forms.Button buttonEditMore; + private uiControls.RegionColorChooser regionColorChooser1; } } diff --git a/ARKBreedingStats/CreatureBox.cs b/ARKBreedingStats/CreatureBox.cs index 9551ad7f..15765220 100644 --- a/ARKBreedingStats/CreatureBox.cs +++ b/ARKBreedingStats/CreatureBox.cs @@ -24,9 +24,6 @@ public partial class CreatureBox : UserControl private CreatureStatus status; public List[] parentList; // all creatures that could be parents (i.e. same species, separated by sex) public List[] parentListSimilarity; // for all possible parents the number of equal stats (to find the parents easier) - private MyColorPicker cp; - private Button[] colorButtons; - private List colorRegions; private bool[] colorRegionUseds; private Image largeImage; private bool renewLargeImage; @@ -55,9 +52,9 @@ private void initializeVars() stats[5].Percent = true; stats[6].Percent = true; statDisplayTo.ShowBars = false; - colorButtons = new Button[] { buttonColor1, buttonColor2, buttonColor3, buttonColor4, buttonColor5, buttonColor6 }; parentComboBoxMother.naLabel = "- Mother n/a"; parentComboBoxFather.naLabel = "- Father n/a"; + regionColorChooser1.RegionColorChosen += RegionColorChooser1_RegionColorChosen; // tooltips tt.SetToolTip(this.labelHeaderDomLevelSet, "Set the spend domesticated Levels here"); @@ -70,26 +67,14 @@ private void initializeVars() tt.SetToolTip(labelParents, "Mother and Father (if bred and choosen)"); tt.SetToolTip(buttonSex, "Sex"); tt.SetToolTip(buttonStatus, "Status: Available, Unavailable, Dead"); - cp = new MyColorPicker(); } public void setCreature(Creature creature) { Clear(); this.creature = creature; - int si = Values.V.speciesNames.IndexOf(creature.species); - if (si >= 0 && Values.V.species[si].colors != null) - colorRegions = Values.V.species[si].colors; - else - { - colorRegions = new List(); - for (int i = 0; i < 6; i++) - { - colorRegions.Add(new ColorRegion()); - colorRegions[i].name = "n/a"; - } - } - colorRegionUseds = colorRegions.Select(c => c.name != null).ToArray(); + regionColorChooser1.setCreature(creature.species, creature.colors); + colorRegionUseds = regionColorChooser1.ColorRegionsUseds; bool glowSpecies = Values.V.glowSpecies.Contains(creature.species); for (int s = 0; s < 8; s++) @@ -196,20 +181,6 @@ public void updateLabel() labelSpecies.Text = creature.species; pictureBox1.Image = CreatureColored.getColoredCreature(creature.colors, creature.species, colorRegionUseds); pictureBox1.Visible = true; - - for (int c = 0; c < 6; c++) - { - if (colorRegionUseds[c]) - { - setColorButton(colorButtons[c], Utils.creatureColor(creature.colors[c])); - tt.SetToolTip(colorButtons[c], colorRegions[c].name); - colorButtons[c].Visible = true; - } - else - { - colorButtons[c].Visible = false; - } - } } } @@ -275,8 +246,7 @@ public void Clear() stats[s].setNumbers(0, 0, 0, 0); } pictureBox1.Visible = false; - for (int b = 0; b < 6; b++) - colorButtons[b].Visible = false; + regionColorChooser1.Clear(); } private void button1_Click(object sender, EventArgs e) @@ -308,56 +278,11 @@ private void checkBoxIsBred_CheckedChanged(object sender, EventArgs e) populateParentsList(); } - private void buttonColor1_Click(object sender, EventArgs e) + private void RegionColorChooser1_RegionColorChosen() { - chooseColor(0, buttonColor1); - } - - private void buttonColor2_Click(object sender, EventArgs e) - { - chooseColor(1, buttonColor2); - } - - private void buttonColor3_Click(object sender, EventArgs e) - { - chooseColor(2, buttonColor3); - } - - private void buttonColor4_Click(object sender, EventArgs e) - { - chooseColor(3, buttonColor4); - } - - private void buttonColor5_Click(object sender, EventArgs e) - { - chooseColor(4, buttonColor5); - } - - private void buttonColor6_Click(object sender, EventArgs e) - { - chooseColor(5, buttonColor6); - } - - private void chooseColor(int region, Button sender) - { - if (creature != null && !cp.isShown) - { - cp.SetColors(creature.colors, region, colorRegions[region].name, colorRegions[region].colorIds); - if (cp.ShowDialog() == DialogResult.OK) - { - // color was chosen - setColorButton(sender, Utils.creatureColor(creature.colors[region])); - pictureBox1.Image = CreatureColored.getColoredCreature(creature.colors, creature.species, colorRegionUseds); - renewLargeImage = true; - Changed(creature, false); - } - } - } - - private void setColorButton(Button bt, Color cl) - { - bt.BackColor = cl; - bt.ForeColor = Utils.foreColor(cl); + pictureBox1.Image = CreatureColored.getColoredCreature(creature.colors, creature.species, colorRegionUseds); + renewLargeImage = true; + Changed(creature, false); } private void pictureBox1_Click(object sender, EventArgs e) diff --git a/ARKBreedingStats/CreatureColored.cs b/ARKBreedingStats/CreatureColored.cs index 57c88bd1..1440f0e0 100644 --- a/ARKBreedingStats/CreatureColored.cs +++ b/ARKBreedingStats/CreatureColored.cs @@ -1,10 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ARKBreedingStats.species; +using System; using System.Drawing; using System.Drawing.Drawing2D; +using System.Linq; namespace ARKBreedingStats { @@ -16,7 +14,7 @@ public static Bitmap getColoredCreature(int[] colorIds, string species, bool[] e int[][] rgb = new int[6][]; for (int c = 0; c < 6; c++) { - Color cl = Utils.creatureColor(colorIds[c]); + Color cl = CreatureColors.creatureColor(colorIds[c]); rgb[c] = new int[] { cl.R, cl.G, cl.B }; } Bitmap bm = new Bitmap(size, size); @@ -129,7 +127,7 @@ public static Bitmap getColoredCreature(int[] colorIds, string species, bool[] e { if (colorIds[c] > 0) { - b = new SolidBrush(Utils.creatureColor(colorIds[c])); + b = new SolidBrush(CreatureColors.creatureColor(colorIds[c])); graph.FillPie(b, (size - pieSize) / 2, (size - pieSize) / 2, pieSize, pieSize, pieNr * pieAngle + 270, pieAngle); } pieNr++; diff --git a/ARKBreedingStats/CreatureInfoInput.Designer.cs b/ARKBreedingStats/CreatureInfoInput.Designer.cs index 3e331d9f..de1de821 100644 --- a/ARKBreedingStats/CreatureInfoInput.Designer.cs +++ b/ARKBreedingStats/CreatureInfoInput.Designer.cs @@ -29,17 +29,21 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.nudMutationsFather = new ARKBreedingStats.uiControls.Nud(); + this.nudMutationsMother = new ARKBreedingStats.uiControls.Nud(); + this.label12 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.cbServer = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); this.btnGenerateUniqueName = new System.Windows.Forms.Button(); this.textBoxTribe = new System.Windows.Forms.TextBox(); this.lblTribe = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.labelMutations = new System.Windows.Forms.Label(); - this.numericUpDownMutations = new System.Windows.Forms.NumericUpDown(); - this.labelGrownPercent = new System.Windows.Forms.Label(); this.dhmsInputGrown = new ARKBreedingStats.uiControls.dhmsInput(); this.dhmsInputCooldown = new ARKBreedingStats.uiControls.dhmsInput(); - this.numericUpDownWeight = new System.Windows.Forms.NumericUpDown(); + this.nudMaturation = new ARKBreedingStats.uiControls.Nud(); this.label7 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.checkBoxNeutered = new System.Windows.Forms.CheckBox(); @@ -60,15 +64,22 @@ private void InitializeComponent() this.lblName = new System.Windows.Forms.Label(); this.textBoxName = new System.Windows.Forms.TextBox(); this.buttonAdd2Library = new System.Windows.Forms.Button(); - this.label10 = new System.Windows.Forms.Label(); - this.cbServer = new System.Windows.Forms.ComboBox(); + this.regionColorChooser1 = new ARKBreedingStats.uiControls.RegionColorChooser(); + this.label13 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMutations)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMutationsFather)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMutationsMother)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaturation)).BeginInit(); this.SuspendLayout(); // // groupBox1 // + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.regionColorChooser1); + this.groupBox1.Controls.Add(this.nudMutationsFather); + this.groupBox1.Controls.Add(this.nudMutationsMother); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.cbServer); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.btnGenerateUniqueName); @@ -77,11 +88,9 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.label9); this.groupBox1.Controls.Add(this.label8); this.groupBox1.Controls.Add(this.labelMutations); - this.groupBox1.Controls.Add(this.numericUpDownMutations); - this.groupBox1.Controls.Add(this.labelGrownPercent); this.groupBox1.Controls.Add(this.dhmsInputGrown); this.groupBox1.Controls.Add(this.dhmsInputCooldown); - this.groupBox1.Controls.Add(this.numericUpDownWeight); + this.groupBox1.Controls.Add(this.nudMaturation); this.groupBox1.Controls.Add(this.label7); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.checkBoxNeutered); @@ -105,12 +114,74 @@ private void InitializeComponent() 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(229, 408); + this.groupBox1.Size = new System.Drawing.Size(229, 438); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Creature-info"; this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); // + // nudMutationsFather + // + this.nudMutationsFather.Location = new System.Drawing.Point(162, 282); + this.nudMutationsFather.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.nudMutationsFather.Name = "nudMutationsFather"; + this.nudMutationsFather.Size = new System.Drawing.Size(60, 20); + this.nudMutationsFather.TabIndex = 32; + // + // nudMutationsMother + // + this.nudMutationsMother.Location = new System.Drawing.Point(80, 282); + this.nudMutationsMother.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.nudMutationsMother.Name = "nudMutationsMother"; + this.nudMutationsMother.Size = new System.Drawing.Size(60, 20); + this.nudMutationsMother.TabIndex = 10; + this.nudMutationsMother.ValueChanged += new System.EventHandler(this.numericUpDownMutations_ValueChanged); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(147, 284); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(15, 13); + this.label12.TabIndex = 34; + this.label12.Text = "♂"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(65, 284); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(13, 13); + this.label11.TabIndex = 33; + this.label11.Text = "♀"; + // + // cbServer + // + this.cbServer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.cbServer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.cbServer.FormattingEnabled = true; + this.cbServer.Location = new System.Drawing.Point(50, 97); + this.cbServer.Name = "cbServer"; + this.cbServer.Size = new System.Drawing.Size(172, 21); + this.cbServer.TabIndex = 31; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(6, 100); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(38, 13); + this.label10.TabIndex = 30; + this.label10.Text = "Server"; + // // btnGenerateUniqueName // this.btnGenerateUniqueName.Location = new System.Drawing.Point(200, 19); @@ -170,28 +241,6 @@ private void InitializeComponent() this.labelMutations.TabIndex = 25; this.labelMutations.Text = "Mutations"; // - // numericUpDownMutations - // - this.numericUpDownMutations.Location = new System.Drawing.Point(108, 282); - this.numericUpDownMutations.Maximum = new decimal(new int[] { - 999999, - 0, - 0, - 0}); - this.numericUpDownMutations.Name = "numericUpDownMutations"; - this.numericUpDownMutations.Size = new System.Drawing.Size(60, 20); - this.numericUpDownMutations.TabIndex = 10; - this.numericUpDownMutations.ValueChanged += new System.EventHandler(this.numericUpDownMutations_ValueChanged); - // - // labelGrownPercent - // - this.labelGrownPercent.AutoSize = true; - this.labelGrownPercent.Location = new System.Drawing.Point(189, 258); - this.labelGrownPercent.Name = "labelGrownPercent"; - this.labelGrownPercent.Size = new System.Drawing.Size(33, 13); - this.labelGrownPercent.TabIndex = 23; - this.labelGrownPercent.Text = "100%"; - // // dhmsInputGrown // this.dhmsInputGrown.Location = new System.Drawing.Point(86, 227); @@ -199,7 +248,7 @@ private void InitializeComponent() this.dhmsInputGrown.Size = new System.Drawing.Size(136, 26); this.dhmsInputGrown.TabIndex = 8; this.dhmsInputGrown.Timespan = System.TimeSpan.Parse("00:00:00"); - this.dhmsInputGrown.TextChanged += new System.EventHandler(this.dhmsInputGrown_TextChanged); + this.dhmsInputGrown.ValueChanged += new uiControls.dhmsInput.ValueChangedEventHandler(this.dhmsInputGrown_ValueChanged); // // dhmsInputCooldown // @@ -209,24 +258,20 @@ private void InitializeComponent() this.dhmsInputCooldown.TabIndex = 7; this.dhmsInputCooldown.Timespan = System.TimeSpan.Parse("00:00:00"); // - // numericUpDownWeight + // nudMaturation // - this.numericUpDownWeight.DecimalPlaces = 2; - this.numericUpDownWeight.Location = new System.Drawing.Point(107, 256); - this.numericUpDownWeight.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.numericUpDownWeight.Name = "numericUpDownWeight"; - this.numericUpDownWeight.Size = new System.Drawing.Size(76, 20); - this.numericUpDownWeight.TabIndex = 9; - this.numericUpDownWeight.Value = new decimal(new int[] { + this.nudMaturation.DecimalPlaces = 2; + this.nudMaturation.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudMaturation.Location = new System.Drawing.Point(89, 256); + this.nudMaturation.Name = "nudMaturation"; + this.nudMaturation.Size = new System.Drawing.Size(76, 20); + this.nudMaturation.TabIndex = 9; + this.nudMaturation.Value = new decimal(new int[] { 100, 0, 0, 0}); - this.numericUpDownWeight.ValueChanged += new System.EventHandler(this.numericUpDownWeight_ValueChanged); + this.nudMaturation.ValueChanged += new System.EventHandler(this.nudMaturation_ValueChanged); // // label7 // @@ -240,11 +285,11 @@ private void InitializeComponent() // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(23, 258); + this.label6.Location = new System.Drawing.Point(6, 258); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(78, 13); + this.label6.Size = new System.Drawing.Size(74, 13); this.label6.TabIndex = 22; - this.label6.Text = "Current Weight"; + this.label6.Text = "Maturation [%]"; // // checkBoxNeutered // @@ -287,7 +332,7 @@ private void InitializeComponent() // // buttonSaveChanges // - this.buttonSaveChanges.Location = new System.Drawing.Point(88, 362); + this.buttonSaveChanges.Location = new System.Drawing.Point(89, 395); this.buttonSaveChanges.Name = "buttonSaveChanges"; this.buttonSaveChanges.Size = new System.Drawing.Size(60, 37); this.buttonSaveChanges.TabIndex = 15; @@ -412,7 +457,7 @@ private void InitializeComponent() // // buttonAdd2Library // - this.buttonAdd2Library.Location = new System.Drawing.Point(88, 362); + this.buttonAdd2Library.Location = new System.Drawing.Point(89, 395); this.buttonAdd2Library.Name = "buttonAdd2Library"; this.buttonAdd2Library.Size = new System.Drawing.Size(134, 37); this.buttonAdd2Library.TabIndex = 16; @@ -420,24 +465,22 @@ private void InitializeComponent() this.buttonAdd2Library.UseVisualStyleBackColor = true; this.buttonAdd2Library.Click += new System.EventHandler(this.buttonAdd2Library_Click); // - // label10 + // regionColorChooser1 // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(6, 100); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(38, 13); - this.label10.TabIndex = 30; - this.label10.Text = "Server"; + this.regionColorChooser1.Location = new System.Drawing.Point(48, 363); + this.regionColorChooser1.Margin = new System.Windows.Forms.Padding(0); + this.regionColorChooser1.Name = "regionColorChooser1"; + this.regionColorChooser1.Size = new System.Drawing.Size(174, 29); + this.regionColorChooser1.TabIndex = 35; // - // cbServer + // label13 // - this.cbServer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.cbServer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.cbServer.FormattingEnabled = true; - this.cbServer.Location = new System.Drawing.Point(50, 97); - this.cbServer.Name = "cbServer"; - this.cbServer.Size = new System.Drawing.Size(172, 21); - this.cbServer.TabIndex = 31; + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(6, 371); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(36, 13); + this.label13.TabIndex = 36; + this.label13.Text = "Colors"; // // CreatureInfoInput // @@ -445,11 +488,12 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBox1); this.Name = "CreatureInfoInput"; - this.Size = new System.Drawing.Size(229, 408); + this.Size = new System.Drawing.Size(229, 438); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMutations)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMutationsFather)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMutationsMother)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaturation)).EndInit(); this.ResumeLayout(false); } @@ -477,11 +521,10 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxNeutered; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label6; - private System.Windows.Forms.NumericUpDown numericUpDownWeight; + private uiControls.Nud nudMaturation; private uiControls.dhmsInput dhmsInputGrown; private uiControls.dhmsInput dhmsInputCooldown; - private System.Windows.Forms.Label labelGrownPercent; - private System.Windows.Forms.NumericUpDown numericUpDownMutations; + private uiControls.Nud nudMutationsMother; private System.Windows.Forms.Label labelMutations; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; @@ -490,5 +533,10 @@ private void InitializeComponent() private System.Windows.Forms.Button btnGenerateUniqueName; private System.Windows.Forms.ComboBox cbServer; private System.Windows.Forms.Label label10; + private uiControls.Nud nudMutationsFather; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label13; + private uiControls.RegionColorChooser regionColorChooser1; } } diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index 2fa2e87d..6804a95b 100644 --- a/ARKBreedingStats/CreatureInfoInput.cs +++ b/ARKBreedingStats/CreatureInfoInput.cs @@ -23,10 +23,10 @@ public partial class CreatureInfoInput : UserControl public event RequestCreatureDataEventHandler CreatureDataRequested; public bool extractor; private Sex sex; + public Guid CreatureGuid; private CreatureStatus status; public bool parentListValid; private int speciesIndex; - public StatIO weightStat; private ToolTip tt = new ToolTip(); private bool mutationManuallyChanged; private bool updateMaturation; @@ -34,6 +34,7 @@ public partial class CreatureInfoInput : UserControl private List _males; private string[] _ownersTribes; public bool ownerLock, tribeLock; // if true the OCR will not change these fields + private int[] regionColorIDs; public CreatureInfoInput() { @@ -48,12 +49,13 @@ public CreatureInfoInput() tt.SetToolTip(buttonSex, "Sex"); tt.SetToolTip(buttonStatus, "Status"); tt.SetToolTip(dateTimePickerAdded, "Domesticated at"); - tt.SetToolTip(numericUpDownMutations, "Mutation-Counter"); + tt.SetToolTip(nudMutationsMother, "Mutation-Counter"); tt.SetToolTip(btnGenerateUniqueName, "Generate automatic name\nRight-click to edit the pattern."); tt.SetToolTip(lblOwner, "Click to toggle if the OCR can change the owner-field.\nEnable it if the OCR doesn't recognize the owner-name correctly and you want to add multiple creatures with the same owner."); tt.SetToolTip(lblTribe, "Click to toggle if the OCR can change the tribe-field.\nEnable it if the OCR doesn't recognize the tribe-name correctly and you want to add multiple creatures with the same tribe."); tt.SetToolTip(lblName, "Click to copy the name to the clipboard, e.g. for pasting it in the game."); updateMaturation = true; + regionColorIDs = new int[6]; } private void buttonAdd2Library_Click(object sender, EventArgs e) @@ -179,7 +181,7 @@ public bool ShowSaveButton set { buttonSaveChanges.Visible = value; - buttonAdd2Library.Location = new Point((value ? 154 : 88), 362); + buttonAdd2Library.Location = new Point((value ? 154 : 88), buttonAdd2Library.Location.Y); buttonAdd2Library.Size = new Size((value ? 68 : 134), 37); } } @@ -190,40 +192,39 @@ private void groupBox1_Enter(object sender, EventArgs e) ParentListRequested?.Invoke(this); } - private void dhmsInputGrown_TextChanged(object sender, EventArgs e) + private void dhmsInputGrown_ValueChanged(object sender, TimeSpan ts) { if (updateMaturation && speciesIndex >= 0 && Values.V.species != null && Values.V.species[speciesIndex] != null) { updateMaturation = false; - numericUpDownWeight.Value = Values.V.species[speciesIndex].breeding != null && Values.V.species[speciesIndex].breeding.maturationTimeAdjusted > 0 ? - (decimal)(weightStat.Input * dhmsInputGrown.Timespan.TotalSeconds / Values.V.species[speciesIndex].breeding.maturationTimeAdjusted) : 0; // todo. remove? baby-weight is no more shown? - updateMaturationPercentage(); + double maturation = 0; + if (Values.V.species[speciesIndex].breeding != null && Values.V.species[speciesIndex].breeding.maturationTimeAdjusted > 0) + { + maturation = 1 - dhmsInputGrown.Timespan.TotalSeconds / Values.V.species[speciesIndex].breeding.maturationTimeAdjusted; + if (maturation < 0) maturation = 0; + if (maturation > 1) maturation = 1; + } + nudMaturation.Value = (decimal)maturation * 100; + updateMaturation = true; } } - private void numericUpDownWeight_ValueChanged(object sender, EventArgs e) + private void nudMaturation_ValueChanged(object sender, EventArgs e) { if (updateMaturation) { updateMaturation = false; - if (Values.V.species[speciesIndex].breeding != null && weightStat.Input > 0) + if (Values.V.species[speciesIndex].breeding != null) { - dhmsInputGrown.Timespan = new TimeSpan(0, 0, (int)(Values.V.species[speciesIndex].breeding.maturationTimeAdjusted * (1 - (double)numericUpDownWeight.Value / weightStat.Input))); + dhmsInputGrown.Timespan = new TimeSpan(0, 0, (int)(Values.V.species[speciesIndex].breeding.maturationTimeAdjusted * (1 - (double)nudMaturation.Value / 100))); dhmsInputGrown.changed = true; } else dhmsInputGrown.Timespan = TimeSpan.Zero; - updateMaturationPercentage(); updateMaturation = true; } } - private void updateMaturationPercentage() - { - labelGrownPercent.Text = dhmsInputGrown.Timespan.TotalMinutes > 0 && weightStat.Input > 0 ? - Math.Round(100 * (double)numericUpDownWeight.Value / weightStat.Input, 1) + " %" : ""; - } - public DateTime Cooldown { set { dhmsInputCooldown.Timespan = value - DateTime.Now; } @@ -292,25 +293,41 @@ public bool Neutered get { return checkBoxNeutered.Checked; } } - public int MutationCounter + public int MutationCounterMother + { + set + { + int v = value; + if (v > nudMutationsMother.Maximum) v = (int)nudMutationsMother.Maximum; + nudMutationsMother.Value = v; + mutationManuallyChanged = false; + } + get { return (int)nudMutationsMother.Value; } + } + + public int MutationCounterFather { set { int v = value; - if (v > numericUpDownMutations.Maximum) v = (int)numericUpDownMutations.Maximum; - numericUpDownMutations.Value = v; + if (v > nudMutationsFather.Maximum) v = (int)nudMutationsFather.Maximum; + nudMutationsFather.Value = v; mutationManuallyChanged = false; } - get { return (int)numericUpDownMutations.Value; } + get { return (int)nudMutationsFather.Value; } } - public double babyWeight + public int[] RegionColors { set { - if (value <= (double)numericUpDownWeight.Maximum) - numericUpDownWeight.Value = (decimal)value; + if (speciesIndex >= 0) + { + regionColorIDs = (int[])value.Clone(); + regionColorChooser1.setCreature(Values.V.speciesNames[speciesIndex], regionColorIDs); + } } + get { return regionColorIDs; } } public int SpeciesIndex @@ -322,19 +339,20 @@ public int SpeciesIndex dhmsInputCooldown.Visible = breedingPossible; dhmsInputGrown.Visible = breedingPossible; - numericUpDownWeight.Visible = breedingPossible; + nudMaturation.Visible = breedingPossible; label4.Visible = breedingPossible; label5.Visible = breedingPossible; label6.Visible = breedingPossible; - labelGrownPercent.Visible = breedingPossible; - numericUpDownMutations.Visible = breedingPossible; + nudMutationsMother.Visible = breedingPossible; + nudMutationsFather.Visible = breedingPossible; labelMutations.Visible = breedingPossible; if (!breedingPossible) { - numericUpDownWeight.Value = 0; + nudMaturation.Value = 0; dhmsInputGrown.Timespan = TimeSpan.Zero; dhmsInputCooldown.Timespan = TimeSpan.Zero; } + RegionColors = new int[6]; } } @@ -347,7 +365,7 @@ private void updateMutations() { if (!mutationManuallyChanged) { - numericUpDownMutations.Value = (parentComboBoxMother.SelectedParent != null ? parentComboBoxMother.SelectedParent.mutationCounter : 0) + + nudMutationsMother.Value = (parentComboBoxMother.SelectedParent != null ? parentComboBoxMother.SelectedParent.mutationCounter : 0) + (parentComboBoxFather.SelectedParent != null ? parentComboBoxFather.SelectedParent.mutationCounter : 0); mutationManuallyChanged = false; } @@ -403,7 +421,9 @@ private void setCreatureData(Creature cr) cr.Father = father; cr.species = Values.V.species[speciesIndex].name; cr.gender = sex; - cr.mutationCounter = (int)numericUpDownMutations.Value; + cr.mutationCounter = (int)nudMutationsMother.Value; + cr.mutationsMaternal = (int)nudMutationsMother.Value; + cr.mutationsPaternal = (int)nudMutationsFather.Value; } private void textBoxOwner_Leave(object sender, EventArgs e) diff --git a/ARKBreedingStats/ExportedCreatureList.Designer.cs b/ARKBreedingStats/ExportedCreatureList.Designer.cs new file mode 100644 index 00000000..3d26bce1 --- /dev/null +++ b/ARKBreedingStats/ExportedCreatureList.Designer.cs @@ -0,0 +1,88 @@ +namespace ARKBreedingStats +{ + partial class ExportedCreatureList + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.chooseFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.panel1 = new System.Windows.Forms.Panel(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.chooseFolderToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(810, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // chooseFolderToolStripMenuItem + // + this.chooseFolderToolStripMenuItem.Name = "chooseFolderToolStripMenuItem"; + this.chooseFolderToolStripMenuItem.Size = new System.Drawing.Size(104, 20); + this.chooseFolderToolStripMenuItem.Text = "Choose Folder…"; + this.chooseFolderToolStripMenuItem.Click += new System.EventHandler(this.chooseFolderToolStripMenuItem_Click); + // + // panel1 + // + this.panel1.AutoScroll = true; + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 24); + this.panel1.Name = "panel1"; + this.panel1.Padding = new System.Windows.Forms.Padding(3); + this.panel1.Size = new System.Drawing.Size(810, 376); + this.panel1.TabIndex = 1; + // + // ExportedCreatureList + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(810, 400); + this.Controls.Add(this.panel1); + this.Controls.Add(this.menuStrip1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.MainMenuStrip = this.menuStrip1; + this.Name = "ExportedCreatureList"; + this.Text = "Exported Creatures"; + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem chooseFolderToolStripMenuItem; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/ARKBreedingStats/ExportedCreatureList.cs b/ARKBreedingStats/ExportedCreatureList.cs new file mode 100644 index 00000000..edd15fd2 --- /dev/null +++ b/ARKBreedingStats/ExportedCreatureList.cs @@ -0,0 +1,67 @@ +using ARKBreedingStats.species; +using ARKBreedingStats.uiControls; +using System; +using System.IO; +using System.Windows.Forms; + +namespace ARKBreedingStats +{ + public partial class ExportedCreatureList : Form + { + public event ExportedCreatureControl.CopyValuesToExtractorEventHandler CopyValuesToExtractor; + + public ExportedCreatureList() + { + InitializeComponent(); + } + + private void chooseFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + chooseFolderAndImport(); + } + + public void chooseFolderAndImport() + { + using (FolderBrowserDialog dlg = new FolderBrowserDialog()) + { + dlg.RootFolder = Environment.SpecialFolder.Desktop; + if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.ExportCreatureFolder)) + { + dlg.SelectedPath = Properties.Settings.Default.ExportCreatureFolder; + } + if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + loadFilesInFolder(dlg.SelectedPath); + } + } + } + + public void loadFilesInFolder(string folderPath) + { + if (!String.IsNullOrWhiteSpace(folderPath)) + { + ClearControls(); + + string[] files = Directory.GetFiles(folderPath, "*.ini"); + foreach (string f in files) + { + addCreatureValuesControl(ImportExported.importExportedCreature(f)); + } + } + } + + private void addCreatureValuesControl(CreatureValues cv) + { + ExportedCreatureControl ecc = new ExportedCreatureControl(cv); + ecc.Dock = DockStyle.Top; + ecc.CopyValuesToExtractor += CopyValuesToExtractor; + panel1.Controls.Add(ecc); + } + + private void ClearControls() + { + foreach (Control c in panel1.Controls) + ((ExportedCreatureControl)c).Dispose(); + } + } +} diff --git a/ARKBreedingStats/ExportedCreatureList.resx b/ARKBreedingStats/ExportedCreatureList.resx new file mode 100644 index 00000000..d5494e30 --- /dev/null +++ b/ARKBreedingStats/ExportedCreatureList.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 + + + 17, 17 + + \ No newline at end of file diff --git a/ARKBreedingStats/Extraction.cs b/ARKBreedingStats/Extraction.cs index 5350bd11..8335ddd5 100644 --- a/ARKBreedingStats/Extraction.cs +++ b/ARKBreedingStats/Extraction.cs @@ -227,14 +227,14 @@ public void extractLevels(int speciesI, int level, List statIOs, double else { int wildLevelsFromImprintedTorpor = (int)Math.Round(((((statIOs[7].Input / (1 + stats[7].MultAffinity)) - stats[7].AddWhenTamed) / ((1 + imprintingBonusRounded * 0.2 * imprintingBonusMultiplier) * stats[7].BaseValue)) - 1) / stats[7].IncPerWildLevel); - double imprintingBonusMax = ((statIOs[7].Input + 0.1 / (1 + stats[7].MultAffinity) - stats[7].AddWhenTamed) / Stats.calculateValue(speciesI, 7, wildLevelsFromImprintedTorpor, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); - double imprintingBonusMin = ((statIOs[7].Input - 0.1 / (1 + stats[7].MultAffinity) - stats[7].AddWhenTamed) / Stats.calculateValue(speciesI, 7, wildLevelsFromImprintedTorpor, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); + double imprintingBonusMax = (((statIOs[7].Input + 0.1) / (1 + stats[7].MultAffinity) - stats[7].AddWhenTamed) / Stats.calculateValue(speciesI, 7, wildLevelsFromImprintedTorpor, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); + double imprintingBonusMin = (((statIOs[7].Input - 0.1) / (1 + stats[7].MultAffinity) - stats[7].AddWhenTamed) / Stats.calculateValue(speciesI, 7, wildLevelsFromImprintedTorpor, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); imprintingBonus = (imprintingBonusMax + imprintingBonusMin) / 2; // assuming food has no dom-levels, extract the exact imprinting from this stat. If the range is in the range of the torpor-dependant IB, take this more precise value for the imprinting. (food has higher values and yields more precise results) int wildLevelsFromImprintedFood = (int)Math.Round(((((statIOs[3].Input / (1 + stats[3].MultAffinity)) - stats[3].AddWhenTamed) / ((1 + imprintingBonusRounded * 0.2 * imprintingBonusMultiplier) * stats[3].BaseValue)) - 1) / stats[3].IncPerWildLevel); - double imprintingBonusFromFoodMax = ((statIOs[3].Input + 0.1 / (1 + stats[3].MultAffinity) - stats[3].AddWhenTamed) / Stats.calculateValue(speciesI, 3, wildLevelsFromImprintedFood, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); - double imprintingBonusFromFoodMin = ((statIOs[3].Input - 0.1 / (1 + stats[3].MultAffinity) - stats[3].AddWhenTamed) / Stats.calculateValue(speciesI, 3, wildLevelsFromImprintedFood, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); + double imprintingBonusFromFoodMax = (((statIOs[3].Input + 0.1) / (1 + stats[3].MultAffinity) - stats[3].AddWhenTamed) / Stats.calculateValue(speciesI, 3, wildLevelsFromImprintedFood, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); + double imprintingBonusFromFoodMin = (((statIOs[3].Input - 0.1) / (1 + stats[3].MultAffinity) - stats[3].AddWhenTamed) / Stats.calculateValue(speciesI, 3, wildLevelsFromImprintedFood, 0, false, 0, 0) - 1) / (0.2 * imprintingBonusMultiplier); double imprintingBonusFromFood = (imprintingBonusFromFoodMax + imprintingBonusFromFoodMin) / 2; if (imprintingBonusMax >= imprintingBonusFromFoodMax diff --git a/ARKBreedingStats/FileSync.cs b/ARKBreedingStats/FileSync.cs index 1e4a37f3..b4e5cd41 100644 --- a/ARKBreedingStats/FileSync.cs +++ b/ARKBreedingStats/FileSync.cs @@ -40,7 +40,10 @@ public void changeFile(string newFileName) private void onChanged(object source, FileSystemEventArgs e) { // Wait until the file is writeable - while (true) + int numberOfRetries = 5; + int delayOnRetry = 1000; + + for (int i = 1; i <= numberOfRetries; ++i) { try { @@ -51,12 +54,13 @@ private void onChanged(object source, FileSystemEventArgs e) } } catch (FileNotFoundException) - { break; } + { return; } catch (IOException) { } catch (UnauthorizedAccessException) { } - Thread.Sleep(500); + // if file is not saveable + Thread.Sleep(delayOnRetry); } // Notify the form that the collection has been changed, but only if it's been diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index bebe8d59..ce88e629 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -43,6 +43,9 @@ private void InitializeComponent() this.runDefaultExtractionAndImportFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.runDefaultExtractionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.importCreatedJsonfileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importExportedCreaturesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importAllCreaturesInFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importAllCreaturesInSelectedFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.loadAdditionalValuesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -126,52 +129,30 @@ 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.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); this.groupBox8 = new System.Windows.Forms.GroupBox(); - this.radarChart1 = new ARKBreedingStats.RadarChart(); this.panelWildTamedBredTester = new System.Windows.Forms.Panel(); this.radioButtonTesterBred = new System.Windows.Forms.RadioButton(); this.radioButtonTesterTamed = new System.Windows.Forms.RadioButton(); this.radioButtonTesterWild = new System.Windows.Forms.RadioButton(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.labelTesterTotalLevel = new System.Windows.Forms.Label(); - this.statTestingHealth = new ARKBreedingStats.StatIO(); this.labelDomLevelSum = new System.Windows.Forms.Label(); - this.statTestingStamina = new ARKBreedingStats.StatIO(); - this.statTestingOxygen = new ARKBreedingStats.StatIO(); this.labelNotTamedNoteTesting = new System.Windows.Forms.Label(); - this.statTestingFood = new ARKBreedingStats.StatIO(); this.label10 = new System.Windows.Forms.Label(); - this.statTestingWeight = new ARKBreedingStats.StatIO(); - this.statTestingDamage = new ARKBreedingStats.StatIO(); - this.statTestingSpeed = new ARKBreedingStats.StatIO(); - this.statTestingTorpor = new ARKBreedingStats.StatIO(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.labelCurrentTesterCreature = new System.Windows.Forms.Label(); this.labelTestingInfo = new System.Windows.Forms.Label(); - this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); this.tabPageExtractor = new System.Windows.Forms.TabPage(); this.groupBoxRadarChartExtractor = new System.Windows.Forms.GroupBox(); - this.radarChartExtractor = new ARKBreedingStats.RadarChart(); this.labelImprintingFailInfo = new System.Windows.Forms.Label(); this.groupBoxTamingInfo = new System.Windows.Forms.GroupBox(); this.labelTamingInfo = new System.Windows.Forms.Label(); this.button2TamingCalc = new System.Windows.Forms.Button(); this.gbStats = new System.Windows.Forms.GroupBox(); this.label7 = new System.Windows.Forms.Label(); - this.statIOHealth = new ARKBreedingStats.StatIO(); - this.statIODamage = new ARKBreedingStats.StatIO(); - this.statIOTorpor = new ARKBreedingStats.StatIO(); - this.statIOWeight = new ARKBreedingStats.StatIO(); - this.statIOSpeed = new ARKBreedingStats.StatIO(); - this.statIOFood = new ARKBreedingStats.StatIO(); - this.statIOOxygen = new ARKBreedingStats.StatIO(); - this.statIOStamina = new ARKBreedingStats.StatIO(); this.buttonExtract = new System.Windows.Forms.Button(); this.checkBoxQuickWildCheck = new System.Windows.Forms.CheckBox(); - this.buttonHelp = new System.Windows.Forms.Button(); this.labelErrorHelp = new System.Windows.Forms.Label(); - this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); this.tabPageLibrary = new System.Windows.Forms.TabPage(); this.tableLayoutPanelLibrary = new System.Windows.Forms.TableLayoutPanel(); this.tabControlLibFilter = new System.Windows.Forms.TabControl(); @@ -198,7 +179,6 @@ private void InitializeComponent() this.checkBoxShowUnavailableCreatures = new System.Windows.Forms.CheckBox(); this.checkBoxShowDead = new System.Windows.Forms.CheckBox(); this.tabPageLibRadarChart = new System.Windows.Forms.TabPage(); - this.radarChartLibrary = new ARKBreedingStats.RadarChart(); this.listViewLibrary = new System.Windows.Forms.ListView(); this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeaderOwner = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); @@ -248,25 +228,15 @@ private void InitializeComponent() this.obeliskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItemRemove = new System.Windows.Forms.ToolStripMenuItem(); - this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); this.tabPagePedigree = new System.Windows.Forms.TabPage(); - this.pedigree1 = new ARKBreedingStats.Pedigree(); this.tabPageTaming = new System.Windows.Forms.TabPage(); - this.tamingControl1 = new ARKBreedingStats.TamingControl(); this.tabPageBreedingPlan = new System.Windows.Forms.TabPage(); - this.breedingPlan1 = new ARKBreedingStats.BreedingPlan(); this.tabPageRaising = new System.Windows.Forms.TabPage(); - this.raisingControl1 = new ARKBreedingStats.RaisingControl(); this.tabPageTimer = new System.Windows.Forms.TabPage(); - this.timerList1 = new ARKBreedingStats.TimerControl(); this.tabPagePlayerTribes = new System.Windows.Forms.TabPage(); - this.tribesControl1 = new ARKBreedingStats.TribesControl(); this.tabPageNotes = new System.Windows.Forms.TabPage(); - this.notesControl1 = new ARKBreedingStats.NotesControl(); this.TabPageOCR = new System.Windows.Forms.TabPage(); - this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); this.tabPageExtractionTests = new System.Windows.Forms.TabPage(); - this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.tabPageMultiplierTesting = new System.Windows.Forms.TabPage(); this.btnReadValuesFromArk = new System.Windows.Forms.Button(); this.cbEventMultipliers = new System.Windows.Forms.CheckBox(); @@ -295,14 +265,48 @@ private void InitializeComponent() this.toolStripButtonDeleteTempCreature = new System.Windows.Forms.ToolStripButton(); this.tsBtAddAsExtractionTest = new System.Windows.Forms.ToolStripButton(); this.panelToolBar = new System.Windows.Forms.Panel(); + this.btImportLastExported = new System.Windows.Forms.Button(); this.pbSpecies = new System.Windows.Forms.PictureBox(); - this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.cbGuessSpecies = new System.Windows.Forms.CheckBox(); this.chkbToggleOverlay = new System.Windows.Forms.CheckBox(); this.labelListening = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.lbLibrarySelectionInfo = new System.Windows.Forms.Label(); + this.llOnlineHelpExtractionIssues = new System.Windows.Forms.LinkLabel(); + this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); + this.radarChart1 = new ARKBreedingStats.RadarChart(); + this.statTestingHealth = new ARKBreedingStats.StatIO(); + this.statTestingStamina = new ARKBreedingStats.StatIO(); + this.statTestingOxygen = new ARKBreedingStats.StatIO(); + this.statTestingFood = new ARKBreedingStats.StatIO(); + this.statTestingWeight = new ARKBreedingStats.StatIO(); + this.statTestingDamage = new ARKBreedingStats.StatIO(); + this.statTestingSpeed = new ARKBreedingStats.StatIO(); + this.statTestingTorpor = new ARKBreedingStats.StatIO(); + this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartExtractor = new ARKBreedingStats.RadarChart(); + this.statIOHealth = new ARKBreedingStats.StatIO(); + this.statIODamage = new ARKBreedingStats.StatIO(); + this.statIOTorpor = new ARKBreedingStats.StatIO(); + this.statIOWeight = new ARKBreedingStats.StatIO(); + this.statIOSpeed = new ARKBreedingStats.StatIO(); + this.statIOFood = new ARKBreedingStats.StatIO(); + this.statIOOxygen = new ARKBreedingStats.StatIO(); + this.statIOStamina = new ARKBreedingStats.StatIO(); + this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartLibrary = new ARKBreedingStats.RadarChart(); + this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); + this.pedigree1 = new ARKBreedingStats.Pedigree(); + this.tamingControl1 = new ARKBreedingStats.TamingControl(); + this.breedingPlan1 = new ARKBreedingStats.BreedingPlan(); + this.raisingControl1 = new ARKBreedingStats.RaisingControl(); + this.timerList1 = new ARKBreedingStats.TimerControl(); + this.tribesControl1 = new ARKBreedingStats.TribesControl(); + this.notesControl1 = new ARKBreedingStats.NotesControl(); + this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); + this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); + this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -320,13 +324,11 @@ private void InitializeComponent() this.tabControlMain.SuspendLayout(); this.tabPageStatTesting.SuspendLayout(); this.groupBox8.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); this.panelWildTamedBredTester.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox5.SuspendLayout(); this.tabPageExtractor.SuspendLayout(); this.groupBoxRadarChartExtractor.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); this.groupBoxTamingInfo.SuspendLayout(); this.gbStats.SuspendLayout(); this.tabPageLibrary.SuspendLayout(); @@ -339,7 +341,6 @@ private void InitializeComponent() this.tableLayoutPanel2.SuspendLayout(); this.tabPage4.SuspendLayout(); this.tabPageLibRadarChart.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.contextMenuStripLibrary.SuspendLayout(); this.tabPagePedigree.SuspendLayout(); this.tabPageTaming.SuspendLayout(); @@ -354,6 +355,9 @@ private void InitializeComponent() this.toolStrip2.SuspendLayout(); this.panelToolBar.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.SuspendLayout(); // // aboutToolStripMenuItem @@ -384,6 +388,7 @@ private void InitializeComponent() this.saveAsToolStripMenuItem, this.toolStripSeparator2, this.importingFromARKToolsToolStripMenuItem, + this.importExportedCreaturesToolStripMenuItem, this.toolStripSeparator10, this.loadAdditionalValuesToolStripMenuItem, this.settingsToolStripMenuItem, @@ -453,14 +458,12 @@ private void InitializeComponent() this.runDefaultExtractionAndImportFileToolStripMenuItem.Name = "runDefaultExtractionAndImportFileToolStripMenuItem"; this.runDefaultExtractionAndImportFileToolStripMenuItem.Size = new System.Drawing.Size(271, 22); this.runDefaultExtractionAndImportFileToolStripMenuItem.Text = "Run default Extraction and import file"; - this.runDefaultExtractionAndImportFileToolStripMenuItem.Click += new System.EventHandler(this.runDefaultExtractionAndImportFileToolStripMenuItem_Click); // // runDefaultExtractionToolStripMenuItem // this.runDefaultExtractionToolStripMenuItem.Name = "runDefaultExtractionToolStripMenuItem"; this.runDefaultExtractionToolStripMenuItem.Size = new System.Drawing.Size(271, 22); this.runDefaultExtractionToolStripMenuItem.Text = "Run default Extraction"; - this.runDefaultExtractionToolStripMenuItem.Click += new System.EventHandler(this.runDefaultExtractionToolStripMenuItem_Click); // // importCreatedJsonfileToolStripMenuItem // @@ -469,6 +472,30 @@ private void InitializeComponent() this.importCreatedJsonfileToolStripMenuItem.Text = "Import created json-file..."; this.importCreatedJsonfileToolStripMenuItem.Click += new System.EventHandler(this.importCreatedJsonfileToolStripMenuItem_Click); // + // importExportedCreaturesToolStripMenuItem + // + this.importExportedCreaturesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.importAllCreaturesInFolderToolStripMenuItem, + this.importAllCreaturesInSelectedFolderToolStripMenuItem}); + this.importExportedCreaturesToolStripMenuItem.Name = "importExportedCreaturesToolStripMenuItem"; + this.importExportedCreaturesToolStripMenuItem.Size = new System.Drawing.Size(226, 22); + this.importExportedCreaturesToolStripMenuItem.Text = "Import exported Creatures"; + this.importExportedCreaturesToolStripMenuItem.Click += new System.EventHandler(this.importExportedCreaturesToolStripMenuItem_Click); + // + // importAllCreaturesInFolderToolStripMenuItem + // + this.importAllCreaturesInFolderToolStripMenuItem.Name = "importAllCreaturesInFolderToolStripMenuItem"; + this.importAllCreaturesInFolderToolStripMenuItem.Size = new System.Drawing.Size(263, 22); + this.importAllCreaturesInFolderToolStripMenuItem.Text = "Import all creatures in default folder"; + this.importAllCreaturesInFolderToolStripMenuItem.Click += new System.EventHandler(this.importAllCreaturesInFolderToolStripMenuItem_Click); + // + // importAllCreaturesInSelectedFolderToolStripMenuItem + // + this.importAllCreaturesInSelectedFolderToolStripMenuItem.Name = "importAllCreaturesInSelectedFolderToolStripMenuItem"; + this.importAllCreaturesInSelectedFolderToolStripMenuItem.Size = new System.Drawing.Size(263, 22); + this.importAllCreaturesInSelectedFolderToolStripMenuItem.Text = "Import all creatures from folder…"; + this.importAllCreaturesInSelectedFolderToolStripMenuItem.Click += new System.EventHandler(this.importAllCreaturesInSelectedFolderToolStripMenuItem_Click); + // // toolStripSeparator10 // this.toolStripSeparator10.Name = "toolStripSeparator10"; @@ -880,7 +907,7 @@ private void InitializeComponent() this.toolStripMenuItem1}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1158, 24); + this.menuStrip1.Size = new System.Drawing.Size(1162, 24); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -1251,7 +1278,7 @@ private void InitializeComponent() this.tabControlMain.Location = new System.Drawing.Point(0, 103); this.tabControlMain.Name = "tabControlMain"; this.tabControlMain.SelectedIndex = 1; - this.tabControlMain.Size = new System.Drawing.Size(1158, 655); + this.tabControlMain.Size = new System.Drawing.Size(1162, 688); this.tabControlMain.TabIndex = 0; this.tabControlMain.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); // @@ -1268,18 +1295,11 @@ private void InitializeComponent() this.tabPageStatTesting.Location = new System.Drawing.Point(4, 22); this.tabPageStatTesting.Name = "tabPageStatTesting"; this.tabPageStatTesting.Padding = new System.Windows.Forms.Padding(3); - this.tabPageStatTesting.Size = new System.Drawing.Size(1150, 629); + this.tabPageStatTesting.Size = new System.Drawing.Size(1154, 662); this.tabPageStatTesting.TabIndex = 1; this.tabPageStatTesting.Text = "Stat Testing"; this.tabPageStatTesting.UseVisualStyleBackColor = true; // - // statPotentials1 - // - this.statPotentials1.Location = new System.Drawing.Point(556, 243); - this.statPotentials1.Name = "statPotentials1"; - this.statPotentials1.Size = new System.Drawing.Size(293, 361); - this.statPotentials1.TabIndex = 12; - // // groupBox8 // this.groupBox8.Controls.Add(this.radarChart1); @@ -1290,16 +1310,6 @@ private void InitializeComponent() this.groupBox8.TabStop = false; this.groupBox8.Text = "Stat-Chart"; // - // radarChart1 - // - this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); - this.radarChart1.Location = new System.Drawing.Point(6, 19); - this.radarChart1.Name = "radarChart1"; - this.radarChart1.Size = new System.Drawing.Size(200, 200); - this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChart1.TabIndex = 10; - this.radarChart1.TabStop = false; - // // panelWildTamedBredTester // this.panelWildTamedBredTester.Controls.Add(this.radioButtonTesterBred); @@ -1378,23 +1388,6 @@ private void InitializeComponent() this.labelTesterTotalLevel.TabIndex = 49; this.labelTesterTotalLevel.Text = "Total Level"; // - // statTestingHealth - // - this.statTestingHealth.BackColor = System.Drawing.Color.Transparent; - this.statTestingHealth.BreedingValue = 0D; - this.statTestingHealth.DomLevelLockedZero = false; - this.statTestingHealth.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingHealth.Input = 100D; - this.statTestingHealth.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingHealth.LevelDom = 0; - this.statTestingHealth.LevelWild = 0; - this.statTestingHealth.Location = new System.Drawing.Point(6, 32); - this.statTestingHealth.Name = "statTestingHealth"; - this.statTestingHealth.Percent = false; - this.statTestingHealth.Size = new System.Drawing.Size(295, 50); - this.statTestingHealth.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingHealth.TabIndex = 0; - // // labelDomLevelSum // this.labelDomLevelSum.AutoSize = true; @@ -1404,40 +1397,6 @@ private void InitializeComponent() this.labelDomLevelSum.TabIndex = 46; this.labelDomLevelSum.Text = "Dom Levels"; // - // statTestingStamina - // - this.statTestingStamina.BackColor = System.Drawing.Color.Transparent; - this.statTestingStamina.BreedingValue = 0D; - this.statTestingStamina.DomLevelLockedZero = false; - this.statTestingStamina.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingStamina.Input = 100D; - this.statTestingStamina.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingStamina.LevelDom = 0; - this.statTestingStamina.LevelWild = 0; - this.statTestingStamina.Location = new System.Drawing.Point(6, 82); - this.statTestingStamina.Name = "statTestingStamina"; - this.statTestingStamina.Percent = false; - this.statTestingStamina.Size = new System.Drawing.Size(295, 50); - this.statTestingStamina.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingStamina.TabIndex = 1; - // - // statTestingOxygen - // - this.statTestingOxygen.BackColor = System.Drawing.Color.Transparent; - this.statTestingOxygen.BreedingValue = 0D; - this.statTestingOxygen.DomLevelLockedZero = false; - this.statTestingOxygen.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingOxygen.Input = 100D; - this.statTestingOxygen.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingOxygen.LevelDom = 0; - this.statTestingOxygen.LevelWild = 0; - this.statTestingOxygen.Location = new System.Drawing.Point(6, 132); - this.statTestingOxygen.Name = "statTestingOxygen"; - this.statTestingOxygen.Percent = false; - this.statTestingOxygen.Size = new System.Drawing.Size(295, 50); - this.statTestingOxygen.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingOxygen.TabIndex = 2; - // // labelNotTamedNoteTesting // this.labelNotTamedNoteTesting.Location = new System.Drawing.Point(6, 469); @@ -1447,23 +1406,6 @@ private void InitializeComponent() this.labelNotTamedNoteTesting.Text = "*Creature is not yet tamed and may get better values then."; this.labelNotTamedNoteTesting.Visible = false; // - // statTestingFood - // - this.statTestingFood.BackColor = System.Drawing.Color.Transparent; - this.statTestingFood.BreedingValue = 0D; - this.statTestingFood.DomLevelLockedZero = false; - this.statTestingFood.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingFood.Input = 100D; - this.statTestingFood.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingFood.LevelDom = 0; - this.statTestingFood.LevelWild = 0; - this.statTestingFood.Location = new System.Drawing.Point(6, 182); - this.statTestingFood.Name = "statTestingFood"; - this.statTestingFood.Percent = false; - this.statTestingFood.Size = new System.Drawing.Size(295, 50); - this.statTestingFood.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingFood.TabIndex = 3; - // // label10 // this.label10.AutoSize = true; @@ -1473,74 +1415,6 @@ private void InitializeComponent() this.label10.TabIndex = 36; this.label10.Text = "Current Value"; // - // statTestingWeight - // - this.statTestingWeight.BackColor = System.Drawing.Color.Transparent; - this.statTestingWeight.BreedingValue = 0D; - this.statTestingWeight.DomLevelLockedZero = false; - this.statTestingWeight.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingWeight.Input = 100D; - this.statTestingWeight.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingWeight.LevelDom = 0; - this.statTestingWeight.LevelWild = 0; - this.statTestingWeight.Location = new System.Drawing.Point(6, 232); - this.statTestingWeight.Name = "statTestingWeight"; - this.statTestingWeight.Percent = false; - this.statTestingWeight.Size = new System.Drawing.Size(295, 50); - this.statTestingWeight.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingWeight.TabIndex = 4; - // - // statTestingDamage - // - this.statTestingDamage.BackColor = System.Drawing.Color.Transparent; - this.statTestingDamage.BreedingValue = 0D; - this.statTestingDamage.DomLevelLockedZero = false; - this.statTestingDamage.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingDamage.Input = 100D; - this.statTestingDamage.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingDamage.LevelDom = 0; - this.statTestingDamage.LevelWild = 0; - this.statTestingDamage.Location = new System.Drawing.Point(6, 282); - this.statTestingDamage.Name = "statTestingDamage"; - this.statTestingDamage.Percent = false; - this.statTestingDamage.Size = new System.Drawing.Size(295, 50); - this.statTestingDamage.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingDamage.TabIndex = 5; - // - // statTestingSpeed - // - this.statTestingSpeed.BackColor = System.Drawing.Color.Transparent; - this.statTestingSpeed.BreedingValue = 0D; - this.statTestingSpeed.DomLevelLockedZero = false; - this.statTestingSpeed.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingSpeed.Input = 100D; - this.statTestingSpeed.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingSpeed.LevelDom = 0; - this.statTestingSpeed.LevelWild = 0; - this.statTestingSpeed.Location = new System.Drawing.Point(6, 332); - this.statTestingSpeed.Name = "statTestingSpeed"; - this.statTestingSpeed.Percent = false; - this.statTestingSpeed.Size = new System.Drawing.Size(295, 50); - this.statTestingSpeed.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingSpeed.TabIndex = 6; - // - // statTestingTorpor - // - this.statTestingTorpor.BackColor = System.Drawing.Color.Transparent; - this.statTestingTorpor.BreedingValue = 0D; - this.statTestingTorpor.DomLevelLockedZero = false; - this.statTestingTorpor.ForeColor = System.Drawing.SystemColors.ControlText; - this.statTestingTorpor.Input = 100D; - this.statTestingTorpor.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statTestingTorpor.LevelDom = 0; - this.statTestingTorpor.LevelWild = 0; - this.statTestingTorpor.Location = new System.Drawing.Point(6, 382); - this.statTestingTorpor.Name = "statTestingTorpor"; - this.statTestingTorpor.Percent = false; - this.statTestingTorpor.Size = new System.Drawing.Size(295, 50); - this.statTestingTorpor.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statTestingTorpor.TabIndex = 7; - // // groupBox5 // this.groupBox5.Controls.Add(this.labelCurrentTesterCreature); @@ -1569,34 +1443,11 @@ private void InitializeComponent() this.labelTestingInfo.TabIndex = 37; this.labelTestingInfo.Text = "Preview or edit levels of a creature."; // - // creatureInfoInputTester - // - this.creatureInfoInputTester.Cooldown = new System.DateTime(2018, 3, 18, 9, 54, 57, 977); - this.creatureInfoInputTester.CreatureName = ""; - this.creatureInfoInputTester.CreatureNote = ""; - this.creatureInfoInputTester.CreatureOwner = ""; - this.creatureInfoInputTester.CreatureServer = ""; - this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Sex.Unknown; - this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; - this.creatureInfoInputTester.CreatureTribe = ""; - this.creatureInfoInputTester.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 11, 41, 997); - this.creatureInfoInputTester.father = null; - this.creatureInfoInputTester.Grown = new System.DateTime(2018, 3, 18, 9, 54, 57, 978); - this.creatureInfoInputTester.Location = new System.Drawing.Point(321, 184); - this.creatureInfoInputTester.mother = null; - this.creatureInfoInputTester.MutationCounter = 0; - this.creatureInfoInputTester.Name = "creatureInfoInputTester"; - this.creatureInfoInputTester.Neutered = false; - this.creatureInfoInputTester.Size = new System.Drawing.Size(229, 408); - this.creatureInfoInputTester.TabIndex = 4; - this.creatureInfoInputTester.Add2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Add2LibraryClickedEventHandler(this.creatureInfoInputTester_Add2Library_Clicked); - this.creatureInfoInputTester.Save2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Save2LibraryClickedEventHandler(this.creatureInfoInputTester_Save2Library_Clicked); - this.creatureInfoInputTester.ParentListRequested += new ARKBreedingStats.CreatureInfoInput.RequestParentListEventHandler(this.creatureInfoInput_ParentListRequested); - // // tabPageExtractor // this.tabPageExtractor.AllowDrop = true; this.tabPageExtractor.AutoScroll = true; + this.tabPageExtractor.Controls.Add(this.llOnlineHelpExtractionIssues); this.tabPageExtractor.Controls.Add(this.groupBoxRadarChartExtractor); this.tabPageExtractor.Controls.Add(this.labelImprintingFailInfo); this.tabPageExtractor.Controls.Add(this.groupBoxTamingInfo); @@ -1611,13 +1462,12 @@ private void InitializeComponent() this.tabPageExtractor.Controls.Add(this.groupBoxPossibilities); this.tabPageExtractor.Controls.Add(this.label4); this.tabPageExtractor.Controls.Add(this.numericUpDownLevel); - this.tabPageExtractor.Controls.Add(this.buttonHelp); this.tabPageExtractor.Controls.Add(this.labelErrorHelp); this.tabPageExtractor.Controls.Add(this.creatureInfoInputExtractor); this.tabPageExtractor.Location = new System.Drawing.Point(4, 22); this.tabPageExtractor.Name = "tabPageExtractor"; this.tabPageExtractor.Padding = new System.Windows.Forms.Padding(3); - this.tabPageExtractor.Size = new System.Drawing.Size(1150, 629); + this.tabPageExtractor.Size = new System.Drawing.Size(1154, 662); this.tabPageExtractor.TabIndex = 0; this.tabPageExtractor.Text = "Extractor"; this.tabPageExtractor.UseVisualStyleBackColor = true; @@ -1634,18 +1484,7 @@ private void InitializeComponent() this.groupBoxRadarChartExtractor.TabStop = false; this.groupBoxRadarChartExtractor.Text = "Stat-Chart"; // - // radarChartExtractor - // - this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; - this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); - this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); - this.radarChartExtractor.Name = "radarChartExtractor"; - this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); - this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.radarChartExtractor.TabIndex = 10; - this.radarChartExtractor.TabStop = false; - // - // labelImprintingFailInfo + // labelImprintingFailInfo // this.labelImprintingFailInfo.BackColor = System.Drawing.Color.MistyRose; this.labelImprintingFailInfo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -1720,149 +1559,6 @@ private void InitializeComponent() this.label7.TabIndex = 50; this.label7.Text = "Current stat-value"; // - // statIOHealth - // - this.statIOHealth.BackColor = System.Drawing.Color.Transparent; - this.statIOHealth.BreedingValue = 0D; - this.statIOHealth.DomLevelLockedZero = false; - this.statIOHealth.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOHealth.Input = 100D; - this.statIOHealth.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOHealth.LevelDom = 0; - this.statIOHealth.LevelWild = 0; - this.statIOHealth.Location = new System.Drawing.Point(6, 32); - this.statIOHealth.Name = "statIOHealth"; - this.statIOHealth.Percent = false; - this.statIOHealth.Size = new System.Drawing.Size(295, 50); - this.statIOHealth.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOHealth.TabIndex = 0; - this.statIOHealth.Click += new System.EventHandler(this.statIO_Click); - // - // statIODamage - // - this.statIODamage.BackColor = System.Drawing.Color.Transparent; - this.statIODamage.BreedingValue = 0D; - this.statIODamage.DomLevelLockedZero = false; - this.statIODamage.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIODamage.Input = 100D; - this.statIODamage.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIODamage.LevelDom = 0; - this.statIODamage.LevelWild = 0; - this.statIODamage.Location = new System.Drawing.Point(6, 282); - this.statIODamage.Name = "statIODamage"; - this.statIODamage.Percent = false; - this.statIODamage.Size = new System.Drawing.Size(295, 50); - this.statIODamage.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIODamage.TabIndex = 5; - this.statIODamage.Click += new System.EventHandler(this.statIO_Click); - // - // statIOTorpor - // - this.statIOTorpor.BackColor = System.Drawing.Color.Transparent; - this.statIOTorpor.BreedingValue = 0D; - this.statIOTorpor.DomLevelLockedZero = false; - this.statIOTorpor.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOTorpor.Input = 100D; - this.statIOTorpor.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOTorpor.LevelDom = 0; - this.statIOTorpor.LevelWild = 0; - this.statIOTorpor.Location = new System.Drawing.Point(6, 382); - this.statIOTorpor.Name = "statIOTorpor"; - this.statIOTorpor.Percent = false; - this.statIOTorpor.Size = new System.Drawing.Size(295, 50); - this.statIOTorpor.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOTorpor.TabIndex = 7; - // - // statIOWeight - // - this.statIOWeight.BackColor = System.Drawing.Color.Transparent; - this.statIOWeight.BreedingValue = 0D; - this.statIOWeight.DomLevelLockedZero = false; - this.statIOWeight.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOWeight.Input = 100D; - this.statIOWeight.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOWeight.LevelDom = 0; - this.statIOWeight.LevelWild = 0; - this.statIOWeight.Location = new System.Drawing.Point(6, 232); - this.statIOWeight.Name = "statIOWeight"; - this.statIOWeight.Percent = false; - this.statIOWeight.Size = new System.Drawing.Size(295, 50); - this.statIOWeight.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOWeight.TabIndex = 4; - this.statIOWeight.Click += new System.EventHandler(this.statIO_Click); - // - // statIOSpeed - // - this.statIOSpeed.BackColor = System.Drawing.Color.Transparent; - this.statIOSpeed.BreedingValue = 0D; - this.statIOSpeed.DomLevelLockedZero = false; - this.statIOSpeed.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOSpeed.Input = 100D; - this.statIOSpeed.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOSpeed.LevelDom = 0; - this.statIOSpeed.LevelWild = 0; - this.statIOSpeed.Location = new System.Drawing.Point(6, 332); - this.statIOSpeed.Name = "statIOSpeed"; - this.statIOSpeed.Percent = false; - this.statIOSpeed.Size = new System.Drawing.Size(295, 50); - this.statIOSpeed.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOSpeed.TabIndex = 6; - this.statIOSpeed.Click += new System.EventHandler(this.statIO_Click); - // - // statIOFood - // - this.statIOFood.BackColor = System.Drawing.Color.Transparent; - this.statIOFood.BreedingValue = 0D; - this.statIOFood.DomLevelLockedZero = false; - this.statIOFood.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOFood.Input = 100D; - this.statIOFood.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOFood.LevelDom = 0; - this.statIOFood.LevelWild = 0; - this.statIOFood.Location = new System.Drawing.Point(6, 182); - this.statIOFood.Name = "statIOFood"; - this.statIOFood.Percent = false; - this.statIOFood.Size = new System.Drawing.Size(295, 50); - this.statIOFood.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOFood.TabIndex = 3; - this.statIOFood.Click += new System.EventHandler(this.statIO_Click); - // - // statIOOxygen - // - this.statIOOxygen.BackColor = System.Drawing.Color.Transparent; - this.statIOOxygen.BreedingValue = 0D; - this.statIOOxygen.DomLevelLockedZero = false; - this.statIOOxygen.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOOxygen.Input = 100D; - this.statIOOxygen.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOOxygen.LevelDom = 0; - this.statIOOxygen.LevelWild = 0; - this.statIOOxygen.Location = new System.Drawing.Point(6, 132); - this.statIOOxygen.Name = "statIOOxygen"; - this.statIOOxygen.Percent = false; - this.statIOOxygen.Size = new System.Drawing.Size(295, 50); - this.statIOOxygen.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOOxygen.TabIndex = 2; - this.statIOOxygen.Click += new System.EventHandler(this.statIO_Click); - // - // statIOStamina - // - this.statIOStamina.BackColor = System.Drawing.Color.Transparent; - this.statIOStamina.BreedingValue = 0D; - this.statIOStamina.DomLevelLockedZero = false; - this.statIOStamina.ForeColor = System.Drawing.SystemColors.ControlText; - this.statIOStamina.Input = 100D; - this.statIOStamina.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; - this.statIOStamina.LevelDom = 0; - this.statIOStamina.LevelWild = 0; - this.statIOStamina.Location = new System.Drawing.Point(6, 82); - this.statIOStamina.Name = "statIOStamina"; - this.statIOStamina.Percent = false; - this.statIOStamina.Size = new System.Drawing.Size(295, 50); - this.statIOStamina.Status = ARKBreedingStats.StatIOStatus.Neutral; - this.statIOStamina.TabIndex = 1; - this.statIOStamina.Click += new System.EventHandler(this.statIO_Click); - // // buttonExtract // this.buttonExtract.Location = new System.Drawing.Point(321, 110); @@ -1884,48 +1580,14 @@ private void InitializeComponent() this.checkBoxQuickWildCheck.UseVisualStyleBackColor = true; this.checkBoxQuickWildCheck.CheckedChanged += new System.EventHandler(this.checkBoxQuickWildCheck_CheckedChanged); // - // buttonHelp - // - this.buttonHelp.Location = new System.Drawing.Point(348, 598); - this.buttonHelp.Name = "buttonHelp"; - this.buttonHelp.Size = new System.Drawing.Size(202, 30); - this.buttonHelp.TabIndex = 10; - this.buttonHelp.Text = "Stat-boxes are red: Online-Help"; - this.buttonHelp.UseVisualStyleBackColor = true; - this.buttonHelp.Visible = false; - this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click); - // // labelErrorHelp // this.labelErrorHelp.Location = new System.Drawing.Point(556, 43); this.labelErrorHelp.Name = "labelErrorHelp"; - this.labelErrorHelp.Size = new System.Drawing.Size(239, 583); + this.labelErrorHelp.Size = new System.Drawing.Size(239, 569); this.labelErrorHelp.TabIndex = 40; this.labelErrorHelp.Text = resources.GetString("labelErrorHelp.Text"); // - // creatureInfoInputExtractor - // - this.creatureInfoInputExtractor.Cooldown = new System.DateTime(2018, 3, 18, 9, 54, 58, 10); - this.creatureInfoInputExtractor.CreatureName = ""; - this.creatureInfoInputExtractor.CreatureNote = ""; - this.creatureInfoInputExtractor.CreatureOwner = ""; - this.creatureInfoInputExtractor.CreatureServer = ""; - this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Sex.Unknown; - this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; - this.creatureInfoInputExtractor.CreatureTribe = ""; - this.creatureInfoInputExtractor.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 12, 15, 968); - this.creatureInfoInputExtractor.father = null; - this.creatureInfoInputExtractor.Grown = new System.DateTime(2018, 3, 18, 9, 54, 58, 10); - this.creatureInfoInputExtractor.Location = new System.Drawing.Point(321, 184); - this.creatureInfoInputExtractor.mother = null; - this.creatureInfoInputExtractor.MutationCounter = 0; - this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; - this.creatureInfoInputExtractor.Neutered = false; - this.creatureInfoInputExtractor.Size = new System.Drawing.Size(229, 408); - this.creatureInfoInputExtractor.TabIndex = 7; - this.creatureInfoInputExtractor.Add2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Add2LibraryClickedEventHandler(this.creatureInfoInput1_Add2Library_Clicked); - this.creatureInfoInputExtractor.ParentListRequested += new ARKBreedingStats.CreatureInfoInput.RequestParentListEventHandler(this.creatureInfoInput_ParentListRequested); - // // tabPageLibrary // this.tabPageLibrary.AutoScroll = true; @@ -1934,7 +1596,7 @@ private void InitializeComponent() this.tabPageLibrary.Location = new System.Drawing.Point(4, 22); this.tabPageLibrary.Name = "tabPageLibrary"; this.tabPageLibrary.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLibrary.Size = new System.Drawing.Size(1150, 629); + this.tabPageLibrary.Size = new System.Drawing.Size(1154, 662); this.tabPageLibrary.TabIndex = 2; this.tabPageLibrary.Text = "Library"; this.tabPageLibrary.UseVisualStyleBackColor = true; @@ -1955,7 +1617,7 @@ private void InitializeComponent() this.tableLayoutPanelLibrary.RowCount = 2; this.tableLayoutPanelLibrary.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 396F)); this.tableLayoutPanelLibrary.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanelLibrary.Size = new System.Drawing.Size(1144, 623); + this.tableLayoutPanelLibrary.Size = new System.Drawing.Size(1148, 656); this.tableLayoutPanelLibrary.TabIndex = 4; // // tabControlLibFilter @@ -1970,7 +1632,7 @@ private void InitializeComponent() this.tabControlLibFilter.Location = new System.Drawing.Point(3, 399); this.tabControlLibFilter.Name = "tabControlLibFilter"; this.tabControlLibFilter.SelectedIndex = 0; - this.tabControlLibFilter.Size = new System.Drawing.Size(195, 221); + this.tabControlLibFilter.Size = new System.Drawing.Size(195, 254); this.tabControlLibFilter.TabIndex = 5; // // tabPage1 @@ -1979,7 +1641,7 @@ private void InitializeComponent() this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(187, 195); + this.tabPage1.Size = new System.Drawing.Size(187, 228); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Species"; this.tabPage1.UseVisualStyleBackColor = true; @@ -1990,7 +1652,7 @@ private void InitializeComponent() this.listBoxSpeciesLib.FormattingEnabled = true; this.listBoxSpeciesLib.Location = new System.Drawing.Point(3, 3); this.listBoxSpeciesLib.Name = "listBoxSpeciesLib"; - this.listBoxSpeciesLib.Size = new System.Drawing.Size(181, 189); + this.listBoxSpeciesLib.Size = new System.Drawing.Size(181, 222); this.listBoxSpeciesLib.TabIndex = 0; this.listBoxSpeciesLib.SelectedIndexChanged += new System.EventHandler(this.listBoxSpeciesLib_SelectedIndexChanged); // @@ -2001,7 +1663,7 @@ private void InitializeComponent() this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(187, 195); + this.tabPage2.Size = new System.Drawing.Size(187, 228); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Owner"; this.tabPage2.UseVisualStyleBackColor = true; @@ -2013,7 +1675,7 @@ private void InitializeComponent() this.checkedListBoxOwner.FormattingEnabled = true; this.checkedListBoxOwner.Location = new System.Drawing.Point(3, 27); this.checkedListBoxOwner.Name = "checkedListBoxOwner"; - this.checkedListBoxOwner.Size = new System.Drawing.Size(181, 165); + this.checkedListBoxOwner.Size = new System.Drawing.Size(181, 198); this.checkedListBoxOwner.TabIndex = 0; this.checkedListBoxOwner.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBoxOwner_ItemCheck); // @@ -2035,7 +1697,7 @@ private void InitializeComponent() this.tabPageServer.Location = new System.Drawing.Point(4, 22); this.tabPageServer.Name = "tabPageServer"; this.tabPageServer.Padding = new System.Windows.Forms.Padding(3); - this.tabPageServer.Size = new System.Drawing.Size(187, 195); + this.tabPageServer.Size = new System.Drawing.Size(187, 228); this.tabPageServer.TabIndex = 5; this.tabPageServer.Text = "Server"; this.tabPageServer.UseVisualStyleBackColor = true; @@ -2047,7 +1709,7 @@ private void InitializeComponent() this.checkedListBoxFilterServers.FormattingEnabled = true; this.checkedListBoxFilterServers.Location = new System.Drawing.Point(3, 27); this.checkedListBoxFilterServers.Name = "checkedListBoxFilterServers"; - this.checkedListBoxFilterServers.Size = new System.Drawing.Size(181, 165); + this.checkedListBoxFilterServers.Size = new System.Drawing.Size(181, 198); this.checkedListBoxFilterServers.TabIndex = 2; this.checkedListBoxFilterServers.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBoxFilterServers_ItemCheck); // @@ -2068,7 +1730,7 @@ private void InitializeComponent() this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(187, 195); + this.tabPage3.Size = new System.Drawing.Size(187, 228); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Stats"; this.tabPage3.UseVisualStyleBackColor = true; @@ -2087,7 +1749,7 @@ private void InitializeComponent() this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(181, 189); + this.tableLayoutPanel2.Size = new System.Drawing.Size(181, 222); this.tableLayoutPanel2.TabIndex = 0; // // checkedListBoxConsiderStatTop @@ -2106,13 +1768,13 @@ private void InitializeComponent() "Torpor"}); this.checkedListBoxConsiderStatTop.Location = new System.Drawing.Point(3, 35); this.checkedListBoxConsiderStatTop.Name = "checkedListBoxConsiderStatTop"; - this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(175, 122); + this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(175, 155); this.checkedListBoxConsiderStatTop.TabIndex = 3; // // buttonRecalculateTops // this.buttonRecalculateTops.Dock = System.Windows.Forms.DockStyle.Fill; - this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 163); + this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 196); this.buttonRecalculateTops.Name = "buttonRecalculateTops"; this.buttonRecalculateTops.Size = new System.Drawing.Size(175, 23); this.buttonRecalculateTops.TabIndex = 2; @@ -2142,7 +1804,7 @@ private void InitializeComponent() this.tabPage4.Location = new System.Drawing.Point(4, 22); this.tabPage4.Name = "tabPage4"; this.tabPage4.Padding = new System.Windows.Forms.Padding(3); - this.tabPage4.Size = new System.Drawing.Size(187, 195); + this.tabPage4.Size = new System.Drawing.Size(187, 228); this.tabPage4.TabIndex = 3; this.tabPage4.Text = "View"; this.tabPage4.UseVisualStyleBackColor = true; @@ -2255,22 +1917,11 @@ private void InitializeComponent() this.tabPageLibRadarChart.Location = new System.Drawing.Point(4, 22); this.tabPageLibRadarChart.Name = "tabPageLibRadarChart"; this.tabPageLibRadarChart.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLibRadarChart.Size = new System.Drawing.Size(187, 195); + this.tabPageLibRadarChart.Size = new System.Drawing.Size(187, 228); this.tabPageLibRadarChart.TabIndex = 4; this.tabPageLibRadarChart.Text = "Chart"; this.tabPageLibRadarChart.UseVisualStyleBackColor = true; // - // radarChartLibrary - // - this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Fill; - this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); - this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); - this.radarChartLibrary.Name = "radarChartLibrary"; - this.radarChartLibrary.Size = new System.Drawing.Size(181, 189); - this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChartLibrary.TabIndex = 0; - this.radarChartLibrary.TabStop = false; - // // listViewLibrary // this.listViewLibrary.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -2307,7 +1958,7 @@ private void InitializeComponent() this.listViewLibrary.Location = new System.Drawing.Point(204, 3); this.listViewLibrary.Name = "listViewLibrary"; this.tableLayoutPanelLibrary.SetRowSpan(this.listViewLibrary, 2); - this.listViewLibrary.Size = new System.Drawing.Size(937, 617); + this.listViewLibrary.Size = new System.Drawing.Size(941, 650); this.listViewLibrary.TabIndex = 2; this.listViewLibrary.UseCompatibleStateImageBehavior = false; this.listViewLibrary.View = System.Windows.Forms.View.Details; @@ -2641,207 +2292,111 @@ private void InitializeComponent() this.toolStripMenuItemRemove.Text = "Delete creature..."; this.toolStripMenuItemRemove.Click += new System.EventHandler(this.toolStripMenuItemRemove_Click); // - // creatureBoxListView - // - this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); - this.creatureBoxListView.Name = "creatureBoxListView"; - this.creatureBoxListView.Size = new System.Drawing.Size(195, 390); - this.creatureBoxListView.TabIndex = 0; - this.creatureBoxListView.Changed += new ARKBreedingStats.CreatureBox.ChangedEventHandler(this.updateCreatureValues); - this.creatureBoxListView.GiveParents += new ARKBreedingStats.CreatureBox.EventHandler(this.creatureBoxListView_FindParents); - // // tabPagePedigree // this.tabPagePedigree.Controls.Add(this.pedigree1); this.tabPagePedigree.Location = new System.Drawing.Point(4, 22); this.tabPagePedigree.Name = "tabPagePedigree"; this.tabPagePedigree.Padding = new System.Windows.Forms.Padding(3); - this.tabPagePedigree.Size = new System.Drawing.Size(1150, 629); + this.tabPagePedigree.Size = new System.Drawing.Size(1154, 662); this.tabPagePedigree.TabIndex = 3; this.tabPagePedigree.Text = "Pedigree"; this.tabPagePedigree.UseVisualStyleBackColor = true; // - // pedigree1 - // - this.pedigree1.AutoScroll = true; - this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pedigree1.Location = new System.Drawing.Point(3, 3); - this.pedigree1.Name = "pedigree1"; - this.pedigree1.Size = new System.Drawing.Size(1144, 623); - this.pedigree1.TabIndex = 0; - // // tabPageTaming // this.tabPageTaming.Controls.Add(this.tamingControl1); this.tabPageTaming.Location = new System.Drawing.Point(4, 22); this.tabPageTaming.Name = "tabPageTaming"; this.tabPageTaming.Padding = new System.Windows.Forms.Padding(3); - this.tabPageTaming.Size = new System.Drawing.Size(1150, 629); + this.tabPageTaming.Size = new System.Drawing.Size(1154, 662); this.tabPageTaming.TabIndex = 8; this.tabPageTaming.Text = "Taming"; this.tabPageTaming.UseVisualStyleBackColor = true; // - // tamingControl1 - // - this.tamingControl1.AutoScroll = true; - this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tamingControl1.Location = new System.Drawing.Point(3, 3); - this.tamingControl1.Name = "tamingControl1"; - this.tamingControl1.Size = new System.Drawing.Size(1144, 623); - this.tamingControl1.TabIndex = 0; - this.tamingControl1.weaponDamages = new double[] { - 100D, - 100D, - 100D, - 100D, - 100D, - 100D}; - this.tamingControl1.weaponDamagesEnabled = 3; - // // tabPageBreedingPlan // this.tabPageBreedingPlan.Controls.Add(this.breedingPlan1); this.tabPageBreedingPlan.Location = new System.Drawing.Point(4, 22); this.tabPageBreedingPlan.Name = "tabPageBreedingPlan"; this.tabPageBreedingPlan.Padding = new System.Windows.Forms.Padding(3); - this.tabPageBreedingPlan.Size = new System.Drawing.Size(1150, 629); + this.tabPageBreedingPlan.Size = new System.Drawing.Size(1154, 662); this.tabPageBreedingPlan.TabIndex = 4; this.tabPageBreedingPlan.Text = "Breeding Plan"; this.tabPageBreedingPlan.UseVisualStyleBackColor = true; // - // breedingPlan1 - // - this.breedingPlan1.AutoScroll = true; - this.breedingPlan1.CurrentSpecies = null; - this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; - this.breedingPlan1.Location = new System.Drawing.Point(3, 3); - this.breedingPlan1.MutationLimit = 0; - this.breedingPlan1.Name = "breedingPlan1"; - this.breedingPlan1.Size = new System.Drawing.Size(1144, 623); - this.breedingPlan1.TabIndex = 0; - // // tabPageRaising // this.tabPageRaising.Controls.Add(this.raisingControl1); this.tabPageRaising.Location = new System.Drawing.Point(4, 22); this.tabPageRaising.Name = "tabPageRaising"; this.tabPageRaising.Padding = new System.Windows.Forms.Padding(3); - this.tabPageRaising.Size = new System.Drawing.Size(1150, 629); + this.tabPageRaising.Size = new System.Drawing.Size(1154, 662); this.tabPageRaising.TabIndex = 9; this.tabPageRaising.Text = "Raising"; this.tabPageRaising.UseVisualStyleBackColor = true; // - // raisingControl1 - // - this.raisingControl1.AutoScroll = true; - this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.raisingControl1.Location = new System.Drawing.Point(3, 3); - this.raisingControl1.Name = "raisingControl1"; - this.raisingControl1.Size = new System.Drawing.Size(1144, 623); - this.raisingControl1.TabIndex = 0; - // // tabPageTimer // this.tabPageTimer.Controls.Add(this.timerList1); this.tabPageTimer.Location = new System.Drawing.Point(4, 22); this.tabPageTimer.Name = "tabPageTimer"; this.tabPageTimer.Padding = new System.Windows.Forms.Padding(3); - this.tabPageTimer.Size = new System.Drawing.Size(1150, 629); + this.tabPageTimer.Size = new System.Drawing.Size(1154, 662); this.tabPageTimer.TabIndex = 6; this.tabPageTimer.Text = "Timer"; this.tabPageTimer.UseVisualStyleBackColor = true; // - // timerList1 - // - this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; - this.timerList1.Location = new System.Drawing.Point(3, 3); - this.timerList1.Name = "timerList1"; - this.timerList1.Size = new System.Drawing.Size(1144, 623); - this.timerList1.TabIndex = 0; - this.timerList1.TimerAlertsCSV = ""; - // // tabPagePlayerTribes // this.tabPagePlayerTribes.Controls.Add(this.tribesControl1); this.tabPagePlayerTribes.Location = new System.Drawing.Point(4, 22); this.tabPagePlayerTribes.Name = "tabPagePlayerTribes"; this.tabPagePlayerTribes.Padding = new System.Windows.Forms.Padding(3); - this.tabPagePlayerTribes.Size = new System.Drawing.Size(1150, 629); + this.tabPagePlayerTribes.Size = new System.Drawing.Size(1154, 662); this.tabPagePlayerTribes.TabIndex = 7; this.tabPagePlayerTribes.Text = "Player"; this.tabPagePlayerTribes.UseVisualStyleBackColor = true; // - // tribesControl1 - // - this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tribesControl1.Location = new System.Drawing.Point(3, 3); - this.tribesControl1.Name = "tribesControl1"; - this.tribesControl1.Size = new System.Drawing.Size(1144, 623); - this.tribesControl1.TabIndex = 0; - // // tabPageNotes // this.tabPageNotes.Controls.Add(this.notesControl1); this.tabPageNotes.Location = new System.Drawing.Point(4, 22); this.tabPageNotes.Name = "tabPageNotes"; this.tabPageNotes.Padding = new System.Windows.Forms.Padding(3); - this.tabPageNotes.Size = new System.Drawing.Size(1150, 629); + this.tabPageNotes.Size = new System.Drawing.Size(1154, 662); this.tabPageNotes.TabIndex = 10; this.tabPageNotes.Text = "Notes"; this.tabPageNotes.UseVisualStyleBackColor = true; // - // notesControl1 - // - this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.notesControl1.Location = new System.Drawing.Point(3, 3); - this.notesControl1.Name = "notesControl1"; - this.notesControl1.Size = new System.Drawing.Size(1144, 623); - this.notesControl1.TabIndex = 0; - // // TabPageOCR // this.TabPageOCR.Controls.Add(this.ocrControl1); this.TabPageOCR.Location = new System.Drawing.Point(4, 22); this.TabPageOCR.Name = "TabPageOCR"; this.TabPageOCR.Padding = new System.Windows.Forms.Padding(3); - this.TabPageOCR.Size = new System.Drawing.Size(1150, 629); + this.TabPageOCR.Size = new System.Drawing.Size(1154, 662); this.TabPageOCR.TabIndex = 5; this.TabPageOCR.Text = "Experimental OCR"; this.TabPageOCR.UseVisualStyleBackColor = true; // - // ocrControl1 - // - this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.ocrControl1.Location = new System.Drawing.Point(3, 3); - this.ocrControl1.Name = "ocrControl1"; - this.ocrControl1.Size = new System.Drawing.Size(1144, 623); - this.ocrControl1.TabIndex = 2; - // // tabPageExtractionTests // this.tabPageExtractionTests.Controls.Add(this.extractionTestControl1); this.tabPageExtractionTests.Location = new System.Drawing.Point(4, 22); this.tabPageExtractionTests.Name = "tabPageExtractionTests"; this.tabPageExtractionTests.Padding = new System.Windows.Forms.Padding(3); - this.tabPageExtractionTests.Size = new System.Drawing.Size(1150, 629); + this.tabPageExtractionTests.Size = new System.Drawing.Size(1154, 662); this.tabPageExtractionTests.TabIndex = 11; this.tabPageExtractionTests.Text = "Extraction Tests"; this.tabPageExtractionTests.UseVisualStyleBackColor = true; // - // extractionTestControl1 - // - this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); - this.extractionTestControl1.Name = "extractionTestControl1"; - this.extractionTestControl1.Size = new System.Drawing.Size(1144, 623); - this.extractionTestControl1.TabIndex = 0; - // // tabPageMultiplierTesting // this.tabPageMultiplierTesting.Location = new System.Drawing.Point(4, 22); this.tabPageMultiplierTesting.Name = "tabPageMultiplierTesting"; this.tabPageMultiplierTesting.Padding = new System.Windows.Forms.Padding(3); - this.tabPageMultiplierTesting.Size = new System.Drawing.Size(1150, 629); + this.tabPageMultiplierTesting.Size = new System.Drawing.Size(1154, 662); this.tabPageMultiplierTesting.TabIndex = 12; this.tabPageMultiplierTesting.Text = "Multiplier Testing"; this.tabPageMultiplierTesting.UseVisualStyleBackColor = true; @@ -2850,7 +2405,7 @@ private void InitializeComponent() // this.btnReadValuesFromArk.Location = new System.Drawing.Point(262, 3); this.btnReadValuesFromArk.Name = "btnReadValuesFromArk"; - this.btnReadValuesFromArk.Size = new System.Drawing.Size(174, 45); + this.btnReadValuesFromArk.Size = new System.Drawing.Size(111, 45); this.btnReadValuesFromArk.TabIndex = 41; this.btnReadValuesFromArk.Text = "Read Values From ARK Window"; this.btnReadValuesFromArk.UseVisualStyleBackColor = true; @@ -2872,9 +2427,9 @@ private void InitializeComponent() this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripProgressBar1, this.toolStripStatusLabel}); - this.statusStrip1.Location = new System.Drawing.Point(0, 758); + this.statusStrip1.Location = new System.Drawing.Point(0, 791); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(1158, 22); + this.statusStrip1.Size = new System.Drawing.Size(1162, 22); this.statusStrip1.TabIndex = 44; this.statusStrip1.Text = "statusStrip1"; // @@ -2916,7 +2471,7 @@ private void InitializeComponent() this.tsBtAddAsExtractionTest}); this.toolStrip2.Location = new System.Drawing.Point(0, 24); this.toolStrip2.Name = "toolStrip2"; - this.toolStrip2.Size = new System.Drawing.Size(1158, 25); + this.toolStrip2.Size = new System.Drawing.Size(1162, 25); this.toolStrip2.TabIndex = 1; this.toolStrip2.Text = "toolStrip2"; // @@ -3117,6 +2672,7 @@ private void InitializeComponent() // // panelToolBar // + this.panelToolBar.Controls.Add(this.btImportLastExported); this.panelToolBar.Controls.Add(this.pbSpecies); this.panelToolBar.Controls.Add(this.tbSpeciesGlobal); this.panelToolBar.Controls.Add(this.cbGuessSpecies); @@ -3129,9 +2685,19 @@ private void InitializeComponent() this.panelToolBar.Dock = System.Windows.Forms.DockStyle.Top; this.panelToolBar.Location = new System.Drawing.Point(0, 49); this.panelToolBar.Name = "panelToolBar"; - this.panelToolBar.Size = new System.Drawing.Size(1158, 54); + this.panelToolBar.Size = new System.Drawing.Size(1162, 54); this.panelToolBar.TabIndex = 45; // + // btImportLastExported + // + this.btImportLastExported.Location = new System.Drawing.Point(379, 3); + this.btImportLastExported.Name = "btImportLastExported"; + this.btImportLastExported.Size = new System.Drawing.Size(57, 44); + this.btImportLastExported.TabIndex = 56; + this.btImportLastExported.Text = "Last Export"; + this.btImportLastExported.UseVisualStyleBackColor = true; + this.btImportLastExported.Click += new System.EventHandler(this.btImportLastExported_Click); + // // pbSpecies // this.pbSpecies.Location = new System.Drawing.Point(3, 3); @@ -3142,18 +2708,6 @@ private void InitializeComponent() this.pbSpecies.TabStop = false; this.pbSpecies.Click += new System.EventHandler(this.pbSpecies_Click); // - // tbSpeciesGlobal - // - this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); - this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; - this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); - this.tbSpeciesGlobal.TabIndex = 13; - this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); - this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); - this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbSpeciesGlobal_KeyUp); - // // cbGuessSpecies // this.cbGuessSpecies.AutoSize = true; @@ -3169,7 +2723,7 @@ private void InitializeComponent() this.chkbToggleOverlay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkbToggleOverlay.Appearance = System.Windows.Forms.Appearance.Button; this.chkbToggleOverlay.AutoSize = true; - this.chkbToggleOverlay.Location = new System.Drawing.Point(1093, 28); + this.chkbToggleOverlay.Location = new System.Drawing.Point(1097, 28); this.chkbToggleOverlay.Name = "chkbToggleOverlay"; this.chkbToggleOverlay.Size = new System.Drawing.Size(53, 23); this.chkbToggleOverlay.TabIndex = 53; @@ -3183,7 +2737,7 @@ private void InitializeComponent() this.labelListening.AutoSize = true; this.labelListening.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelListening.ForeColor = System.Drawing.SystemColors.GrayText; - this.labelListening.Location = new System.Drawing.Point(1125, 3); + this.labelListening.Location = new System.Drawing.Point(1129, 3); this.labelListening.Name = "labelListening"; this.labelListening.Size = new System.Drawing.Size(21, 20); this.labelListening.TabIndex = 52; @@ -3207,21 +2761,521 @@ private void InitializeComponent() this.lbLibrarySelectionInfo.Size = new System.Drawing.Size(547, 45); this.lbLibrarySelectionInfo.TabIndex = 54; // + // llOnlineHelpExtractionIssues + // + this.llOnlineHelpExtractionIssues.AutoSize = true; + this.llOnlineHelpExtractionIssues.Location = new System.Drawing.Point(559, 612); + this.llOnlineHelpExtractionIssues.Name = "llOnlineHelpExtractionIssues"; + this.llOnlineHelpExtractionIssues.Size = new System.Drawing.Size(141, 13); + this.llOnlineHelpExtractionIssues.TabIndex = 50; + this.llOnlineHelpExtractionIssues.TabStop = true; + this.llOnlineHelpExtractionIssues.Text = "Red Stat-boxes: Online-Help"; + this.llOnlineHelpExtractionIssues.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llOnlineHelpExtractionIssues_LinkClicked); + // + // statPotentials1 + // + this.statPotentials1.Location = new System.Drawing.Point(556, 243); + this.statPotentials1.Name = "statPotentials1"; + this.statPotentials1.Size = new System.Drawing.Size(293, 361); + this.statPotentials1.TabIndex = 12; + // + // radarChart1 + // + this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); + this.radarChart1.Location = new System.Drawing.Point(6, 19); + this.radarChart1.Name = "radarChart1"; + this.radarChart1.Size = new System.Drawing.Size(200, 200); + this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChart1.TabIndex = 10; + this.radarChart1.TabStop = false; + // + // statTestingHealth + // + this.statTestingHealth.BackColor = System.Drawing.Color.Transparent; + this.statTestingHealth.BreedingValue = 0D; + this.statTestingHealth.DomLevelLockedZero = false; + this.statTestingHealth.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingHealth.Input = 100D; + this.statTestingHealth.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingHealth.LevelDom = 0; + this.statTestingHealth.LevelWild = 0; + this.statTestingHealth.Location = new System.Drawing.Point(6, 32); + this.statTestingHealth.Name = "statTestingHealth"; + this.statTestingHealth.Percent = false; + this.statTestingHealth.Size = new System.Drawing.Size(295, 50); + this.statTestingHealth.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingHealth.TabIndex = 0; + // + // statTestingStamina + // + this.statTestingStamina.BackColor = System.Drawing.Color.Transparent; + this.statTestingStamina.BreedingValue = 0D; + this.statTestingStamina.DomLevelLockedZero = false; + this.statTestingStamina.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingStamina.Input = 100D; + this.statTestingStamina.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingStamina.LevelDom = 0; + this.statTestingStamina.LevelWild = 0; + this.statTestingStamina.Location = new System.Drawing.Point(6, 82); + this.statTestingStamina.Name = "statTestingStamina"; + this.statTestingStamina.Percent = false; + this.statTestingStamina.Size = new System.Drawing.Size(295, 50); + this.statTestingStamina.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingStamina.TabIndex = 1; + // + // statTestingOxygen + // + this.statTestingOxygen.BackColor = System.Drawing.Color.Transparent; + this.statTestingOxygen.BreedingValue = 0D; + this.statTestingOxygen.DomLevelLockedZero = false; + this.statTestingOxygen.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingOxygen.Input = 100D; + this.statTestingOxygen.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingOxygen.LevelDom = 0; + this.statTestingOxygen.LevelWild = 0; + this.statTestingOxygen.Location = new System.Drawing.Point(6, 132); + this.statTestingOxygen.Name = "statTestingOxygen"; + this.statTestingOxygen.Percent = false; + this.statTestingOxygen.Size = new System.Drawing.Size(295, 50); + this.statTestingOxygen.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingOxygen.TabIndex = 2; + // + // statTestingFood + // + this.statTestingFood.BackColor = System.Drawing.Color.Transparent; + this.statTestingFood.BreedingValue = 0D; + this.statTestingFood.DomLevelLockedZero = false; + this.statTestingFood.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingFood.Input = 100D; + this.statTestingFood.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingFood.LevelDom = 0; + this.statTestingFood.LevelWild = 0; + this.statTestingFood.Location = new System.Drawing.Point(6, 182); + this.statTestingFood.Name = "statTestingFood"; + this.statTestingFood.Percent = false; + this.statTestingFood.Size = new System.Drawing.Size(295, 50); + this.statTestingFood.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingFood.TabIndex = 3; + // + // statTestingWeight + // + this.statTestingWeight.BackColor = System.Drawing.Color.Transparent; + this.statTestingWeight.BreedingValue = 0D; + this.statTestingWeight.DomLevelLockedZero = false; + this.statTestingWeight.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingWeight.Input = 100D; + this.statTestingWeight.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingWeight.LevelDom = 0; + this.statTestingWeight.LevelWild = 0; + this.statTestingWeight.Location = new System.Drawing.Point(6, 232); + this.statTestingWeight.Name = "statTestingWeight"; + this.statTestingWeight.Percent = false; + this.statTestingWeight.Size = new System.Drawing.Size(295, 50); + this.statTestingWeight.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingWeight.TabIndex = 4; + // + // statTestingDamage + // + this.statTestingDamage.BackColor = System.Drawing.Color.Transparent; + this.statTestingDamage.BreedingValue = 0D; + this.statTestingDamage.DomLevelLockedZero = false; + this.statTestingDamage.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingDamage.Input = 100D; + this.statTestingDamage.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingDamage.LevelDom = 0; + this.statTestingDamage.LevelWild = 0; + this.statTestingDamage.Location = new System.Drawing.Point(6, 282); + this.statTestingDamage.Name = "statTestingDamage"; + this.statTestingDamage.Percent = false; + this.statTestingDamage.Size = new System.Drawing.Size(295, 50); + this.statTestingDamage.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingDamage.TabIndex = 5; + // + // statTestingSpeed + // + this.statTestingSpeed.BackColor = System.Drawing.Color.Transparent; + this.statTestingSpeed.BreedingValue = 0D; + this.statTestingSpeed.DomLevelLockedZero = false; + this.statTestingSpeed.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingSpeed.Input = 100D; + this.statTestingSpeed.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingSpeed.LevelDom = 0; + this.statTestingSpeed.LevelWild = 0; + this.statTestingSpeed.Location = new System.Drawing.Point(6, 332); + this.statTestingSpeed.Name = "statTestingSpeed"; + this.statTestingSpeed.Percent = false; + this.statTestingSpeed.Size = new System.Drawing.Size(295, 50); + this.statTestingSpeed.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingSpeed.TabIndex = 6; + // + // statTestingTorpor + // + this.statTestingTorpor.BackColor = System.Drawing.Color.Transparent; + this.statTestingTorpor.BreedingValue = 0D; + this.statTestingTorpor.DomLevelLockedZero = false; + this.statTestingTorpor.ForeColor = System.Drawing.SystemColors.ControlText; + this.statTestingTorpor.Input = 100D; + this.statTestingTorpor.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statTestingTorpor.LevelDom = 0; + this.statTestingTorpor.LevelWild = 0; + this.statTestingTorpor.Location = new System.Drawing.Point(6, 382); + this.statTestingTorpor.Name = "statTestingTorpor"; + this.statTestingTorpor.Percent = false; + this.statTestingTorpor.Size = new System.Drawing.Size(295, 50); + this.statTestingTorpor.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statTestingTorpor.TabIndex = 7; + // + // creatureInfoInputTester + // + this.creatureInfoInputTester.Cooldown = new System.DateTime(2018, 3, 25, 19, 50, 11, 520); + this.creatureInfoInputTester.CreatureName = ""; + this.creatureInfoInputTester.CreatureNote = ""; + this.creatureInfoInputTester.CreatureOwner = ""; + this.creatureInfoInputTester.CreatureServer = ""; + this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Sex.Unknown; + this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; + this.creatureInfoInputTester.CreatureTribe = ""; + this.creatureInfoInputTester.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 11, 41, 997); + this.creatureInfoInputTester.father = null; + this.creatureInfoInputTester.Grown = new System.DateTime(2018, 3, 25, 19, 50, 11, 521); + this.creatureInfoInputTester.Location = new System.Drawing.Point(321, 184); + this.creatureInfoInputTester.mother = null; + this.creatureInfoInputTester.MutationCounterFather = 0; + this.creatureInfoInputTester.MutationCounterMother = 0; + this.creatureInfoInputTester.Name = "creatureInfoInputTester"; + this.creatureInfoInputTester.Neutered = false; + this.creatureInfoInputTester.RegionColors = new int[] { + 0, + 0, + 0, + 0, + 0, + 0}; + this.creatureInfoInputTester.Size = new System.Drawing.Size(229, 438); + this.creatureInfoInputTester.TabIndex = 4; + this.creatureInfoInputTester.Add2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Add2LibraryClickedEventHandler(this.creatureInfoInputTester_Add2Library_Clicked); + this.creatureInfoInputTester.Save2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Save2LibraryClickedEventHandler(this.creatureInfoInputTester_Save2Library_Clicked); + this.creatureInfoInputTester.ParentListRequested += new ARKBreedingStats.CreatureInfoInput.RequestParentListEventHandler(this.creatureInfoInput_ParentListRequested); + // + // radarChartExtractor + // + this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; + this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); + this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); + this.radarChartExtractor.Name = "radarChartExtractor"; + this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); + this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.radarChartExtractor.TabIndex = 10; + this.radarChartExtractor.TabStop = false; + // + // statIOHealth + // + this.statIOHealth.BackColor = System.Drawing.Color.Transparent; + this.statIOHealth.BreedingValue = 0D; + this.statIOHealth.DomLevelLockedZero = false; + this.statIOHealth.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOHealth.Input = 100D; + this.statIOHealth.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOHealth.LevelDom = 0; + this.statIOHealth.LevelWild = 0; + this.statIOHealth.Location = new System.Drawing.Point(6, 32); + this.statIOHealth.Name = "statIOHealth"; + this.statIOHealth.Percent = false; + this.statIOHealth.Size = new System.Drawing.Size(295, 50); + this.statIOHealth.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOHealth.TabIndex = 0; + this.statIOHealth.Click += new System.EventHandler(this.statIO_Click); + // + // statIODamage + // + this.statIODamage.BackColor = System.Drawing.Color.Transparent; + this.statIODamage.BreedingValue = 0D; + this.statIODamage.DomLevelLockedZero = false; + this.statIODamage.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIODamage.Input = 100D; + this.statIODamage.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIODamage.LevelDom = 0; + this.statIODamage.LevelWild = 0; + this.statIODamage.Location = new System.Drawing.Point(6, 282); + this.statIODamage.Name = "statIODamage"; + this.statIODamage.Percent = false; + this.statIODamage.Size = new System.Drawing.Size(295, 50); + this.statIODamage.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIODamage.TabIndex = 5; + this.statIODamage.Click += new System.EventHandler(this.statIO_Click); + // + // statIOTorpor + // + this.statIOTorpor.BackColor = System.Drawing.Color.Transparent; + this.statIOTorpor.BreedingValue = 0D; + this.statIOTorpor.DomLevelLockedZero = false; + this.statIOTorpor.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOTorpor.Input = 100D; + this.statIOTorpor.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOTorpor.LevelDom = 0; + this.statIOTorpor.LevelWild = 0; + this.statIOTorpor.Location = new System.Drawing.Point(6, 382); + this.statIOTorpor.Name = "statIOTorpor"; + this.statIOTorpor.Percent = false; + this.statIOTorpor.Size = new System.Drawing.Size(295, 50); + this.statIOTorpor.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOTorpor.TabIndex = 7; + // + // statIOWeight + // + this.statIOWeight.BackColor = System.Drawing.Color.Transparent; + this.statIOWeight.BreedingValue = 0D; + this.statIOWeight.DomLevelLockedZero = false; + this.statIOWeight.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOWeight.Input = 100D; + this.statIOWeight.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOWeight.LevelDom = 0; + this.statIOWeight.LevelWild = 0; + this.statIOWeight.Location = new System.Drawing.Point(6, 232); + this.statIOWeight.Name = "statIOWeight"; + this.statIOWeight.Percent = false; + this.statIOWeight.Size = new System.Drawing.Size(295, 50); + this.statIOWeight.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOWeight.TabIndex = 4; + this.statIOWeight.Click += new System.EventHandler(this.statIO_Click); + // + // statIOSpeed + // + this.statIOSpeed.BackColor = System.Drawing.Color.Transparent; + this.statIOSpeed.BreedingValue = 0D; + this.statIOSpeed.DomLevelLockedZero = false; + this.statIOSpeed.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOSpeed.Input = 100D; + this.statIOSpeed.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOSpeed.LevelDom = 0; + this.statIOSpeed.LevelWild = 0; + this.statIOSpeed.Location = new System.Drawing.Point(6, 332); + this.statIOSpeed.Name = "statIOSpeed"; + this.statIOSpeed.Percent = false; + this.statIOSpeed.Size = new System.Drawing.Size(295, 50); + this.statIOSpeed.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOSpeed.TabIndex = 6; + this.statIOSpeed.Click += new System.EventHandler(this.statIO_Click); + // + // statIOFood + // + this.statIOFood.BackColor = System.Drawing.Color.Transparent; + this.statIOFood.BreedingValue = 0D; + this.statIOFood.DomLevelLockedZero = false; + this.statIOFood.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOFood.Input = 100D; + this.statIOFood.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOFood.LevelDom = 0; + this.statIOFood.LevelWild = 0; + this.statIOFood.Location = new System.Drawing.Point(6, 182); + this.statIOFood.Name = "statIOFood"; + this.statIOFood.Percent = false; + this.statIOFood.Size = new System.Drawing.Size(295, 50); + this.statIOFood.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOFood.TabIndex = 3; + this.statIOFood.Click += new System.EventHandler(this.statIO_Click); + // + // statIOOxygen + // + this.statIOOxygen.BackColor = System.Drawing.Color.Transparent; + this.statIOOxygen.BreedingValue = 0D; + this.statIOOxygen.DomLevelLockedZero = false; + this.statIOOxygen.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOOxygen.Input = 100D; + this.statIOOxygen.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOOxygen.LevelDom = 0; + this.statIOOxygen.LevelWild = 0; + this.statIOOxygen.Location = new System.Drawing.Point(6, 132); + this.statIOOxygen.Name = "statIOOxygen"; + this.statIOOxygen.Percent = false; + this.statIOOxygen.Size = new System.Drawing.Size(295, 50); + this.statIOOxygen.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOOxygen.TabIndex = 2; + this.statIOOxygen.Click += new System.EventHandler(this.statIO_Click); + // + // statIOStamina + // + this.statIOStamina.BackColor = System.Drawing.Color.Transparent; + this.statIOStamina.BreedingValue = 0D; + this.statIOStamina.DomLevelLockedZero = false; + this.statIOStamina.ForeColor = System.Drawing.SystemColors.ControlText; + this.statIOStamina.Input = 100D; + this.statIOStamina.InputType = ARKBreedingStats.StatIOInputType.FinalValueInputType; + this.statIOStamina.LevelDom = 0; + this.statIOStamina.LevelWild = 0; + this.statIOStamina.Location = new System.Drawing.Point(6, 82); + this.statIOStamina.Name = "statIOStamina"; + this.statIOStamina.Percent = false; + this.statIOStamina.Size = new System.Drawing.Size(295, 50); + this.statIOStamina.Status = ARKBreedingStats.StatIOStatus.Neutral; + this.statIOStamina.TabIndex = 1; + this.statIOStamina.Click += new System.EventHandler(this.statIO_Click); + // + // creatureInfoInputExtractor + // + this.creatureInfoInputExtractor.Cooldown = new System.DateTime(2018, 3, 25, 19, 50, 11, 547); + this.creatureInfoInputExtractor.CreatureName = ""; + this.creatureInfoInputExtractor.CreatureNote = ""; + this.creatureInfoInputExtractor.CreatureOwner = ""; + this.creatureInfoInputExtractor.CreatureServer = ""; + this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Sex.Unknown; + this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.CreatureStatus.Available; + this.creatureInfoInputExtractor.CreatureTribe = ""; + this.creatureInfoInputExtractor.domesticatedAt = new System.DateTime(2016, 7, 5, 13, 12, 15, 968); + this.creatureInfoInputExtractor.father = null; + this.creatureInfoInputExtractor.Grown = new System.DateTime(2018, 3, 25, 19, 50, 11, 548); + this.creatureInfoInputExtractor.Location = new System.Drawing.Point(321, 184); + this.creatureInfoInputExtractor.mother = null; + this.creatureInfoInputExtractor.MutationCounterFather = 0; + this.creatureInfoInputExtractor.MutationCounterMother = 0; + this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; + this.creatureInfoInputExtractor.Neutered = false; + this.creatureInfoInputExtractor.RegionColors = new int[] { + 0, + 0, + 0, + 0, + 0, + 0}; + this.creatureInfoInputExtractor.Size = new System.Drawing.Size(229, 438); + this.creatureInfoInputExtractor.TabIndex = 7; + this.creatureInfoInputExtractor.Add2Library_Clicked += new ARKBreedingStats.CreatureInfoInput.Add2LibraryClickedEventHandler(this.creatureInfoInput1_Add2Library_Clicked); + this.creatureInfoInputExtractor.ParentListRequested += new ARKBreedingStats.CreatureInfoInput.RequestParentListEventHandler(this.creatureInfoInput_ParentListRequested); + // + // radarChartLibrary + // + this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Fill; + this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); + this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); + this.radarChartLibrary.Name = "radarChartLibrary"; + this.radarChartLibrary.Size = new System.Drawing.Size(181, 222); + this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChartLibrary.TabIndex = 0; + this.radarChartLibrary.TabStop = false; + // + // creatureBoxListView + // + this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); + this.creatureBoxListView.Name = "creatureBoxListView"; + this.creatureBoxListView.Size = new System.Drawing.Size(195, 390); + this.creatureBoxListView.TabIndex = 0; + this.creatureBoxListView.Changed += new ARKBreedingStats.CreatureBox.ChangedEventHandler(this.updateCreatureValues); + this.creatureBoxListView.GiveParents += new ARKBreedingStats.CreatureBox.EventHandler(this.creatureBoxListView_FindParents); + // + // pedigree1 + // + this.pedigree1.AutoScroll = true; + this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pedigree1.Location = new System.Drawing.Point(3, 3); + this.pedigree1.Name = "pedigree1"; + this.pedigree1.Size = new System.Drawing.Size(1148, 656); + this.pedigree1.TabIndex = 0; + // + // tamingControl1 + // + this.tamingControl1.AutoScroll = true; + this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tamingControl1.Location = new System.Drawing.Point(3, 3); + this.tamingControl1.Name = "tamingControl1"; + this.tamingControl1.Size = new System.Drawing.Size(1148, 656); + this.tamingControl1.TabIndex = 0; + this.tamingControl1.weaponDamages = new double[] { + 100D, + 100D, + 100D, + 100D, + 100D, + 100D}; + this.tamingControl1.weaponDamagesEnabled = 3; + // + // breedingPlan1 + // + this.breedingPlan1.AutoScroll = true; + this.breedingPlan1.CurrentSpecies = null; + this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; + this.breedingPlan1.Location = new System.Drawing.Point(3, 3); + this.breedingPlan1.MutationLimit = 0; + this.breedingPlan1.Name = "breedingPlan1"; + this.breedingPlan1.Size = new System.Drawing.Size(1148, 656); + this.breedingPlan1.TabIndex = 0; + // + // raisingControl1 + // + this.raisingControl1.AutoScroll = true; + this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.raisingControl1.Location = new System.Drawing.Point(3, 3); + this.raisingControl1.Name = "raisingControl1"; + this.raisingControl1.Size = new System.Drawing.Size(1148, 656); + this.raisingControl1.TabIndex = 0; + // + // timerList1 + // + this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.timerList1.Location = new System.Drawing.Point(3, 3); + this.timerList1.Name = "timerList1"; + this.timerList1.Size = new System.Drawing.Size(1148, 656); + this.timerList1.TabIndex = 0; + this.timerList1.TimerAlertsCSV = ""; + // + // tribesControl1 + // + this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tribesControl1.Location = new System.Drawing.Point(3, 3); + this.tribesControl1.Name = "tribesControl1"; + this.tribesControl1.Size = new System.Drawing.Size(1148, 656); + this.tribesControl1.TabIndex = 0; + // + // notesControl1 + // + this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.notesControl1.Location = new System.Drawing.Point(3, 3); + this.notesControl1.Name = "notesControl1"; + this.notesControl1.Size = new System.Drawing.Size(1148, 656); + this.notesControl1.TabIndex = 0; + // + // ocrControl1 + // + this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ocrControl1.Location = new System.Drawing.Point(3, 3); + this.ocrControl1.Name = "ocrControl1"; + this.ocrControl1.Size = new System.Drawing.Size(1148, 656); + this.ocrControl1.TabIndex = 2; + // + // extractionTestControl1 + // + this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); + this.extractionTestControl1.Name = "extractionTestControl1"; + this.extractionTestControl1.Size = new System.Drawing.Size(1148, 656); + this.extractionTestControl1.TabIndex = 0; + // // speciesSelector1 // this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; this.speciesSelector1.LastSpecies = new string[0]; this.speciesSelector1.Location = new System.Drawing.Point(0, 103); this.speciesSelector1.Name = "speciesSelector1"; - this.speciesSelector1.Size = new System.Drawing.Size(1158, 655); + this.speciesSelector1.Size = new System.Drawing.Size(1162, 688); this.speciesSelector1.TabIndex = 0; // + // tbSpeciesGlobal + // + this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); + this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; + this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); + this.tbSpeciesGlobal.TabIndex = 13; + this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); + this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); + this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbSpeciesGlobal_KeyUp); + // // Form1 // this.AcceptButton = this.buttonExtract; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1158, 780); + this.ClientSize = new System.Drawing.Size(1162, 813); this.Controls.Add(this.tabControlMain); this.Controls.Add(this.speciesSelector1); this.Controls.Add(this.panelToolBar); @@ -3258,7 +3312,6 @@ private void InitializeComponent() this.tabControlMain.ResumeLayout(false); this.tabPageStatTesting.ResumeLayout(false); this.groupBox8.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); this.panelWildTamedBredTester.ResumeLayout(false); this.panelWildTamedBredTester.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -3268,7 +3321,6 @@ private void InitializeComponent() this.tabPageExtractor.ResumeLayout(false); this.tabPageExtractor.PerformLayout(); this.groupBoxRadarChartExtractor.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); this.groupBoxTamingInfo.ResumeLayout(false); this.gbStats.ResumeLayout(false); this.gbStats.PerformLayout(); @@ -3284,7 +3336,6 @@ private void InitializeComponent() this.tabPage4.ResumeLayout(false); this.tabPage4.PerformLayout(); this.tabPageLibRadarChart.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.contextMenuStripLibrary.ResumeLayout(false); this.tabPagePedigree.ResumeLayout(false); this.tabPageTaming.ResumeLayout(false); @@ -3302,6 +3353,9 @@ private void InitializeComponent() this.panelToolBar.ResumeLayout(false); this.panelToolBar.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -3453,7 +3507,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripButton toolStripButtonExtract; private System.Windows.Forms.ToolStripButton toolStripButtonCopy2Extractor; private System.Windows.Forms.Button buttonExtract; - private System.Windows.Forms.Button buttonHelp; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox gbStats; private System.Windows.Forms.Label label2; @@ -3581,5 +3634,10 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox cbLibraryShowFemales; private System.Windows.Forms.ToolStripMenuItem femalesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem malesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem importExportedCreaturesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem importAllCreaturesInFolderToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem importAllCreaturesInSelectedFolderToolStripMenuItem; + private System.Windows.Forms.Button btImportLastExported; + private System.Windows.Forms.LinkLabel llOnlineHelpExtractionIssues; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 82cfffe1..954645d9 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -9,6 +9,9 @@ using System.IO; using System.Diagnostics; using System.Configuration; +using System.Threading.Tasks; +using System.Threading; +using ARKBreedingStats.species; namespace ARKBreedingStats { @@ -17,7 +20,7 @@ public partial class Form1 : Form private CreatureCollection creatureCollection = new CreatureCollection(); private string currentFileName = ""; private bool collectionDirty = false; - private Dictionary topStats = new Dictionary(); // list of top stats of all creatures per species + private Dictionary topLevels = new Dictionary(); // list of top stats of all creatures per species private List statIOs = new List(); private List testingIOs = new List(); private int activeStat = -1; @@ -40,8 +43,10 @@ public partial class Form1 : Form private Extraction extractor; private bool oxygenForAll; private SpeechRecognition speechRecognition; - private Timer timerGlobal; + private System.Windows.Forms.Timer timerGlobal; private Dictionary libraryViews; + private ExportedCreatureList exportedCreatureList; + private uiControls.ExportedCreatureControl exportedCreatureControl; // OCR stuff public ARKOverlay overlay; @@ -104,7 +109,7 @@ public Form1() settingsToolStripMenuItem.ShortcutKeyDisplayString = ((new KeysConverter()).ConvertTo(Keys.Control, typeof(string))).ToString().Replace("None", ","); - timerGlobal = new Timer(); + timerGlobal = new System.Windows.Forms.Timer(); timerGlobal.Interval = 1000; timerGlobal.Tick += TimerGlobal_Tick; } @@ -263,10 +268,8 @@ private void Form1_Load(object sender, EventArgs e) tt.SetToolTip(lblExtractorWildLevel, "Wild levels, which are considered for breeding"); tt.SetToolTip(lblTesterWildLevel, "Wild levels, which are considered for breeding"); tt.SetToolTip(cbGuessSpecies, "If checked, the tool will try to guess the species after reading the values from ARK.\nIf the tool recognizes the species-name it will take that, otherwise it will check if the stat-values match a certain species.\n\nUncheck this if the tool repeatedly selects the wrong species after OCR (you have to choose it manually then)."); - - // was used to calculate the growing-progress. TODO: remove? (UI doesn't show the current weight anymore) - creatureInfoInputExtractor.weightStat = statIOs[4]; - creatureInfoInputTester.weightStat = testingIOs[4]; + tt.SetToolTip(btImportLastExported, "Import the creature-file that was exported last (ingame with the \"Export Data\"-function"); + tt.SetToolTip(btnReadValuesFromArk, "Perfom an OCR on the opened inventory of a creature ingame.\nTo use this feature you have to enable OCR in the settings and load a ocr-config-file which is made for your screen-resolution in the OCR-tab."); // Set up the file watcher fileSync = new FileSync(currentFileName, collectionChanged); @@ -354,21 +357,6 @@ private void Form1_Load(object sender, EventArgs e) checkForUpdates(true); timerGlobal.Start(); - - //// TODO: debug-numbers - //statIOs[0].Input = 3263.2; - //statIOs[1].Input = 2625; - //statIOs[2].Input = 525; - //statIOs[3].Input = 5811; - //statIOs[4].Input = 625.8; - //statIOs[5].Input = 3.171; - //statIOs[6].Input = 1.118; - //statIOs[7].Input = 8234.3; - //comboBoxSpeciesGlobal.SelectedIndex = Values.V.speciesNames.IndexOf("Argentavis"); - //numericUpDownLevel.Value = 189; - //checkBoxAlreadyBred.Checked = true; - //numericUpDownImprintingBonusExtractor.Value = 59; - //tabControlMain.SelectedTab = tabPageExtractor; } private void setSpeciesIndex(int speciesIndex) @@ -430,13 +418,16 @@ private void clearAll() labelTE.BackColor = System.Drawing.Color.Transparent; labelTE.Text = ""; creatureInfoInputExtractor.ButtonEnabled = false; - creatureInfoInputExtractor.MutationCounter = 0; + creatureInfoInputExtractor.MutationCounterMother = 0; + creatureInfoInputExtractor.domesticatedAt = DateTime.Now; + creatureInfoInputExtractor.parentListValid = false; + creatureInfoInputExtractor.CreatureGuid = Guid.Empty; activeStat = -1; labelSumDom.Text = ""; labelSumWild.Text = ""; labelSumDomSB.Text = ""; updateTorporInTester = true; - buttonHelp.Visible = false; + llOnlineHelpExtractionIssues.Visible = false; labelErrorHelp.Visible = false; labelImprintingFailInfo.Visible = false; groupBoxPossibilities.Visible = false; @@ -444,8 +435,7 @@ private void clearAll() labelDoc.Visible = false; button2TamingCalc.Visible = checkBoxQuickWildCheck.Checked; groupBoxTamingInfo.Visible = false; - creatureInfoInputExtractor.domesticatedAt = DateTime.Now; - creatureInfoInputExtractor.parentListValid = false; + exportedCreatureControl = null; } private void toolStripButtonExtract_Click(object sender, EventArgs e) @@ -651,7 +641,7 @@ private bool extractLevels(bool autoExtraction = false) private void extractionFailed() { - buttonHelp.Visible = true; + llOnlineHelpExtractionIssues.Visible = true; labelErrorHelp.Visible = true; groupBoxPossibilities.Visible = false; groupBoxRadarChartExtractor.Visible = false; @@ -716,6 +706,7 @@ private void showSumOfChosenLevels() valid = false; break; } + statIOs[s].TopLevel = StatIOStatus.Neutral; } if (valid) { @@ -764,6 +755,16 @@ private void showSumOfChosenLevels() radarChartExtractor.setLevels(statIOs.Select(s => s.LevelWild).ToArray()); toolStripButtonSaveCreatureValuesTemp.Visible = false; cbExactlyImprinting.BackColor = Color.Transparent; + if (topLevels.ContainsKey(speciesSelector1.species)) + { + for (int s = 0; s < 7; s++) + { + if (statIOs[s].LevelWild == topLevels[speciesSelector1.species][s]) + statIOs[s].TopLevel = StatIOStatus.TopLevel; + else if (statIOs[s].LevelWild > topLevels[speciesSelector1.species][s]) + statIOs[s].TopLevel = StatIOStatus.NewTopLevel; + } + } } creatureInfoInputExtractor.ButtonEnabled = allValid; groupBoxRadarChartExtractor.Visible = allValid; @@ -875,7 +876,7 @@ private void setPossibilitiesListview(int s) for (int r = 0; r < extractor.results[s].Count; r++) { subItems.Clear(); - te = extractor.results[s][r].TE; + te = Math.Round(extractor.results[s][r].TE, 4); subItems.Add(extractor.results[s][r].levelWild.ToString()); subItems.Add(extractor.results[s][r].levelDom.ToString()); subItems.Add((te >= 0 ? (te * 100).ToString() : "")); @@ -1173,9 +1174,11 @@ private void add2Lib(bool fromExtractor = true) creature.server = input.CreatureServer; creature.domesticatedAt = input.domesticatedAt; - creature.mutationCounter = input.MutationCounter; - + creature.mutationCounter = input.MutationCounterMother; creature.status = input.CreatureStatus; + creature.colors = input.RegionColors; + if (input.CreatureGuid != Guid.Empty) + creature.guid = input.CreatureGuid; creature.recalculateCreatureValues(levelStep); creature.recalculateAncestorGenerations(); @@ -1189,6 +1192,10 @@ private void add2Lib(bool fromExtractor = true) creatureInfoInputExtractor.parentListValid = false; creatureInfoInputTester.parentListValid = false; + + // set status of exportedCreatureControl if available + if (exportedCreatureControl != null) + exportedCreatureControl.Status = true; } private int[] getCurrentWildLevels(bool fromExtractor = true) @@ -1293,6 +1300,40 @@ private void applySettingsToValues() { updateAllTesterValues(); } + + //// ark-tools importer menu + runDefaultExtractionToolStripMenuItem.DropDownItems.Clear(); + runDefaultExtractionAndImportFileToolStripMenuItem.DropDownItems.Clear(); + // extract + if (Properties.Settings.Default.arkSavegamePaths != null) + { + foreach (string f in Properties.Settings.Default.arkSavegamePaths) + { + ToolStripMenuItem tsmi = new ToolStripMenuItem(f); + tsmi.Click += runPresetExtraction; + runDefaultExtractionToolStripMenuItem.DropDownItems.Add(tsmi); + } + // extract and import + foreach (string f in Properties.Settings.Default.arkSavegamePaths) + { + ToolStripMenuItem tsmi = new ToolStripMenuItem(f); + tsmi.Click += runPresetExtractionAndImport; + runDefaultExtractionAndImportFileToolStripMenuItem.DropDownItems.Add(tsmi); + } + } + } + + private void runPresetExtractionAndImport(object sender, EventArgs e) + { + var filePath = ((ToolStripMenuItem)sender).Text; + if (performExtractionWithARKTools(filePath)) + importCollectionFromArkTools(Properties.Settings.Default.savegameExtractionPath + @"\classes.json"); + } + + private void runPresetExtraction(object sender, EventArgs e) + { + var filePath = ((ToolStripMenuItem)sender).Text; + performExtractionWithARKTools(filePath); } private void createCreatureTagList() @@ -1435,20 +1476,40 @@ private void saveNewCollection() private void saveCollectionToFileName(string fileName) { - XmlSerializer writer = new XmlSerializer(typeof(CreatureCollection)); - try - { - fileSync.justSaving(); - System.IO.FileStream file = System.IO.File.Create(fileName); - writer.Serialize(file, creatureCollection); - file.Close(); - Properties.Settings.Default.LastSaveFile = fileName; - } - catch (Exception e) + // Wait until the file is writeable + int numberOfRetries = 5; + int delayOnRetry = 1000; + bool fileSaved = false; + + for (int i = 1; i <= numberOfRetries; ++i) { - MessageBox.Show("Error during serialization.\nErrormessage:\n\n" + e.Message, "Serialization-Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + try + { + XmlSerializer writer = new XmlSerializer(typeof(CreatureCollection)); + fileSync.justSaving(); + System.IO.FileStream file = System.IO.File.Create(fileName); + writer.Serialize(file, creatureCollection); + file.Close(); + fileSaved = true; + Properties.Settings.Default.LastSaveFile = fileName; + + break; // when file is saved, break + } + catch (IOException) + { + // if file is not saveable + Thread.Sleep(delayOnRetry); + } + catch (InvalidOperationException e) + { + MessageBox.Show("Error during serialization.\nErrormessage:\n\n" + e.Message, "Serialization-Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } - setCollectionChanged(false); + + if (fileSaved) + setCollectionChanged(false); + else + MessageBox.Show("This file couldn't be saved:\n" + fileName + "\nMaybe the file is used by another application.", "Error during saving", MessageBoxButtons.OK, MessageBoxIcon.Error); } private bool loadCollectionFile(string fileName, bool keepCurrentCreatures = false, bool stayInCurrentTab = false) @@ -1866,7 +1927,7 @@ private ListViewItem createCreatureLVItem(Creature cr, ListViewGroup g) { if (cr.colors[cl] != 0) { - lvi.SubItems[20 + cl].BackColor = Utils.creatureColor(cr.colors[cl]); + lvi.SubItems[20 + cl].BackColor = species.CreatureColors.creatureColor(cr.colors[cl]); lvi.SubItems[20 + cl].ForeColor = Utils.foreColor(lvi.SubItems[20 + cl].BackColor); } else @@ -2596,9 +2657,13 @@ private void calculateTopStats(List creatures) continue; } - if (!topStats.ContainsKey(species)) + if (!topLevels.ContainsKey(species)) { - topStats.Add(species, bestStat); + topLevels.Add(species, bestStat); + } + else + { + topLevels[species] = bestStat; } // beststat and bestcreatures now contain the best stats and creatures for each stat. @@ -3281,6 +3346,7 @@ private void exportSelectedCreatureToClipboard(bool breeding = true, bool ARKml var levelStep = creatureCollection.getWildLevelStep(); Creature creature = new Creature(species, input.CreatureName, input.CreatureOwner, input.CreatureTribe, input.CreatureSex, getCurrentWildLevels(fromExtractor), getCurrentDomLevels(fromExtractor), te, bred, imprinting, levelStep); + creature.colors = input.RegionColors; creature.recalculateCreatureValues(levelStep); exportAsTextToClipboard(creature, breeding, ARKml); } @@ -3574,7 +3640,7 @@ private void creatureInfoInputTester_Save2Library_Clicked(CreatureInfoInput send { bool statusChanged = creatureTesterEdit.status != creatureInfoInputTester.CreatureStatus || creatureTesterEdit.owner != creatureInfoInputTester.CreatureOwner - || creatureTesterEdit.mutationCounter != creatureInfoInputTester.MutationCounter; + || creatureTesterEdit.mutationCounter != creatureInfoInputTester.MutationCounterMother; bool parentsChanged = (creatureTesterEdit.Mother != creatureInfoInputTester.mother || creatureTesterEdit.Father != creatureInfoInputTester.father); creatureTesterEdit.levelsWild = getCurrentWildLevels(false); creatureTesterEdit.levelsDom = getCurrentDomLevels(false); @@ -3595,7 +3661,8 @@ private void creatureInfoInputTester_Save2Library_Clicked(CreatureInfoInput send creatureTesterEdit.growingUntil = creatureInfoInputTester.Grown; creatureTesterEdit.domesticatedAt = creatureInfoInputTester.domesticatedAt; creatureTesterEdit.neutered = creatureInfoInputTester.Neutered; - creatureTesterEdit.mutationCounter = creatureInfoInputTester.MutationCounter; + creatureTesterEdit.mutationCounter = creatureInfoInputTester.MutationCounterMother; + creatureTesterEdit.colors = creatureInfoInputTester.RegionColors; if (wildChanged) calculateTopStats(creatureCollection.creatures.Where(c => c.species == creatureTesterEdit.species).ToList()); @@ -3630,8 +3697,9 @@ private void setTesterInfoInputCreature(Creature c = null, bool virtualCreature creatureInfoInputTester.Grown = c.growingUntil; creatureInfoInputTester.domesticatedAt = c.domesticatedAt.Year < 2000 ? DateTime.Now : c.domesticatedAt; creatureInfoInputTester.Neutered = c.neutered; + creatureInfoInputTester.RegionColors = c.colors; updateParentListInput(creatureInfoInputTester); - creatureInfoInputTester.MutationCounter = c.mutationCounter; + creatureInfoInputTester.MutationCounterMother = c.mutationCounter; } else { @@ -3648,7 +3716,8 @@ private void setTesterInfoInputCreature(Creature c = null, bool virtualCreature creatureInfoInputTester.Grown = DateTime.Now.AddHours(-1); creatureInfoInputTester.domesticatedAt = DateTime.Now; creatureInfoInputTester.Neutered = false; - creatureInfoInputTester.MutationCounter = 0; + creatureInfoInputTester.RegionColors = new int[6]; + creatureInfoInputTester.MutationCounterMother = 0; creatureInfoInputTester.parentListValid = false; } creatureTesterEdit = c; @@ -3672,7 +3741,6 @@ private void settingsToolStripMenuItem_Click(object sender, EventArgs e) setCollectionChanged(true); } - settingsfrm.DisposeToolTips(); } /// @@ -3805,6 +3873,7 @@ public void doOCR(string imageFilePath = "", bool manuallyTriggered = true) if (!creatureInfoInputExtractor.tribeLock) creatureInfoInputExtractor.CreatureTribe = tribeName; creatureInfoInputExtractor.CreatureSex = sex; + creatureInfoInputExtractor.RegionColors = new int[6]; for (int i = 0; i < 8; i++) { @@ -4115,14 +4184,9 @@ private void saveToolStripButton1_Click(object sender, EventArgs e) saveCollection(); } - private void buttonHelp_Click(object sender, EventArgs e) - { - System.Diagnostics.Process.Start("https://github.com/cadon/ARKStatsExtractor/wiki/Extraction-issues"); - } - private void showStatsInOverlay() { - if (overlay != null) + if (overlay != null && overlay.enableInventoryCheckTimer) { float[] wildLevels = new float[10]; float[] tamedLevels = new float[10]; @@ -4382,35 +4446,42 @@ private void toolStripCBTempCreatures_SelectedIndexChanged(object sender, EventA { if (toolStripCBTempCreatures.SelectedIndex >= 0 && toolStripCBTempCreatures.SelectedIndex < creatureCollection.creaturesValues.Count) { - clearAll(); - species.CreatureValues cv = creatureCollection.creaturesValues[toolStripCBTempCreatures.SelectedIndex]; - for (int s = 0; s < 8; s++) - statIOs[s].Input = cv.statValues[s]; - speciesSelector1.setSpecies(cv.species); - creatureInfoInputExtractor.CreatureName = cv.name; - creatureInfoInputExtractor.CreatureOwner = cv.owner; - creatureInfoInputExtractor.CreatureTribe = cv.tribe; - creatureInfoInputExtractor.CreatureServer = cv.server; - creatureInfoInputExtractor.CreatureSex = cv.gender; - creatureInfoInputExtractor.Neutered = cv.neutered; - creatureInfoInputExtractor.mother = cv.Mother; - creatureInfoInputExtractor.father = cv.Father; - - numericUpDownLevel.Value = cv.level; - numericUpDownLowerTEffBound.Value = (decimal)cv.tamingEffMin; - numericUpDownUpperTEffBound.Value = (decimal)cv.tamingEffMax; - - if (cv.isBred) - radioButtonBred.Checked = true; - else if (cv.isTamed) - radioButtonTamed.Checked = true; - else radioButtonWild.Checked = true; - numericUpDownImprintingBonusExtractor.Value = (decimal)cv.imprintingBonus; - + setCreatureValuesToExtractor(creatureCollection.creaturesValues[toolStripCBTempCreatures.SelectedIndex]); toolStripButtonDeleteTempCreature.Visible = true; } else + { toolStripButtonDeleteTempCreature.Visible = false; + } + } + + private void setCreatureValuesToExtractor(CreatureValues cv) + { + clearAll(); + for (int s = 0; s < 8; s++) + statIOs[s].Input = cv.statValues[s]; + speciesSelector1.setSpecies(cv.species); + creatureInfoInputExtractor.CreatureName = cv.name; + creatureInfoInputExtractor.CreatureOwner = cv.owner; + creatureInfoInputExtractor.CreatureTribe = cv.tribe; + creatureInfoInputExtractor.CreatureServer = cv.server; + creatureInfoInputExtractor.CreatureSex = cv.gender; + creatureInfoInputExtractor.CreatureGuid = cv.guid; + creatureInfoInputExtractor.Neutered = cv.neutered; + creatureInfoInputExtractor.mother = cv.Mother; + creatureInfoInputExtractor.father = cv.Father; + creatureInfoInputExtractor.RegionColors = cv.colorIDs; + + numericUpDownLevel.Value = cv.level; + numericUpDownLowerTEffBound.Value = (decimal)cv.tamingEffMin; + numericUpDownUpperTEffBound.Value = (decimal)cv.tamingEffMax; + + if (cv.isBred) + radioButtonBred.Checked = true; + else if (cv.isTamed) + radioButtonTamed.Checked = true; + else radioButtonWild.Checked = true; + numericUpDownImprintingBonusExtractor.Value = (decimal)cv.imprintingBonus; } private void toolStripButtonSaveCreatureValuesTemp_Click(object sender, EventArgs e) @@ -4427,6 +4498,7 @@ private void toolStripButtonSaveCreatureValuesTemp_Click(object sender, EventArg cv.neutered = creatureInfoInputExtractor.Neutered; cv.Mother = creatureInfoInputExtractor.mother; cv.Father = creatureInfoInputExtractor.father; + cv.colorIDs = creatureInfoInputExtractor.RegionColors; cv.level = (int)numericUpDownLevel.Value; cv.tamingEffMin = (double)numericUpDownLowerTEffBound.Value; @@ -4492,10 +4564,10 @@ private void cbExactlyImprinting_CheckedChanged(object sender, EventArgs e) "Are you sure you want this?", MessageBoxButtons.OK, MessageBoxIcon.Warning); } - private bool performDefaultExtractionFromARKTools() + private bool performExtractionWithARKTools(string filePath) { if (Properties.Settings.Default.arkToolsPath.Length > 0 - && Properties.Settings.Default.arkSavegamePath.Length > 0 + && filePath.Length > 0 && Properties.Settings.Default.savegameExtractionPath.Length > 0) { Cursor.Current = Cursors.WaitCursor; @@ -4523,7 +4595,7 @@ private bool performDefaultExtractionFromARKTools() FileName = "cmd.exe", RedirectStandardInput = true, UseShellExecute = false, - Arguments = "/C ark-tools.exe -p tamed \"" + Properties.Settings.Default.arkSavegamePath + "\" \"" + Properties.Settings.Default.savegameExtractionPath + "\"" + Arguments = "/C ark-tools.exe -p tamed \"" + filePath + "\" \"" + Properties.Settings.Default.savegameExtractionPath + "\"" }; prc = System.Diagnostics.Process.Start(startInfo); prc.WaitForExit(); @@ -4553,17 +4625,6 @@ private void importCreatedJsonfileToolStripMenuItem_Click(object sender, EventAr } } - private void runDefaultExtractionToolStripMenuItem_Click(object sender, EventArgs e) - { - performDefaultExtractionFromARKTools(); - } - - private void runDefaultExtractionAndImportFileToolStripMenuItem_Click(object sender, EventArgs e) - { - if (performDefaultExtractionFromARKTools()) - importCollectionFromArkTools(Properties.Settings.Default.savegameExtractionPath + @"\classes.json"); - } - private void ExtractionTestControl1_CopyToTester(string species, int[] wildLevels, int[] domLevels, bool postTamed, bool bred, double te, double imprintingBonus, bool gotoTester, testCases.TestCaseControl tcc) { newCollection(); @@ -4689,6 +4750,75 @@ private void tsBtAddAsExtractionTest_Click(object sender, EventArgs e) } } + private void importAllCreaturesInFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(Properties.Settings.Default.ExportCreatureFolder)) + MessageBox.Show("There is no default folder set where the exported creatures are located. Set this folder in the settings.", "No default export-folder set", MessageBoxButtons.OK, MessageBoxIcon.Error); + else + { + showExportedCreatureListControl(); + exportedCreatureList.loadFilesInFolder(Properties.Settings.Default.ExportCreatureFolder); + } + } + + private void importAllCreaturesInSelectedFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + showExportedCreatureListControl(); + exportedCreatureList.chooseFolderAndImport(); + } + + private void btImportLastExported_Click(object sender, EventArgs e) + { + importLastExportedCreature(); + } + + private void importLastExportedCreature() + { + string folder = Properties.Settings.Default.ExportCreatureFolder; + if (string.IsNullOrWhiteSpace(folder) || !Directory.Exists(folder)) + { + MessageBox.Show("There is no folder set where the exported creatures are located. Set this folder in the settings. Usually the folder is\n" + @"…\Steam\steamapps\common\ARK\ShooterGame\Saved\DinoExports\", "No export-folder set", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + var files = Directory.GetFiles(folder); + if (files.Length > 0) + { + setCreatureValuesToExtractor(ImportExported.importExportedCreature(files.OrderByDescending(f => File.GetLastWriteTime(f)).First())); + tabControlMain.SelectedTab = tabPageExtractor; + extractLevels(true); + } + else + MessageBox.Show("No exported creature-file found in the set folder\n" + folder + "\nYou have to export a creature first ingame.\n\nYou may also want to check the set folder in the settings. Usually the folder is\n" + @"…\Steam\steamapps\common\ARK\ShooterGame\Saved\DinoExports\", "No files found", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + private void ExportedCreatureList_CopyValuesToExtractor(uiControls.ExportedCreatureControl exportedCreatureControl) + { + tabControlMain.SelectedTab = tabPageExtractor; + setCreatureValuesToExtractor(exportedCreatureControl.creatureValues); + extractLevels(); + this.exportedCreatureControl = exportedCreatureControl; + } + + private void llOnlineHelpExtractionIssues_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start("https://github.com/cadon/ARKStatsExtractor/wiki/Extraction-issues"); + } + + private void importExportedCreaturesToolStripMenuItem_Click(object sender, EventArgs e) + { + showExportedCreatureListControl(); + } + + private void showExportedCreatureListControl() + { + if (exportedCreatureList == null || exportedCreatureList.IsDisposed) + { + exportedCreatureList = new ExportedCreatureList(); + exportedCreatureList.CopyValuesToExtractor += ExportedCreatureList_CopyValuesToExtractor; + } + exportedCreatureList.Show(); + } + /// /// fixes typos saved in earlier versions. is called right after loading a library /// diff --git a/ARKBreedingStats/ImportExported.cs b/ARKBreedingStats/ImportExported.cs new file mode 100644 index 00000000..fd82a491 --- /dev/null +++ b/ARKBreedingStats/ImportExported.cs @@ -0,0 +1,154 @@ +using ARKBreedingStats.species; +using System; +using System.IO; + +namespace ARKBreedingStats +{ + static class ImportExported + { + static public CreatureValues importExportedCreature(string filePath) + { + CreatureValues cv = new CreatureValues(); + cv.domesticatedAt = File.GetLastWriteTime(filePath); + cv.isTamed = true; + cv.tamingEffMax = 100; + string[] iniLines = File.ReadAllLines(filePath); + string id = ""; + foreach (string line in iniLines) + { + if (line.Contains("=")) + { + int i = line.IndexOf("="); + string text = line.Substring(i + 1); + double.TryParse(text, out double value); + switch (line.Substring(0, i)) + { + // todo ID1, ID2 + case "DinoID1": + if (string.IsNullOrEmpty(id)) + { + id = text; + } + else + { + cv.guid = builtGuid(text, id); + } + break; + case "DinoID2": + if (string.IsNullOrEmpty(id)) + { + id = text; + } + else + { + cv.guid = builtGuid(id, text); + } + break; + case "DinoNameTag": + cv.species = text; + break; + case "bIsFemale": + cv.gender = (text == "True" ? Sex.Female : Sex.Male); + break; + case "bIsNeutered": + cv.neutered = (text == "False" ? false : true); + break; + case "TamerString": + cv.owner = text; + break; + case "TamedName": + cv.name = text; + break; + case "ImprinterName": + cv.imprinterName = text; + if (string.IsNullOrEmpty(cv.owner)) + cv.owner = text; + break; + // todo mutations for mother and father + case "RandomMutationsMale": + break; + case "RandomMutationsFemale": + break; + // todo age + case "BabyAge": + break; + case "CharacterLevel": + cv.level = (int)value; + break; + case "DinoImprintingQuality": + cv.imprintingBonus = value; + if (value > 0) cv.isBred = true; + break; + // Colorization + case "ColorSet[0]": + cv.colorIDs[0] = parseColor(text); + break; + case "ColorSet[1]": + cv.colorIDs[1] = parseColor(text); + break; + case "ColorSet[2]": + cv.colorIDs[2] = parseColor(text); + break; + case "ColorSet[3]": + cv.colorIDs[3] = parseColor(text); + break; + case "ColorSet[4]": + cv.colorIDs[4] = parseColor(text); + break; + case "ColorSet[5]": + cv.colorIDs[5] = parseColor(text); + break; + case "Health": + cv.statValues[0] = value; + break; + case "Stamina": + cv.statValues[1] = value; + break; + case "Torpidity": + cv.statValues[7] = value; + break; + case "Oxygen": + cv.statValues[2] = value; + break; + case "food": + cv.statValues[3] = value; + break; + case "Weight": + cv.statValues[4] = value; + break; + case "Melee Damage": + cv.statValues[5] = 1 + value; + break; + case "Movement Speed": + cv.statValues[6] = 1 + value; + break; + } + } + } + return cv; + } + + private static int parseColor(string text) + { + double.TryParse(text.Substring(3, 8), out double r); + double.TryParse(text.Substring(14, 8), out double g); + double.TryParse(text.Substring(25, 8), out double b); + return CreatureColors.closestColorIDFromRGB(LinearColorComponentToColorComponent(r), + LinearColorComponentToColorComponent(g), + LinearColorComponentToColorComponent(b)); + } + + private static int LinearColorComponentToColorComponent(double lc) + { + return (int)(255.999f * (lc <= 0.0031308f ? lc * 12.92f : Math.Pow(lc, 1.0f / 2.4f) * 1.055f - 0.055f)); + } + + private static Guid builtGuid(string id1, string id2) + { + int.TryParse(id1, out int id1int); + int.TryParse(id2, out int id2int); + return Utils.ConvertIdToGuid((((long)id1int) << 32) | (id2int & 0xFFFFFFFFL)); + } + + } +} diff --git a/ARKBreedingStats/Importer.cs b/ARKBreedingStats/Importer.cs index c9e68cbf..4c3e6d85 100644 --- a/ARKBreedingStats/Importer.cs +++ b/ARKBreedingStats/Importer.cs @@ -94,7 +94,8 @@ private Creature ConvertCreature(ImportedCreature lc, int? levelStep) wildLevels, tamedLevels, te, !string.IsNullOrWhiteSpace(lc.Imprinter), lc.ImprintingQuality, levelStep); - creature.guid = ConvertIdToGuid(lc.Id); + creature.imprinterName = lc.Imprinter; + creature.guid = Utils.ConvertIdToGuid(lc.Id); creature.domesticatedAt = DateTime.Now; // TODO: convert ingame-time to realtime? creature.mutationCounter = lc.MutationsMaleLine + lc.MutationsFemaleLine; creature.mutationsMaternal = lc.MutationsFemaleLine; @@ -113,14 +114,14 @@ private Creature ConvertCreature(ImportedCreature lc, int? levelStep) if (lc.FemaleAncestors != null && lc.FemaleAncestors.Count > 0) { var femaleAncestor = lc.FemaleAncestors.Last(); - creature.motherGuid = ConvertIdToGuid(femaleAncestor.FemaleId); + creature.motherGuid = Utils.ConvertIdToGuid(femaleAncestor.FemaleId); creature.motherName = femaleAncestor.FemaleName; creature.isBred = true; } if (lc.MaleAncestors != null && lc.MaleAncestors.Count > 0) { var maleAncestor = lc.MaleAncestors.Last(); - creature.fatherGuid = ConvertIdToGuid(maleAncestor.MaleId); + creature.fatherGuid = Utils.ConvertIdToGuid(maleAncestor.MaleId); creature.fatherName = maleAncestor.MaleName; creature.isBred = true; } @@ -146,7 +147,9 @@ private string ConvertSpecies(string species) // Use fuzzy matching to convert between the two slightly different naming schemes // This doesn't handle spaces well, so we simply remove them and then it works perfectly var scores = Values.V.speciesNames.Select(n => new { Score = DiceCoefficient.diceCoefficient(n.Replace(" ", ""), species.Replace(" ", "")), Name = n }); - return scores.OrderByDescending(o => o.Score).First().Name; + //return scores.OrderByDescending(o => o.Score).First().Name; + var ttt = scores.OrderByDescending(o => o.Score).First().Name; + return ttt; } private static int[] ConvertColors(Colors colors) @@ -160,13 +163,6 @@ private static int colorModulo(int color) return ((color - 1) % 56) + 1; } - public static Guid ConvertIdToGuid(long id) - { - byte[] bytes = new byte[16]; - BitConverter.GetBytes(id).CopyTo(bytes, 0); - return new Guid(bytes); - } - private static int[] ConvertLevels(Levels levels, int addTorpor = 0) { return new int[] { levels.Health, levels.Stamina, levels.Oxygen, levels.Food, levels.Weight, levels.Melee, levels.Speed, levels.Torpor + addTorpor }; diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index a81a0feb..14494f94 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.26.3")] +[assembly: AssemblyFileVersion("0.27.0")] diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index fac342a5..b85d6300 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -416,13 +416,12 @@ public bool showColorsInLibrary { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string arkSavegamePath { + public string[] arkSavegamePaths { get { - return ((string)(this["arkSavegamePath"])); + return ((string[])(this["arkSavegamePaths"])); } set { - this["arkSavegamePath"] = value; + this["arkSavegamePaths"] = value; } } @@ -497,5 +496,17 @@ public string LastSaveFileTestCases { this["LastSaveFileTestCases"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string ExportCreatureFolder { + get { + return ((string)(this["ExportCreatureFolder"])); + } + set { + this["ExportCreatureFolder"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index f98b8973..280a4883 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -101,7 +101,7 @@ True - + @@ -122,5 +122,8 @@ + + + \ No newline at end of file diff --git a/ARKBreedingStats/SpeciesSelector.cs b/ARKBreedingStats/SpeciesSelector.cs index 7f47a38a..94539578 100644 --- a/ARKBreedingStats/SpeciesSelector.cs +++ b/ARKBreedingStats/SpeciesSelector.cs @@ -10,6 +10,8 @@ using System.Runtime.Serialization.Json; using System.Text.RegularExpressions; using System.IO; +using System.Threading; +using System.Diagnostics; namespace ARKBreedingStats { @@ -27,6 +29,7 @@ public partial class SpeciesSelector : UserControl private List lastSpecies; private List iconIndices; public int keepNrLastSpecies; + CancellationTokenSource cancelSource; public SpeciesSelector() { @@ -174,8 +177,11 @@ private void lvSpeciesInLibrary_SelectedIndexChanged(object sender, EventArgs e) public void setSpecies(string species) { - System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo; - species = textInfo.ToTitleCase(species.ToLower()); + if (!speciesWithAliasesList.Contains(species)) + { + System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo; + species = textInfo.ToTitleCase(species.ToLower()); + } if (speciesWithAliasesList.Contains(species)) { this.species = speciesName(species); @@ -207,8 +213,20 @@ public void SetTextBox(uiControls.TextBoxSuggest textbox) private async void Textbox_TextChanged(object sender, EventArgs e) { - await Task.Delay(200); // give the textbox time to apply the selection for the appended text - filterList(textbox.Text.Substring(0, textbox.SelectionStart)); + cancelSource?.Cancel(); + using (cancelSource = new CancellationTokenSource()) + { + try + { + await Task.Delay(200, cancelSource.Token); // give the textbox time to apply the selection for the appended text + filterList(textbox.Text.Substring(0, textbox.SelectionStart)); + } + catch (TaskCanceledException) + { + return; + } + } + cancelSource = null; } private void updateLastSpecies() diff --git a/ARKBreedingStats/StatIO.cs b/ARKBreedingStats/StatIO.cs index 7c93b199..c1a5949c 100644 --- a/ARKBreedingStats/StatIO.cs +++ b/ARKBreedingStats/StatIO.cs @@ -168,6 +168,25 @@ public StatIOStatus Status get { return status; } } + public StatIOStatus TopLevel + { + set + { + switch (value) + { + case StatIOStatus.TopLevel: + labelWildLevel.BackColor = Color.LightGreen; + break; + case StatIOStatus.NewTopLevel: + labelWildLevel.BackColor = Color.Gold; + break; + default: + labelWildLevel.BackColor = Color.Transparent; + break; + } + } + } + public bool ShowBarAndLock { set @@ -198,6 +217,7 @@ public StatIOInputType InputType public void Clear() { Status = StatIOStatus.Neutral; + TopLevel = StatIOStatus.Neutral; numLvW.Value = 0; numLvD.Value = 0; labelDomLevel.Text = "0"; @@ -294,7 +314,9 @@ public bool DomLevelLockedZero public enum StatIOStatus { - Neutral, Unique, Nonunique, Error + Neutral, Unique, Nonunique, Error, + TopLevel, // wild level is equal to the current top-level + NewTopLevel // wild level is higher than the current top-level } public enum StatIOInputType diff --git a/ARKBreedingStats/Stats.cs b/ARKBreedingStats/Stats.cs index b17303b5..d7935780 100644 --- a/ARKBreedingStats/Stats.cs +++ b/ARKBreedingStats/Stats.cs @@ -8,6 +8,8 @@ namespace ARKBreedingStats { public static class Stats { + private const double roundupDelta = 0.00001; + public static double calculateValue(int speciesIndex, int stat, int levelWild, int levelDom, bool dom, double tamingEff, double imprintingBonus) { if (levelWild < 0) @@ -35,7 +37,7 @@ public static double calculateValue(int speciesIndex, int stat, int levelWild, i //result = Math.Round(result, Utils.precision(stat), MidpointRounding.AwayFromZero); // adding an epsilon to handle rounding-errors - double result = Math.Round((Values.V.species[speciesIndex].stats[stat].BaseValue * tamedBaseHP * (1 + Values.V.species[speciesIndex].stats[stat].IncPerWildLevel * levelWild) * imprintingM + add) * domMult + 1E-7, Utils.precision(stat), MidpointRounding.AwayFromZero); + double result = Math.Round((Values.V.species[speciesIndex].stats[stat].BaseValue * tamedBaseHP * (1 + Values.V.species[speciesIndex].stats[stat].IncPerWildLevel * levelWild) * imprintingM + add) * domMult + roundupDelta, Utils.precision(stat), MidpointRounding.AwayFromZero); return result >= 0 ? result : 0; } diff --git a/ARKBreedingStats/Utils.cs b/ARKBreedingStats/Utils.cs index 75ad8a24..b80ec299 100644 --- a/ARKBreedingStats/Utils.cs +++ b/ARKBreedingStats/Utils.cs @@ -166,16 +166,6 @@ public static int precision(int s) return p; } - public static string creatureColorName(int colorId) - { - if (colorId > 0 && colorId < 57) - { - string[] cn = new string[] { "Red", "Blue", "Green", "Yellow", "Cyan", "Magenta", "Light Green", "Light Grey", "Light Brown", "Light Orange", "Light Yellow", "Light Red", "Dark Grey", "Black", "Brown", "Dark Green", "Dark Red", "White", "Dino Light Red", "Dino Dark Red", "Dino Light Orange", "Dino Dark Orange", "Dino Light Yellow", "Dino Dark Yellow", "Dino Light Green", "Dino Medium Green", "Dino Dark Green", "Dino Light Blue", "Dino Dark Blue", "Dino Light Purple", "Dino Dark Purple", "Dino Light Brown", "Dino Medium Brown", "Dino Dark Brown", "Dino Darker Grey", "Dino Albino", "BigFoot0", "BigFoot4", "BigFoot5", "WolfFur", "DarkWolfFur", "DragonBase0", "DragonBase1", "DragonFire", "DragonGreen0", "DragonGreen1", "DragonGreen2", "DragonGreen3", "WyvernPurple0", "WyvernPurple1", "WyvernBlue0", "WyvernBlue1", "Dino Medium Blue", "Dino Deep Blue", "NearWhite", "NearBlack" }; - return cn[colorId - 1]; - } - return "unknown"; - } - public static string duration(TimeSpan ts) { return ts.ToString("d':'hh':'mm':'ss"); @@ -203,76 +193,6 @@ public static string timeLeft(DateTime dt) return duration(dt.Subtract(DateTime.Now)); } - public static Color creatureColor(int colorId) - { - Color color = Color.FromArgb(0, 0, 0); - - if (colorId >= 0 && colorId < 57) - { - Color[] creatureColors = new Color[] { -Color.Gray, // 0: unknown -Color.FromArgb(255,0,0), -Color.FromArgb(0,0,255), -Color.FromArgb(0,255,0), -Color.FromArgb(255,255,0), -Color.FromArgb(0,255,255), -Color.FromArgb(255,0,255), -Color.FromArgb(192,255,186), -Color.FromArgb(200,202,202), -Color.FromArgb(120,103,89), -Color.FromArgb(255,180,108), -Color.FromArgb(255,250,138), -Color.FromArgb(255,117,108), -Color.FromArgb(123,123,123), -Color.FromArgb(59,59,59), -Color.FromArgb(89,58,42), -Color.FromArgb(34,73,0), -Color.FromArgb(129,33,24), -Color.FromArgb(255,255,255), -Color.FromArgb(255,168,168), -Color.FromArgb(89,43,43), -Color.FromArgb(255,182,148), -Color.FromArgb(136,83,47), -Color.FromArgb(202,202,160), -Color.FromArgb(148,148,108), -Color.FromArgb(224,255,224), -Color.FromArgb(121,148,121), -Color.FromArgb(34,65,34), -Color.FromArgb(217,224,255), -Color.FromArgb(57,66,99), -Color.FromArgb(228,217,255), -Color.FromArgb(64,52,89), -Color.FromArgb(255,224,186), -Color.FromArgb(148,133,117), -Color.FromArgb(89,78,65), -Color.FromArgb(89,89,89), -Color.FromArgb(255,255,255), -Color.FromArgb(183,150,131), -Color.FromArgb(234,218,213), -Color.FromArgb(208,167,148), -Color.FromArgb(195,179,159), -Color.FromArgb(136,118,102), -Color.FromArgb(160,102,75), -Color.FromArgb(203,121,86), -Color.FromArgb(188,79,0), -Color.FromArgb(121,132,108), -Color.FromArgb(144,156,121), -Color.FromArgb(165,164,139), -Color.FromArgb(116,147,156), -Color.FromArgb(120,116,150), -Color.FromArgb(176,162,192), -Color.FromArgb(98,129,167), -Color.FromArgb(72,92,117), -Color.FromArgb(95,164,234), -Color.FromArgb(69,104,212), -Color.FromArgb(237,237,237), -Color.FromArgb(81,81,81) - }; - color = creatureColors[colorId]; - } - return color; - } - public static double imprintingGainPerCuddle(double maturationTime, double cuddleIntervalMultiplier) { return 1d / Math.Max(1, Math.Floor(maturationTime / (28800 * cuddleIntervalMultiplier))); @@ -325,5 +245,12 @@ public static bool ShowTextInput(string text, out string input, string preInput return false; } } + + public static Guid ConvertIdToGuid(long id) + { + byte[] bytes = new byte[16]; + BitConverter.GetBytes(id).CopyTo(bytes, 0); + return new Guid(bytes); + } } } diff --git a/ARKBreedingStats/Values.cs b/ARKBreedingStats/Values.cs index a12d039c..2ab695ce 100644 --- a/ARKBreedingStats/Values.cs +++ b/ARKBreedingStats/Values.cs @@ -125,7 +125,7 @@ public bool loadAdditionalValues(string filename, bool showResults) // check if file exists if (!File.Exists(filename)) { - MessageBox.Show("Additional Values-File '" + filename + "' not found.\nThis collection seems to have modified or added values that are saved in a separate file, which couldn't be found at the saved location. You can load it manually via the menu File - Load additional values...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("Additional Values-File '" + filename + "' not found.\nThis collection seems to have modified or added values that are saved in a separate file, which couldn't be found at the saved location. You can load it manually via the menu File - Load additional values…", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } diff --git a/ARKBreedingStats/json/classicFlyers.json b/ARKBreedingStats/json/classicFlyers.json index dd916696..f1775e4d 100644 --- a/ARKBreedingStats/json/classicFlyers.json +++ b/ARKBreedingStats/json/classicFlyers.json @@ -1 +1 @@ -{"ver":"1.0.7","species":[{"name":"Argentavis","statsRaw":[[null,null,0.27],[750,0.1,0.1],null,null,[350,0.02,0.04,0,0],[null,null,0.1],[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Lymantria","statsRaw":[[255],[180,0.1,0.1],null,null,[null,null,0.04],null,[null,null,0.03],null]},{"name":"Pelagornis","statsRaw":[[240,0.2,0.27,0.5,0],[320,0.1,0.1],null,null,[150,0.02,0.04,0,0],[null,null,0.1],[null,null,0.01827061827],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Pteranodon","statsRaw":[[210,0.2,0.27,0.5,0],[300,0.1,0.1],null,null,[150,0.02,0.04,0,0],[null,null,0.1],[null,null,0.018518],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Quetzal","statsRaw":[[1200,0.2,0.27,0.5,0],[800,0.1,0.1],null,null,[800,0.02,0.04,0,0],null,[null,null,0.02194],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Tapejara","statsRaw":[null,[450,0.1,0.1],null,null,[330],null,[null,null,0.01827901709],null],"NoImprintingForSpeed":false},{"name":"Fire Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[350],null,[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Lightning Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[350],null,[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Poison Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[350],null,[null,null,0.025],null],"NoImprintingForSpeed":false}]} \ No newline at end of file +{"ver":"1.0.8","species":[{"name":"Argentavis","statsRaw":[[null,null,0.27],[750,0.1,0.1],null,null,[350,0.02,0.04,0,0],[null,null,0.1],[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Lymantria","statsRaw":[[255],[180,0.1,0.1],null,null,[null,null,0.04],null,[null,null,0.03],null]},{"name":"Pelagornis","statsRaw":[[240,0.2,0.27,0.5,0],[320,0.1,0.1],null,null,[150,0.02,0.04,0,0],[null,null,0.1],[null,null,0.01827061827],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Pteranodon","statsRaw":[[210,0.2,0.27,0.5,0],[300,0.1,0.1],null,null,[150,0.02,0.04,0,0],[null,null,0.1],[null,null,0.018518],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Quetzal","statsRaw":[[1200,0.2,0.27,0.5,0],[800,0.1,0.1],null,null,[800,0.02,0.04,0,0],null,[null,null,0.02194],null],"TamedBaseHealthMultiplier":1,"NoImprintingForSpeed":false},{"name":"Tapejara","statsRaw":[null,[450,0.1,0.1],null,null,[330],null,[null,null,0.01827901709],null],"NoImprintingForSpeed":false},{"name":"Fire Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[400],null,[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Lightning Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[400],null,[null,null,0.025],null],"NoImprintingForSpeed":false},{"name":"Poison Wyvern","statsRaw":[null,[400,0.1,0.1],null,null,[400],null,[null,null,0.025],null],"NoImprintingForSpeed":false}]} \ No newline at end of file diff --git a/ARKBreedingStats/ocr/ArkOCR.cs b/ARKBreedingStats/ocr/ArkOCR.cs index 023b4b1a..031cb81b 100644 --- a/ARKBreedingStats/ocr/ArkOCR.cs +++ b/ARKBreedingStats/ocr/ArkOCR.cs @@ -37,7 +37,6 @@ public static ArkOCR OCR } } - public ArkOCR() { screenCaptureApplicationName = "ShooterGame"; diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 66edfe6b..9b4f8718 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -30,7 +30,6 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings)); this.groupBoxMultiplier = new System.Windows.Forms.GroupBox(); - this.labelOrderChangeNote = new System.Windows.Forms.Label(); this.labelInfo = new System.Windows.Forms.Label(); this.labelTameLevel = new System.Windows.Forms.Label(); this.labelWildLevel = new System.Windows.Forms.Label(); @@ -105,7 +104,7 @@ private void InitializeComponent() this.numericUpDownAutosaveMinutes = new ARKBreedingStats.uiControls.Nud(); this.groupBox7 = new System.Windows.Forms.GroupBox(); this.checkBoxOxygenForAll = new System.Windows.Forms.CheckBox(); - this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabControlSettings = new System.Windows.Forms.TabControl(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.cbSingleplayerSettings = new System.Windows.Forms.CheckBox(); this.groupBox11 = new System.Windows.Forms.GroupBox(); @@ -133,20 +132,21 @@ private void InitializeComponent() this.customSCBirth = new ARKBreedingStats.settings.customSoundChooser(); this.customSCStarving = new ARKBreedingStats.settings.customSoundChooser(); this.label20 = new System.Windows.Forms.Label(); - this.tabPageImport = new System.Windows.Forms.TabPage(); + this.tabPageARKTools = new System.Windows.Forms.TabPage(); this.groupBox12 = new System.Windows.Forms.GroupBox(); this.linkLabelDLARKTools = new System.Windows.Forms.LinkLabel(); this.cbImportUpdateCreatureStatus = new System.Windows.Forms.CheckBox(); this.groupBox15 = new System.Windows.Forms.GroupBox(); - this.btPickSaveGameFile = new System.Windows.Forms.Button(); - this.lARKSaveGameFile = new System.Windows.Forms.Label(); + this.panelARKSaveGameFiles = new System.Windows.Forms.Panel(); + this.btAddSavegameFileLocation = new System.Windows.Forms.Button(); this.groupBox14 = new System.Windows.Forms.GroupBox(); - this.btPickExtractedSaveFolder = new System.Windows.Forms.Button(); - this.lExtractedSaveGameFolder = new System.Windows.Forms.Label(); + this.fileSelectorExtractedSaveFolder = new ARKBreedingStats.uiControls.FileSelector(); this.groupBox13 = new System.Windows.Forms.GroupBox(); - this.btPickARKToolsExe = new System.Windows.Forms.Button(); - this.lARKToolsExe = new System.Windows.Forms.Label(); + this.fileSelectorARKToolsExe = new ARKBreedingStats.uiControls.FileSelector(); this.label24 = new System.Windows.Forms.Label(); + this.tabPageImportExported = new System.Windows.Forms.TabPage(); + this.fileSelectorImportExported = new ARKBreedingStats.uiControls.FileSelector(); + this.label25 = new System.Windows.Forms.Label(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudWaitBeforeScreenCapture)).BeginInit(); @@ -177,7 +177,7 @@ private void InitializeComponent() this.groupBox6.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownAutosaveMinutes)).BeginInit(); this.groupBox7.SuspendLayout(); - this.tabControl1.SuspendLayout(); + this.tabControlSettings.SuspendLayout(); this.tabPage2.SuspendLayout(); this.groupBox11.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudWildLevelStep)).BeginInit(); @@ -187,16 +187,16 @@ private void InitializeComponent() this.groupBox10.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoDuration)).BeginInit(); this.groupBox8.SuspendLayout(); - this.tabPageImport.SuspendLayout(); + this.tabPageARKTools.SuspendLayout(); this.groupBox12.SuspendLayout(); this.groupBox15.SuspendLayout(); this.groupBox14.SuspendLayout(); this.groupBox13.SuspendLayout(); + this.tabPageImportExported.SuspendLayout(); this.SuspendLayout(); // // groupBoxMultiplier // - this.groupBoxMultiplier.Controls.Add(this.labelOrderChangeNote); this.groupBoxMultiplier.Controls.Add(this.labelInfo); this.groupBoxMultiplier.Controls.Add(this.labelTameLevel); this.groupBoxMultiplier.Controls.Add(this.labelWildLevel); @@ -214,21 +214,11 @@ private void InitializeComponent() this.groupBoxMultiplier.Controls.Add(this.multiplierSettingHP); this.groupBoxMultiplier.Location = new System.Drawing.Point(6, 53); this.groupBoxMultiplier.Name = "groupBoxMultiplier"; - this.groupBoxMultiplier.Size = new System.Drawing.Size(321, 340); + this.groupBoxMultiplier.Size = new System.Drawing.Size(321, 318); this.groupBoxMultiplier.TabIndex = 0; this.groupBoxMultiplier.TabStop = false; this.groupBoxMultiplier.Text = "Stat-Multipliers"; // - // labelOrderChangeNote - // - this.labelOrderChangeNote.AutoSize = true; - this.labelOrderChangeNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelOrderChangeNote.Location = new System.Drawing.Point(1, 58); - this.labelOrderChangeNote.Name = "labelOrderChangeNote"; - this.labelOrderChangeNote.Size = new System.Drawing.Size(314, 13); - this.labelOrderChangeNote.TabIndex = 15; - this.labelOrderChangeNote.Text = "The order of the columns was changed on 2018-03-11"; - // // labelInfo // this.labelInfo.Location = new System.Drawing.Point(6, 16); @@ -241,7 +231,7 @@ private void InitializeComponent() // labelTameLevel // this.labelTameLevel.AutoSize = true; - this.labelTameLevel.Location = new System.Drawing.Point(128, 80); + this.labelTameLevel.Location = new System.Drawing.Point(128, 53); this.labelTameLevel.Name = "labelTameLevel"; this.labelTameLevel.Size = new System.Drawing.Size(60, 13); this.labelTameLevel.TabIndex = 4; @@ -250,7 +240,7 @@ private void InitializeComponent() // labelWildLevel // this.labelWildLevel.AutoSize = true; - this.labelWildLevel.Location = new System.Drawing.Point(68, 80); + this.labelWildLevel.Location = new System.Drawing.Point(68, 53); this.labelWildLevel.Name = "labelWildLevel"; this.labelWildLevel.Size = new System.Drawing.Size(54, 13); this.labelWildLevel.TabIndex = 3; @@ -259,7 +249,7 @@ private void InitializeComponent() // labelTameAff // this.labelTameAff.AutoSize = true; - this.labelTameAff.Location = new System.Drawing.Point(248, 80); + this.labelTameAff.Location = new System.Drawing.Point(248, 53); this.labelTameAff.Name = "labelTameAff"; this.labelTameAff.Size = new System.Drawing.Size(47, 13); this.labelTameAff.TabIndex = 2; @@ -267,7 +257,7 @@ private void InitializeComponent() // // buttonAllToOne // - this.buttonAllToOne.Location = new System.Drawing.Point(71, 310); + this.buttonAllToOne.Location = new System.Drawing.Point(71, 283); this.buttonAllToOne.Name = "buttonAllToOne"; this.buttonAllToOne.Size = new System.Drawing.Size(105, 23); this.buttonAllToOne.TabIndex = 13; @@ -277,7 +267,7 @@ private void InitializeComponent() // // buttonSetToOfficialMP // - this.buttonSetToOfficialMP.Location = new System.Drawing.Point(182, 310); + this.buttonSetToOfficialMP.Location = new System.Drawing.Point(182, 283); this.buttonSetToOfficialMP.Name = "buttonSetToOfficialMP"; this.buttonSetToOfficialMP.Size = new System.Drawing.Size(126, 23); this.buttonSetToOfficialMP.TabIndex = 14; @@ -288,7 +278,7 @@ private void InitializeComponent() // labelTameAdd // this.labelTameAdd.AutoSize = true; - this.labelTameAdd.Location = new System.Drawing.Point(189, 80); + this.labelTameAdd.Location = new System.Drawing.Point(189, 53); this.labelTameAdd.Name = "labelTameAdd"; this.labelTameAdd.Size = new System.Drawing.Size(53, 13); this.labelTameAdd.TabIndex = 1; @@ -296,7 +286,7 @@ private void InitializeComponent() // // multiplierSettingTo // - this.multiplierSettingTo.Location = new System.Drawing.Point(6, 278); + this.multiplierSettingTo.Location = new System.Drawing.Point(6, 251); this.multiplierSettingTo.Multipliers = new double[] { 1D, 1D, @@ -308,7 +298,7 @@ private void InitializeComponent() // // multiplierSettingSp // - this.multiplierSettingSp.Location = new System.Drawing.Point(6, 252); + this.multiplierSettingSp.Location = new System.Drawing.Point(6, 225); this.multiplierSettingSp.Multipliers = new double[] { 1D, 1D, @@ -320,7 +310,7 @@ private void InitializeComponent() // // multiplierSettingDm // - this.multiplierSettingDm.Location = new System.Drawing.Point(6, 226); + this.multiplierSettingDm.Location = new System.Drawing.Point(6, 199); this.multiplierSettingDm.Multipliers = new double[] { 1D, 1D, @@ -332,7 +322,7 @@ private void InitializeComponent() // // multiplierSettingWe // - this.multiplierSettingWe.Location = new System.Drawing.Point(6, 200); + this.multiplierSettingWe.Location = new System.Drawing.Point(6, 173); this.multiplierSettingWe.Multipliers = new double[] { 1D, 1D, @@ -344,7 +334,7 @@ private void InitializeComponent() // // multiplierSettingFo // - this.multiplierSettingFo.Location = new System.Drawing.Point(6, 174); + this.multiplierSettingFo.Location = new System.Drawing.Point(6, 147); this.multiplierSettingFo.Multipliers = new double[] { 1D, 1D, @@ -356,7 +346,7 @@ private void InitializeComponent() // // multiplierSettingOx // - this.multiplierSettingOx.Location = new System.Drawing.Point(6, 148); + this.multiplierSettingOx.Location = new System.Drawing.Point(6, 121); this.multiplierSettingOx.Multipliers = new double[] { 1D, 1D, @@ -368,7 +358,7 @@ private void InitializeComponent() // // multiplierSettingSt // - this.multiplierSettingSt.Location = new System.Drawing.Point(6, 122); + this.multiplierSettingSt.Location = new System.Drawing.Point(6, 95); this.multiplierSettingSt.Multipliers = new double[] { 1D, 1D, @@ -380,7 +370,7 @@ private void InitializeComponent() // // multiplierSettingHP // - this.multiplierSettingHP.Location = new System.Drawing.Point(6, 96); + this.multiplierSettingHP.Location = new System.Drawing.Point(6, 69); this.multiplierSettingHP.Multipliers = new double[] { 1D, 1D, @@ -1093,7 +1083,7 @@ private void InitializeComponent() // // label15 // - this.label15.Location = new System.Drawing.Point(5, 475); + this.label15.Location = new System.Drawing.Point(5, 449); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(321, 54); this.label15.TabIndex = 8; @@ -1152,16 +1142,17 @@ private void InitializeComponent() this.checkBoxOxygenForAll.Text = "Enable Oxygen for all Species"; this.checkBoxOxygenForAll.UseVisualStyleBackColor = true; // - // tabControl1 + // tabControlSettings // - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPageImport); - this.tabControl1.Location = new System.Drawing.Point(3, 3); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(685, 558); - this.tabControl1.TabIndex = 11; + this.tabControlSettings.Controls.Add(this.tabPage2); + this.tabControlSettings.Controls.Add(this.tabPage1); + this.tabControlSettings.Controls.Add(this.tabPageARKTools); + this.tabControlSettings.Controls.Add(this.tabPageImportExported); + this.tabControlSettings.Location = new System.Drawing.Point(3, 3); + this.tabControlSettings.Name = "tabControlSettings"; + this.tabControlSettings.SelectedIndex = 0; + this.tabControlSettings.Size = new System.Drawing.Size(685, 558); + this.tabControlSettings.TabIndex = 11; // // tabPage2 // @@ -1201,7 +1192,7 @@ private void InitializeComponent() this.groupBox11.Controls.Add(this.cbAllowMoreThanHundredImprinting); this.groupBox11.Controls.Add(this.nudWildLevelStep); this.groupBox11.Controls.Add(this.cbConsiderWildLevelSteps); - this.groupBox11.Location = new System.Drawing.Point(6, 399); + this.groupBox11.Location = new System.Drawing.Point(6, 377); this.groupBox11.Name = "groupBox11"; this.groupBox11.Size = new System.Drawing.Size(321, 69); this.groupBox11.TabIndex = 1; @@ -1333,9 +1324,9 @@ private void InitializeComponent() this.cbCreatureColorsLibrary.AutoSize = true; this.cbCreatureColorsLibrary.Location = new System.Drawing.Point(6, 19); this.cbCreatureColorsLibrary.Name = "cbCreatureColorsLibrary"; - this.cbCreatureColorsLibrary.Size = new System.Drawing.Size(210, 17); + this.cbCreatureColorsLibrary.Size = new System.Drawing.Size(211, 17); this.cbCreatureColorsLibrary.TabIndex = 0; - this.cbCreatureColorsLibrary.Text = "Show Creature-Region-Colors in Library"; + this.cbCreatureColorsLibrary.Text = "Show Creature-Colors columns in library"; this.cbCreatureColorsLibrary.UseVisualStyleBackColor = true; // // groupBox10 @@ -1470,16 +1461,16 @@ private void InitializeComponent() this.label20.Text = "Only PCM-WAV-files are supported. The sound will play 1 min before the timer runs" + " out."; // - // tabPageImport + // tabPageARKTools // - this.tabPageImport.Controls.Add(this.groupBox12); - this.tabPageImport.Location = new System.Drawing.Point(4, 22); - this.tabPageImport.Name = "tabPageImport"; - this.tabPageImport.Padding = new System.Windows.Forms.Padding(3); - this.tabPageImport.Size = new System.Drawing.Size(677, 532); - this.tabPageImport.TabIndex = 2; - this.tabPageImport.Text = "Import"; - this.tabPageImport.UseVisualStyleBackColor = true; + this.tabPageARKTools.Controls.Add(this.groupBox12); + this.tabPageARKTools.Location = new System.Drawing.Point(4, 22); + this.tabPageARKTools.Name = "tabPageARKTools"; + this.tabPageARKTools.Padding = new System.Windows.Forms.Padding(3); + this.tabPageARKTools.Size = new System.Drawing.Size(677, 532); + this.tabPageARKTools.TabIndex = 2; + this.tabPageARKTools.Text = "ARK Tools Import"; + this.tabPageARKTools.UseVisualStyleBackColor = true; // // groupBox12 // @@ -1491,7 +1482,7 @@ private void InitializeComponent() this.groupBox12.Controls.Add(this.label24); this.groupBox12.Location = new System.Drawing.Point(6, 6); this.groupBox12.Name = "groupBox12"; - this.groupBox12.Size = new System.Drawing.Size(665, 333); + this.groupBox12.Size = new System.Drawing.Size(665, 520); this.groupBox12.TabIndex = 0; this.groupBox12.TabStop = false; this.groupBox12.Text = "Import Data from Save-File"; @@ -1510,7 +1501,7 @@ private void InitializeComponent() // cbImportUpdateCreatureStatus // this.cbImportUpdateCreatureStatus.AutoSize = true; - this.cbImportUpdateCreatureStatus.Location = new System.Drawing.Point(6, 286); + this.cbImportUpdateCreatureStatus.Location = new System.Drawing.Point(6, 91); this.cbImportUpdateCreatureStatus.Name = "cbImportUpdateCreatureStatus"; this.cbImportUpdateCreatureStatus.Size = new System.Drawing.Size(476, 17); this.cbImportUpdateCreatureStatus.TabIndex = 5; @@ -1520,87 +1511,71 @@ private void InitializeComponent() // // groupBox15 // - this.groupBox15.Controls.Add(this.btPickSaveGameFile); - this.groupBox15.Controls.Add(this.lARKSaveGameFile); - this.groupBox15.Location = new System.Drawing.Point(9, 161); + this.groupBox15.Controls.Add(this.panelARKSaveGameFiles); + this.groupBox15.Controls.Add(this.btAddSavegameFileLocation); + this.groupBox15.Location = new System.Drawing.Point(6, 220); this.groupBox15.Name = "groupBox15"; - this.groupBox15.Size = new System.Drawing.Size(650, 47); + this.groupBox15.Size = new System.Drawing.Size(650, 294); this.groupBox15.TabIndex = 4; this.groupBox15.TabStop = false; - this.groupBox15.Text = "ARK save-game file"; + this.groupBox15.Text = "ARK save-game files"; // - // btPickSaveGameFile + // panelARKSaveGameFiles // - this.btPickSaveGameFile.Location = new System.Drawing.Point(6, 19); - this.btPickSaveGameFile.Name = "btPickSaveGameFile"; - this.btPickSaveGameFile.Size = new System.Drawing.Size(75, 23); - this.btPickSaveGameFile.TabIndex = 2; - this.btPickSaveGameFile.Text = "choose..."; - this.btPickSaveGameFile.UseVisualStyleBackColor = true; - this.btPickSaveGameFile.Click += new System.EventHandler(this.btPickSaveGameFile_Click); + this.panelARKSaveGameFiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelARKSaveGameFiles.Location = new System.Drawing.Point(3, 39); + this.panelARKSaveGameFiles.Name = "panelARKSaveGameFiles"; + this.panelARKSaveGameFiles.Size = new System.Drawing.Size(644, 252); + this.panelARKSaveGameFiles.TabIndex = 4; // - // lARKSaveGameFile + // btAddSavegameFileLocation // - this.lARKSaveGameFile.Location = new System.Drawing.Point(87, 24); - this.lARKSaveGameFile.Name = "lARKSaveGameFile"; - this.lARKSaveGameFile.Size = new System.Drawing.Size(557, 18); - this.lARKSaveGameFile.TabIndex = 1; + this.btAddSavegameFileLocation.Dock = System.Windows.Forms.DockStyle.Top; + this.btAddSavegameFileLocation.Location = new System.Drawing.Point(3, 16); + this.btAddSavegameFileLocation.Name = "btAddSavegameFileLocation"; + this.btAddSavegameFileLocation.Size = new System.Drawing.Size(644, 23); + this.btAddSavegameFileLocation.TabIndex = 3; + this.btAddSavegameFileLocation.Text = "Add Savegame File Location"; + this.btAddSavegameFileLocation.UseVisualStyleBackColor = true; + this.btAddSavegameFileLocation.Click += new System.EventHandler(this.btAddSavegameFileLocation_Click); // // groupBox14 // - this.groupBox14.Controls.Add(this.btPickExtractedSaveFolder); - this.groupBox14.Controls.Add(this.lExtractedSaveGameFolder); - this.groupBox14.Location = new System.Drawing.Point(9, 214); + this.groupBox14.Controls.Add(this.fileSelectorExtractedSaveFolder); + this.groupBox14.Location = new System.Drawing.Point(6, 167); this.groupBox14.Name = "groupBox14"; this.groupBox14.Size = new System.Drawing.Size(650, 47); this.groupBox14.TabIndex = 3; this.groupBox14.TabStop = false; this.groupBox14.Text = "folder for extracted save-game"; // - // btPickExtractedSaveFolder - // - this.btPickExtractedSaveFolder.Location = new System.Drawing.Point(6, 19); - this.btPickExtractedSaveFolder.Name = "btPickExtractedSaveFolder"; - this.btPickExtractedSaveFolder.Size = new System.Drawing.Size(75, 23); - this.btPickExtractedSaveFolder.TabIndex = 2; - this.btPickExtractedSaveFolder.Text = "choose..."; - this.btPickExtractedSaveFolder.UseVisualStyleBackColor = true; - this.btPickExtractedSaveFolder.Click += new System.EventHandler(this.btPickExtractedSaveFolder_Click); + // fileSelectorExtractedSaveFolder // - // lExtractedSaveGameFolder - // - this.lExtractedSaveGameFolder.Location = new System.Drawing.Point(87, 24); - this.lExtractedSaveGameFolder.Name = "lExtractedSaveGameFolder"; - this.lExtractedSaveGameFolder.Size = new System.Drawing.Size(557, 18); - this.lExtractedSaveGameFolder.TabIndex = 1; + this.fileSelectorExtractedSaveFolder.Dock = System.Windows.Forms.DockStyle.Fill; + this.fileSelectorExtractedSaveFolder.Link = "filename"; + this.fileSelectorExtractedSaveFolder.Location = new System.Drawing.Point(3, 16); + this.fileSelectorExtractedSaveFolder.Name = "fileSelectorExtractedSaveFolder"; + this.fileSelectorExtractedSaveFolder.Size = new System.Drawing.Size(644, 28); + this.fileSelectorExtractedSaveFolder.TabIndex = 1; // // groupBox13 // - this.groupBox13.Controls.Add(this.btPickARKToolsExe); - this.groupBox13.Controls.Add(this.lARKToolsExe); - this.groupBox13.Location = new System.Drawing.Point(9, 108); + this.groupBox13.Controls.Add(this.fileSelectorARKToolsExe); + this.groupBox13.Location = new System.Drawing.Point(6, 114); this.groupBox13.Name = "groupBox13"; this.groupBox13.Size = new System.Drawing.Size(650, 47); this.groupBox13.TabIndex = 2; this.groupBox13.TabStop = false; this.groupBox13.Text = "ark-tools executable"; // - // btPickARKToolsExe - // - this.btPickARKToolsExe.Location = new System.Drawing.Point(6, 19); - this.btPickARKToolsExe.Name = "btPickARKToolsExe"; - this.btPickARKToolsExe.Size = new System.Drawing.Size(75, 23); - this.btPickARKToolsExe.TabIndex = 2; - this.btPickARKToolsExe.Text = "choose..."; - this.btPickARKToolsExe.UseVisualStyleBackColor = true; - this.btPickARKToolsExe.Click += new System.EventHandler(this.button1_Click); - // - // lARKToolsExe + // fileSelectorARKToolsExe // - this.lARKToolsExe.Location = new System.Drawing.Point(87, 24); - this.lARKToolsExe.Name = "lARKToolsExe"; - this.lARKToolsExe.Size = new System.Drawing.Size(557, 18); - this.lARKToolsExe.TabIndex = 1; + this.fileSelectorARKToolsExe.Dock = System.Windows.Forms.DockStyle.Fill; + this.fileSelectorARKToolsExe.Link = "filename"; + this.fileSelectorARKToolsExe.Location = new System.Drawing.Point(3, 16); + this.fileSelectorARKToolsExe.Name = "fileSelectorARKToolsExe"; + this.fileSelectorARKToolsExe.Size = new System.Drawing.Size(644, 28); + this.fileSelectorARKToolsExe.TabIndex = 0; // // label24 // @@ -1610,6 +1585,35 @@ private void InitializeComponent() this.label24.TabIndex = 0; this.label24.Text = resources.GetString("label24.Text"); // + // tabPageImportExported + // + this.tabPageImportExported.Controls.Add(this.fileSelectorImportExported); + this.tabPageImportExported.Controls.Add(this.label25); + this.tabPageImportExported.Location = new System.Drawing.Point(4, 22); + this.tabPageImportExported.Name = "tabPageImportExported"; + this.tabPageImportExported.Padding = new System.Windows.Forms.Padding(3); + this.tabPageImportExported.Size = new System.Drawing.Size(677, 532); + this.tabPageImportExported.TabIndex = 3; + this.tabPageImportExported.Text = "Import Exported"; + this.tabPageImportExported.UseVisualStyleBackColor = true; + // + // fileSelectorImportExported + // + this.fileSelectorImportExported.Link = "filename"; + this.fileSelectorImportExported.Location = new System.Drawing.Point(6, 87); + this.fileSelectorImportExported.Name = "fileSelectorImportExported"; + this.fileSelectorImportExported.Size = new System.Drawing.Size(665, 28); + this.fileSelectorImportExported.TabIndex = 1; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(6, 19); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(524, 52); + this.label25.TabIndex = 0; + this.label25.Text = resources.GetString("label25.Text"); + // // Settings // this.AcceptButton = this.buttonOK; @@ -1618,7 +1622,7 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(700, 602); - this.Controls.Add(this.tabControl1); + this.Controls.Add(this.tabControlSettings); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; @@ -1663,7 +1667,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numericUpDownAutosaveMinutes)).EndInit(); this.groupBox7.ResumeLayout(false); this.groupBox7.PerformLayout(); - this.tabControl1.ResumeLayout(false); + this.tabControlSettings.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); this.groupBox11.ResumeLayout(false); @@ -1679,12 +1683,14 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoDuration)).EndInit(); this.groupBox8.ResumeLayout(false); this.groupBox8.PerformLayout(); - this.tabPageImport.ResumeLayout(false); + this.tabPageARKTools.ResumeLayout(false); this.groupBox12.ResumeLayout(false); this.groupBox12.PerformLayout(); this.groupBox15.ResumeLayout(false); this.groupBox14.ResumeLayout(false); this.groupBox13.ResumeLayout(false); + this.tabPageImportExported.ResumeLayout(false); + this.tabPageImportExported.PerformLayout(); this.ResumeLayout(false); } @@ -1748,7 +1754,7 @@ private void InitializeComponent() private ARKBreedingStats.uiControls.Nud numericUpDownMaxChartLevel; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label2; - private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabControl tabControlSettings; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.GroupBox groupBox8; @@ -1792,22 +1798,22 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox cbAllowMoreThanHundredImprinting; private System.Windows.Forms.GroupBox groupBox9; private System.Windows.Forms.CheckBox cbCreatureColorsLibrary; - private System.Windows.Forms.TabPage tabPageImport; + private System.Windows.Forms.TabPage tabPageARKTools; private System.Windows.Forms.GroupBox groupBox12; private System.Windows.Forms.GroupBox groupBox13; - private System.Windows.Forms.Button btPickARKToolsExe; - private System.Windows.Forms.Label lARKToolsExe; private System.Windows.Forms.Label label24; private System.Windows.Forms.GroupBox groupBox15; - private System.Windows.Forms.Button btPickSaveGameFile; - private System.Windows.Forms.Label lARKSaveGameFile; private System.Windows.Forms.GroupBox groupBox14; - private System.Windows.Forms.Button btPickExtractedSaveFolder; - private System.Windows.Forms.Label lExtractedSaveGameFolder; private System.Windows.Forms.CheckBox cbImportUpdateCreatureStatus; private System.Windows.Forms.LinkLabel linkLabelDLARKTools; - private System.Windows.Forms.Label labelOrderChangeNote; private System.Windows.Forms.GroupBox groupBox16; private System.Windows.Forms.CheckBox cbDevTools; + private System.Windows.Forms.Button btAddSavegameFileLocation; + private uiControls.FileSelector fileSelectorARKToolsExe; + private uiControls.FileSelector fileSelectorExtractedSaveFolder; + private System.Windows.Forms.Panel panelARKSaveGameFiles; + private System.Windows.Forms.TabPage tabPageImportExported; + private System.Windows.Forms.Label label25; + private uiControls.FileSelector fileSelectorImportExported; } } \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index c999ef33..e950c2aa 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -3,6 +3,8 @@ using System.Text.RegularExpressions; using System.IO; using ARKBreedingStats; +using System.Collections.Generic; +using System.Linq; namespace ARKBreedingStats.settings { @@ -39,6 +41,13 @@ private void initStuff() customSCBirth.Title = "Birth: "; customSCCustom.Title = "Custom: "; + fileSelectorARKToolsExe.IsFile = true; + fileSelectorExtractedSaveFolder.IsFile = false; + fileSelectorImportExported.IsFile = false; + fileSelectorARKToolsExe.fileFilter = "ARK-tools executable (ark-tools.exe)|ark-tools.exe"; + + Disposed += Settings_Disposed; + // Tooltips tt = new ToolTip(); tt.SetToolTip(numericUpDownAutosaveMinutes, "To disable set to 0"); @@ -57,7 +66,6 @@ private void initStuff() tt.SetToolTip(cbSingleplayerSettings, "Check this if you have enabled the \"Singleplayer-Settings\" in your game. This settings adjusts some of the multipliers again."); tt.SetToolTip(buttonSetToOfficialMP, "Set all stat-multipliers to the default values"); tt.SetToolTip(cbAllowMoreThanHundredImprinting, "Enable this if on your server more than 100% imprinting are possible, e.g. with the mod S+ with a Nanny"); - tt.SetToolTip(labelOrderChangeNote, "Make sure to enter the correct values, especially if you copy values from a screenshot that was made with an earlier version."); tt.SetToolTip(cbDevTools, "Shows extra tabs for multiplier-testing and extraction test-cases."); } @@ -131,11 +139,19 @@ private void loadSettings(CreatureCollection cc) cbCreatureColorsLibrary.Checked = Properties.Settings.Default.showColorsInLibrary; //ark-tools - lARKToolsExe.Text = Properties.Settings.Default.arkToolsPath; - lARKSaveGameFile.Text = Properties.Settings.Default.arkSavegamePath; - lExtractedSaveGameFolder.Text = Properties.Settings.Default.savegameExtractionPath; + fileSelectorARKToolsExe.Link = Properties.Settings.Default.arkToolsPath; + fileSelectorExtractedSaveFolder.Link = Properties.Settings.Default.savegameExtractionPath; + if (Properties.Settings.Default.arkSavegamePaths != null) + { + for (int f = 0; f < Properties.Settings.Default.arkSavegamePaths.Length; f++) + { + addARKSaveGameFile(Properties.Settings.Default.arkSavegamePaths[f]); + } + } cbImportUpdateCreatureStatus.Checked = Properties.Settings.Default.importChangeCreatureStatus; + fileSelectorImportExported.Link = Properties.Settings.Default.ExportCreatureFolder; + cbDevTools.Checked = Properties.Settings.Default.DevTools; } @@ -198,14 +214,36 @@ private void saveSettings() Properties.Settings.Default.showColorsInLibrary = cbCreatureColorsLibrary.Checked; //ark-tools - Properties.Settings.Default.arkToolsPath = lARKToolsExe.Text; - Properties.Settings.Default.arkSavegamePath = lARKSaveGameFile.Text; - Properties.Settings.Default.savegameExtractionPath = lExtractedSaveGameFolder.Text; + Properties.Settings.Default.arkToolsPath = fileSelectorARKToolsExe.Link; + Properties.Settings.Default.savegameExtractionPath = fileSelectorExtractedSaveFolder.Link; + List saveGameLocations = new List(); + foreach (Control c in panelARKSaveGameFiles.Controls) + { + saveGameLocations.Add(((uiControls.FileSelector)c).Link); + } + Properties.Settings.Default.arkSavegamePaths = saveGameLocations.Where(c => !string.IsNullOrWhiteSpace(c)).ToArray(); Properties.Settings.Default.importChangeCreatureStatus = cbImportUpdateCreatureStatus.Checked; + Properties.Settings.Default.ExportCreatureFolder = fileSelectorImportExported.Link; + Properties.Settings.Default.DevTools = cbDevTools.Checked; } + private void btAddSavegameFileLocation_Click(object sender, EventArgs e) + { + addARKSaveGameFile(""); + } + + private void addARKSaveGameFile(string path) + { + var c = new uiControls.FileSelector(); + c.IsFile = true; + c.fileFilter = "ARK savegame (*.ark)|*.ark"; + c.Link = path; + c.Dock = DockStyle.Top; + panelARKSaveGameFiles.Controls.Add(c); + } + private string setSoundFile(string soundFilePath) { return soundFilePath; @@ -358,7 +396,7 @@ private void cbOCRApp_SelectedIndexChanged(object sender, EventArgs e) textBoxOCRCustom.Visible = cbOCRApp.SelectedItem.ToString() == "Custom"; } - public void DisposeToolTips() + private void Settings_Disposed(object sender, EventArgs e) { tt.RemoveAll(); } @@ -391,47 +429,6 @@ private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs System.Diagnostics.Process.Start("https://github.com/cadon/ARKStatsExtractor/wiki/Name-Generator"); } - private void button1_Click(object sender, EventArgs e) - { - OpenFileDialog dlg = new OpenFileDialog(); - string previousLocation = lARKToolsExe.Text; - if (!String.IsNullOrWhiteSpace(previousLocation)) dlg.InitialDirectory = Path.GetDirectoryName(previousLocation); - dlg.FileName = Path.GetFileName(previousLocation); - dlg.Filter = "ARK-tools executable (ark-tools.exe)|ark-tools.exe"; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - lARKToolsExe.Text = dlg.FileName; - } - } - - private void btPickSaveGameFile_Click(object sender, EventArgs e) - { - OpenFileDialog dlg = new OpenFileDialog(); - string previousLocation = lARKSaveGameFile.Text; - if (!String.IsNullOrWhiteSpace(previousLocation)) dlg.InitialDirectory = Path.GetDirectoryName(previousLocation); - dlg.FileName = Path.GetFileName(previousLocation); - dlg.Filter = "ARK savegame (*.ark)|*.ark"; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - lARKSaveGameFile.Text = dlg.FileName; - } - } - - private void btPickExtractedSaveFolder_Click(object sender, EventArgs e) - { - FolderBrowserDialog dlg = new FolderBrowserDialog(); - string previousLocation = lExtractedSaveGameFolder.Text; - if (!String.IsNullOrWhiteSpace(previousLocation)) - { - dlg.RootFolder = Environment.SpecialFolder.Desktop; - dlg.SelectedPath = Path.GetDirectoryName(previousLocation); - } - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - lExtractedSaveGameFolder.Text = dlg.SelectedPath; - } - } - private void linkLabelDLARKTools_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("https://github.com/Qowyn/ark-tools/releases/latest"); diff --git a/ARKBreedingStats/settings/Settings.resx b/ARKBreedingStats/settings/Settings.resx index 66d17cf3..10e2754b 100644 --- a/ARKBreedingStats/settings/Settings.resx +++ b/ARKBreedingStats/settings/Settings.resx @@ -126,4 +126,10 @@ It works with the window-mode "Fullscreen-Windowed" and sometimes does not work The creature data can be imported from the save-game, if it is available. The data has to be extracted first with the ark-tools. If you set the according files below, you can start the process automatically from the file-menu. Make sure the folders are correct. + + In ARK you can export a creature (hold use while looking at a creature, then choose "Export" from the wheel). + +The exported creatures are saved as a file. Select the folder to import these files. Usually the folder is +...\Steam\steamapps\common\ARK\ShooterGame\Saved\DinoExports\<ID> + \ No newline at end of file diff --git a/ARKBreedingStats/species/CreatureColors.cs b/ARKBreedingStats/species/CreatureColors.cs new file mode 100644 index 00000000..6a1af936 --- /dev/null +++ b/ARKBreedingStats/species/CreatureColors.cs @@ -0,0 +1,104 @@ +using System; +using System.Drawing; +using System.Linq; + +namespace ARKBreedingStats.species +{ + static class CreatureColors + { + public static string creatureColorName(int colorId) + { + if (colorId > 0 && colorId < colorNames.Length) + { + string[] cn = new string[] { "Red", "Blue", "Green", "Yellow", "Cyan", "Magenta", "Light Green", "Light Grey", "Light Brown", "Light Orange", "Light Yellow", "Light Red", "Dark Grey", "Black", "Brown", "Dark Green", "Dark Red", "White", "Dino Light Red", "Dino Dark Red", "Dino Light Orange", "Dino Dark Orange", "Dino Light Yellow", "Dino Dark Yellow", "Dino Light Green", "Dino Medium Green", "Dino Dark Green", "Dino Light Blue", "Dino Dark Blue", "Dino Light Purple", "Dino Dark Purple", "Dino Light Brown", "Dino Medium Brown", "Dino Dark Brown", "Dino Darker Grey", "Dino Albino", "BigFoot0", "BigFoot4", "BigFoot5", "WolfFur", "DarkWolfFur", "DragonBase0", "DragonBase1", "DragonFire", "DragonGreen0", "DragonGreen1", "DragonGreen2", "DragonGreen3", "WyvernPurple0", "WyvernPurple1", "WyvernBlue0", "WyvernBlue1", "Dino Medium Blue", "Dino Deep Blue", "NearWhite", "NearBlack" }; + return cn[colorId - 1]; + } + return "unknown"; + } + public static Color creatureColor(int colorId) + { + Color color = Color.FromArgb(0, 0, 0); + + if (colorId >= 0 && colorId < creatureColors.Length) + { + color = creatureColors[colorId]; + } + return color; + } + + public static int closestColorIDFromRGB(int r, int g, int b) + { + Color closestColor = creatureColors.OrderBy(n => ColorDiff(n, r, g, b)).First(); + return Array.IndexOf(creatureColors, closestColor); + } + + // distance in RGB space + private static int ColorDiff(Color c1, int r, int g, int b) + { + return (int)Math.Sqrt((c1.R - r) * (c1.R - r) + + (c1.G - g) * (c1.G - g) + + (c1.B - b) * (c1.B - b)); + } + + static private string[] colorNames = new string[] { "Red", "Blue", "Green", "Yellow", "Cyan", "Magenta", "Light Green", "Light Grey", "Light Brown", "Light Orange", "Light Yellow", "Light Red", "Dark Grey", "Black", "Brown", "Dark Green", "Dark Red", "White", "Dino Light Red", "Dino Dark Red", "Dino Light Orange", "Dino Dark Orange", "Dino Light Yellow", "Dino Dark Yellow", "Dino Light Green", "Dino Medium Green", "Dino Dark Green", "Dino Light Blue", "Dino Dark Blue", "Dino Light Purple", "Dino Dark Purple", "Dino Light Brown", "Dino Medium Brown", "Dino Dark Brown", "Dino Darker Grey", "Dino Albino", "BigFoot0", "BigFoot4", "BigFoot5", "WolfFur", "DarkWolfFur", "DragonBase0", "DragonBase1", "DragonFire", "DragonGreen0", "DragonGreen1", "DragonGreen2", "DragonGreen3", "WyvernPurple0", "WyvernPurple1", "WyvernBlue0", "WyvernBlue1", "Dino Medium Blue", "Dino Deep Blue", "NearWhite", "NearBlack" }; + static private Color[] creatureColors = new Color[] { + Color.Gray, // 0: unknown + Color.FromArgb(255,0,0), + Color.FromArgb(0,0,255), + Color.FromArgb(0,255,0), + Color.FromArgb(255,255,0), + Color.FromArgb(0,255,255), + Color.FromArgb(255,0,255), + Color.FromArgb(192,255,186), + Color.FromArgb(200,202,202), + Color.FromArgb(120,103,89), + Color.FromArgb(255,180,108), + Color.FromArgb(255,250,138), + Color.FromArgb(255,117,108), + Color.FromArgb(123,123,123), + Color.FromArgb(59,59,59), + Color.FromArgb(89,58,42), + Color.FromArgb(34,73,0), + Color.FromArgb(129,33,24), + Color.FromArgb(255,255,255), + Color.FromArgb(255,168,168), + Color.FromArgb(89,43,43), + Color.FromArgb(255,182,148), + Color.FromArgb(136,83,47), + Color.FromArgb(202,202,160), + Color.FromArgb(148,148,108), + Color.FromArgb(224,255,224), + Color.FromArgb(121,148,121), + Color.FromArgb(34,65,34), + Color.FromArgb(217,224,255), + Color.FromArgb(57,66,99), + Color.FromArgb(228,217,255), + Color.FromArgb(64,52,89), + Color.FromArgb(255,224,186), + Color.FromArgb(148,133,117), + Color.FromArgb(89,78,65), + Color.FromArgb(89,89,89), + Color.FromArgb(255,255,255), + Color.FromArgb(183,150,131), + Color.FromArgb(234,218,213), + Color.FromArgb(208,167,148), + Color.FromArgb(195,179,159), + Color.FromArgb(136,118,102), + Color.FromArgb(160,102,75), + Color.FromArgb(203,121,86), + Color.FromArgb(188,79,0), + Color.FromArgb(121,132,108), + Color.FromArgb(144,156,121), + Color.FromArgb(165,164,139), + Color.FromArgb(116,147,156), + Color.FromArgb(120,116,150), + Color.FromArgb(176,162,192), + Color.FromArgb(98,129,167), + Color.FromArgb(72,92,117), + Color.FromArgb(95,164,234), + Color.FromArgb(69,104,212), + Color.FromArgb(237,237,237), + Color.FromArgb(81,81,81) + }; + } +} diff --git a/ARKBreedingStats/species/CreatureValues.cs b/ARKBreedingStats/species/CreatureValues.cs index 931dced7..9bea28f0 100644 --- a/ARKBreedingStats/species/CreatureValues.cs +++ b/ARKBreedingStats/species/CreatureValues.cs @@ -11,6 +11,7 @@ namespace ARKBreedingStats.species public class CreatureValues { public string species; + public Guid guid; public string name; public Sex gender; // order of the stats is Health, Stamina, Oxygen, Food, Weight, MeleeDamage, Speed, Torpor @@ -20,6 +21,7 @@ public class CreatureValues public double imprintingBonus; public bool isTamed, isBred; public string owner = ""; + public string imprinterName = ""; public string tribe = ""; public string server = ""; public Guid fatherGuid; @@ -32,7 +34,8 @@ public class CreatureValues public DateTime cooldownUntil = new DateTime(0); public DateTime domesticatedAt = new DateTime(0); public bool neutered = false; - public int mutationCounter; + public int mutationCounter, mutationCounterMother, mutationCounterFather; + public int[] colorIDs = new int[6]; public CreatureValues() { diff --git a/ARKBreedingStats/testCases/ExtractionTestControl.cs b/ARKBreedingStats/testCases/ExtractionTestControl.cs index 51b000e8..58af071b 100644 --- a/ARKBreedingStats/testCases/ExtractionTestControl.cs +++ b/ARKBreedingStats/testCases/ExtractionTestControl.cs @@ -130,7 +130,7 @@ private void ClearAll(bool clearCases = false) public void addTestCase(ExtractionTestCase etc) { - cases.testCases.Add(etc); + cases.testCases.Insert(0, etc); showTestCases(); } diff --git a/ARKBreedingStats/uiControls/ExportedCreatureControl.Designer.cs b/ARKBreedingStats/uiControls/ExportedCreatureControl.Designer.cs new file mode 100644 index 00000000..cda62eca --- /dev/null +++ b/ARKBreedingStats/uiControls/ExportedCreatureControl.Designer.cs @@ -0,0 +1,86 @@ +namespace ARKBreedingStats.uiControls +{ + partial class ExportedCreatureControl + { + /// + /// 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.lbStatus = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.btLoadValues = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // lbStatus + // + this.lbStatus.AutoSize = true; + this.lbStatus.Location = new System.Drawing.Point(161, 24); + this.lbStatus.Name = "lbStatus"; + this.lbStatus.Size = new System.Drawing.Size(84, 13); + this.lbStatus.TabIndex = 0; + this.lbStatus.Text = "Not yet imported"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.btLoadValues); + this.groupBox1.Controls.Add(this.lbStatus); + 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(463, 47); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + // + // btLoadValues + // + this.btLoadValues.Location = new System.Drawing.Point(6, 19); + this.btLoadValues.Name = "btLoadValues"; + this.btLoadValues.Size = new System.Drawing.Size(149, 23); + this.btLoadValues.TabIndex = 1; + this.btLoadValues.Text = "Copy Values to Extractor"; + this.btLoadValues.UseVisualStyleBackColor = true; + this.btLoadValues.Click += new System.EventHandler(this.btLoadValues_Click); + // + // ExportedCreatureControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox1); + this.Name = "ExportedCreatureControl"; + this.Size = new System.Drawing.Size(463, 47); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbStatus; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btLoadValues; + } +} diff --git a/ARKBreedingStats/uiControls/ExportedCreatureControl.cs b/ARKBreedingStats/uiControls/ExportedCreatureControl.cs new file mode 100644 index 00000000..dfda728a --- /dev/null +++ b/ARKBreedingStats/uiControls/ExportedCreatureControl.cs @@ -0,0 +1,49 @@ +using ARKBreedingStats.species; +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + public partial class ExportedCreatureControl : UserControl + { + public delegate void CopyValuesToExtractorEventHandler(ExportedCreatureControl exportedCreatureControl); + public event CopyValuesToExtractorEventHandler CopyValuesToExtractor; + public CreatureValues creatureValues; + + public ExportedCreatureControl() + { + InitializeComponent(); + } + + public ExportedCreatureControl(CreatureValues creatureValues) + { + InitializeComponent(); + this.creatureValues = creatureValues; + groupBox1.Text = creatureValues.name + " (" + creatureValues.species + ", Lv " + creatureValues.level + "), exported at " + Utils.shortTimeDate(creatureValues.domesticatedAt); + } + + private void btLoadValues_Click(object sender, EventArgs e) + { + CopyValuesToExtractor?.Invoke(this); + } + + public bool Status + { + set + { + if (value) + { + lbStatus.Text = "Values extracted and creature added to library"; + lbStatus.BackColor = Color.LightGreen; + } + else + { + lbStatus.Text = "Not yet extracted"; + lbStatus.BackColor = Color.Transparent; + } + + } + } + } +} diff --git a/ARKBreedingStats/uiControls/ExportedCreatureControl.resx b/ARKBreedingStats/uiControls/ExportedCreatureControl.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/ExportedCreatureControl.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/FileSelector.Designer.cs b/ARKBreedingStats/uiControls/FileSelector.Designer.cs new file mode 100644 index 00000000..305a7bec --- /dev/null +++ b/ARKBreedingStats/uiControls/FileSelector.Designer.cs @@ -0,0 +1,87 @@ +namespace ARKBreedingStats.uiControls +{ + partial class FileSelector + { + /// + /// 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.btChooseFile = new System.Windows.Forms.Button(); + this.btDeleteLink = new System.Windows.Forms.Button(); + this.lbLink = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // btChooseFile + // + this.btChooseFile.Dock = System.Windows.Forms.DockStyle.Left; + this.btChooseFile.Location = new System.Drawing.Point(0, 0); + this.btChooseFile.Name = "btChooseFile"; + this.btChooseFile.Size = new System.Drawing.Size(89, 23); + this.btChooseFile.TabIndex = 0; + this.btChooseFile.Text = "Choose Folder…"; + this.btChooseFile.UseVisualStyleBackColor = true; + this.btChooseFile.Click += new System.EventHandler(this.btChooseFile_Click); + // + // btDeleteLink + // + this.btDeleteLink.Dock = System.Windows.Forms.DockStyle.Right; + this.btDeleteLink.Location = new System.Drawing.Point(357, 0); + this.btDeleteLink.Name = "btDeleteLink"; + this.btDeleteLink.Size = new System.Drawing.Size(23, 23); + this.btDeleteLink.TabIndex = 1; + this.btDeleteLink.Text = "×"; + this.btDeleteLink.UseVisualStyleBackColor = true; + this.btDeleteLink.Click += new System.EventHandler(this.btDeleteLink_Click); + // + // lbLink + // + this.lbLink.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbLink.Location = new System.Drawing.Point(89, 0); + this.lbLink.Name = "lbLink"; + this.lbLink.Size = new System.Drawing.Size(268, 23); + this.lbLink.TabIndex = 2; + this.lbLink.Text = "filename"; + this.lbLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // FileSelector + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbLink); + this.Controls.Add(this.btDeleteLink); + this.Controls.Add(this.btChooseFile); + this.Name = "FileSelector"; + this.Size = new System.Drawing.Size(380, 23); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button btChooseFile; + private System.Windows.Forms.Button btDeleteLink; + private System.Windows.Forms.Label lbLink; + } +} diff --git a/ARKBreedingStats/uiControls/FileSelector.cs b/ARKBreedingStats/uiControls/FileSelector.cs new file mode 100644 index 00000000..a32da3b9 --- /dev/null +++ b/ARKBreedingStats/uiControls/FileSelector.cs @@ -0,0 +1,102 @@ +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; +using System.IO; + +namespace ARKBreedingStats.uiControls +{ + public partial class FileSelector : UserControl + { + public string fileFilter; + private bool isFile; + private string linkPath; + private ToolTip tt; + + public FileSelector() + { + InitializeComponent(); + tt = new ToolTip(); + Disposed += OnDispose; + } + + private void btChooseFile_Click(object sender, EventArgs e) + { + if (isFile) + { + using (OpenFileDialog dlg = new OpenFileDialog()) + { + string previousLocation = Link; + if (!String.IsNullOrWhiteSpace(previousLocation)) dlg.InitialDirectory = Path.GetDirectoryName(previousLocation); + dlg.FileName = Path.GetFileName(previousLocation); + dlg.Filter = fileFilter; + if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + Link = dlg.FileName; + } + } + } + else + { + using (FolderBrowserDialog dlg = new FolderBrowserDialog()) + { + string previousLocation = Link; + if (!String.IsNullOrWhiteSpace(previousLocation)) + { + dlg.RootFolder = Environment.SpecialFolder.Desktop; + dlg.SelectedPath = Path.GetDirectoryName(previousLocation); + } + if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + Link = dlg.SelectedPath; + } + } + } + } + + private void btDeleteLink_Click(object sender, EventArgs e) + { + if (MessageBox.Show("Delete the selection of this " + (isFile ? "file" : "folder"), "Remove?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + Link = ""; + } + + public string Link + { + set + { + linkPath = value; + if (linkPath.Length > 90) + { + lbLink.Text = linkPath.Substring(0, 30) + "…" + linkPath.Substring(linkPath.Length - 59); + tt.SetToolTip(lbLink, linkPath); + } + else lbLink.Text = linkPath; + } + get + { + return linkPath; + } + } + + public bool IsFile + { + // file or folder + set + { + isFile = value; + if (isFile) btChooseFile.Text = "Choose File…"; + else btChooseFile.Text = "Choose Folder…"; + } + } + + private void OnDispose(object sender, EventArgs e) + { + tt.RemoveAll(); + } + } +} diff --git a/ARKBreedingStats/uiControls/FileSelector.resx b/ARKBreedingStats/uiControls/FileSelector.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/FileSelector.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/MultiSetter.cs b/ARKBreedingStats/uiControls/MultiSetter.cs index 16550a54..140a8537 100644 --- a/ARKBreedingStats/uiControls/MultiSetter.cs +++ b/ARKBreedingStats/uiControls/MultiSetter.cs @@ -207,7 +207,7 @@ private void chooseColor(int region, Button sender) if (cp.ShowDialog() == DialogResult.OK) { // color was chosen - setColorButton(sender, Utils.creatureColor(colors[region])); + setColorButton(sender, species.CreatureColors.creatureColor(colors[region])); pictureBox1.Image = CreatureColored.getColoredCreature(colors, (uniqueSpecies ? creatureList[0].species : ""), new bool[] { true, true, true, true, true, true }); } } diff --git a/ARKBreedingStats/uiControls/MyColorPicker.cs b/ARKBreedingStats/uiControls/MyColorPicker.cs index 328ab6fd..3022fda0 100644 --- a/ARKBreedingStats/uiControls/MyColorPicker.cs +++ b/ARKBreedingStats/uiControls/MyColorPicker.cs @@ -56,10 +56,10 @@ public void SetColors(int[] creatureColors, int regionId, string name, List panel1.Controls.Add(p); panels.Add(p); } - panels[c].BackColor = Utils.creatureColor(colorIds[c]); + panels[c].BackColor = species.CreatureColors.creatureColor(colorIds[c]); panels[c].BorderStyle = (creatureColors[regionId] == colorIds[c] ? BorderStyle.Fixed3D : BorderStyle.None); panels[c].Visible = (!checkBoxOnlyNatural.Checked || naturalIds == null || naturalIds.Count == 0 || naturalIds.IndexOf(c) >= 0); - tt.SetToolTip(panels[c], c.ToString() + ": " + Utils.creatureColorName(colorIds[c])); + tt.SetToolTip(panels[c], c.ToString() + ": " + species.CreatureColors.creatureColorName(colorIds[c])); } ResumeLayout(); isShown = true; diff --git a/ARKBreedingStats/uiControls/RegionColorChooser.Designer.cs b/ARKBreedingStats/uiControls/RegionColorChooser.Designer.cs new file mode 100644 index 00000000..bba26e0e --- /dev/null +++ b/ARKBreedingStats/uiControls/RegionColorChooser.Designer.cs @@ -0,0 +1,138 @@ +namespace ARKBreedingStats.uiControls +{ + partial class RegionColorChooser + { + /// + /// 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.buttonColor5 = new System.Windows.Forms.Button(); + this.buttonColor4 = new System.Windows.Forms.Button(); + this.buttonColor3 = new System.Windows.Forms.Button(); + this.buttonColor2 = new System.Windows.Forms.Button(); + this.buttonColor1 = new System.Windows.Forms.Button(); + this.buttonColor0 = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // buttonColor5 + // + this.buttonColor5.Location = new System.Drawing.Point(32, 61); + this.buttonColor5.Name = "buttonColor5"; + this.buttonColor5.Size = new System.Drawing.Size(23, 23); + this.buttonColor5.TabIndex = 31; + this.buttonColor5.Text = "5"; + this.buttonColor5.UseVisualStyleBackColor = true; + this.buttonColor5.Click += new System.EventHandler(this.buttonColor5_Click); + // + // buttonColor4 + // + this.buttonColor4.Location = new System.Drawing.Point(3, 61); + this.buttonColor4.Name = "buttonColor4"; + this.buttonColor4.Size = new System.Drawing.Size(23, 23); + this.buttonColor4.TabIndex = 30; + this.buttonColor4.Text = "4"; + this.buttonColor4.UseVisualStyleBackColor = true; + this.buttonColor4.Click += new System.EventHandler(this.buttonColor4_Click); + // + // buttonColor3 + // + this.buttonColor3.Location = new System.Drawing.Point(32, 32); + this.buttonColor3.Name = "buttonColor3"; + this.buttonColor3.Size = new System.Drawing.Size(23, 23); + this.buttonColor3.TabIndex = 29; + this.buttonColor3.Text = "3"; + this.buttonColor3.UseVisualStyleBackColor = true; + this.buttonColor3.Click += new System.EventHandler(this.buttonColor3_Click); + // + // buttonColor2 + // + this.buttonColor2.Location = new System.Drawing.Point(3, 32); + this.buttonColor2.Name = "buttonColor2"; + this.buttonColor2.Size = new System.Drawing.Size(23, 23); + this.buttonColor2.TabIndex = 28; + this.buttonColor2.Text = "2"; + this.buttonColor2.UseVisualStyleBackColor = true; + this.buttonColor2.Click += new System.EventHandler(this.buttonColor2_Click); + // + // buttonColor1 + // + this.buttonColor1.Location = new System.Drawing.Point(32, 3); + this.buttonColor1.Name = "buttonColor1"; + this.buttonColor1.Size = new System.Drawing.Size(23, 23); + this.buttonColor1.TabIndex = 27; + this.buttonColor1.Text = "1"; + this.buttonColor1.UseVisualStyleBackColor = true; + this.buttonColor1.Click += new System.EventHandler(this.buttonColor1_Click); + // + // buttonColor0 + // + this.buttonColor0.Location = new System.Drawing.Point(3, 3); + this.buttonColor0.Name = "buttonColor0"; + this.buttonColor0.Size = new System.Drawing.Size(23, 23); + this.buttonColor0.TabIndex = 26; + this.buttonColor0.Text = "0"; + this.buttonColor0.UseVisualStyleBackColor = true; + this.buttonColor0.Click += new System.EventHandler(this.buttonColor0_Click); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.buttonColor0); + this.flowLayoutPanel1.Controls.Add(this.buttonColor1); + this.flowLayoutPanel1.Controls.Add(this.buttonColor2); + this.flowLayoutPanel1.Controls.Add(this.buttonColor3); + this.flowLayoutPanel1.Controls.Add(this.buttonColor4); + this.flowLayoutPanel1.Controls.Add(this.buttonColor5); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(58, 88); + this.flowLayoutPanel1.TabIndex = 32; + // + // RegionColorChooser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.flowLayoutPanel1); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "RegionColorChooser"; + this.Size = new System.Drawing.Size(58, 88); + this.flowLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonColor5; + private System.Windows.Forms.Button buttonColor4; + private System.Windows.Forms.Button buttonColor3; + private System.Windows.Forms.Button buttonColor2; + private System.Windows.Forms.Button buttonColor1; + private System.Windows.Forms.Button buttonColor0; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + } +} diff --git a/ARKBreedingStats/uiControls/RegionColorChooser.cs b/ARKBreedingStats/uiControls/RegionColorChooser.cs new file mode 100644 index 00000000..ff703853 --- /dev/null +++ b/ARKBreedingStats/uiControls/RegionColorChooser.cs @@ -0,0 +1,128 @@ +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; +using ARKBreedingStats.species; + +namespace ARKBreedingStats.uiControls +{ + public partial class RegionColorChooser : UserControl + { + public delegate void RegionColorChosenEventHandler(); + public event RegionColorChosenEventHandler RegionColorChosen; + private Button[] buttons; + private int[] colorIDs; + public bool[] ColorRegionsUseds; + private MyColorPicker colorPicker; + private List colorRegions; + private ToolTip tt; + + public RegionColorChooser() + { + InitializeComponent(); + buttons = new Button[] { buttonColor0, buttonColor1, buttonColor2, buttonColor3, buttonColor4, buttonColor5 }; + colorIDs = new int[6]; + ColorRegionsUseds = new bool[6]; + colorPicker = new MyColorPicker(); + tt = new ToolTip(); + Disposed += RegionColorChooser_Disposed; + } + + public void setCreature(string species, int[] colorIDs) + { + this.colorIDs = colorIDs; + + int si = Values.V.speciesNames.IndexOf(species); + if (si >= 0 && Values.V.species[si].colors != null) + colorRegions = Values.V.species[si].colors; + else + { + // species-info is not available, show all region-buttons + colorRegions = new List(); + for (int i = 0; i < 6; i++) + { + colorRegions.Add(new ColorRegion()); + colorRegions[i].name = "n/a"; + } + } + for (int r = 0; r < buttons.Length; r++) + { + ColorRegionsUseds[r] = colorRegions[r].name != null; + buttons[r].Visible = ColorRegionsUseds[r]; + + if (buttons[r].Visible) + { + setColorButton(buttons[r], CreatureColors.creatureColor(colorIDs[r])); + tt.SetToolTip(buttons[r], colorRegions[r].name); + } + } + } + + public void Clear() + { + for (int r = 0; r < buttons.Length; r++) + buttons[r].Visible = false; + } + + private void buttonColor0_Click(object sender, EventArgs e) + { + chooseColor(0, buttonColor0); + } + + private void buttonColor1_Click(object sender, EventArgs e) + { + chooseColor(1, buttonColor1); + } + + private void buttonColor2_Click(object sender, EventArgs e) + { + chooseColor(2, buttonColor2); + } + + private void buttonColor3_Click(object sender, EventArgs e) + { + chooseColor(3, buttonColor3); + } + + private void buttonColor4_Click(object sender, EventArgs e) + { + chooseColor(4, buttonColor4); + } + + private void buttonColor5_Click(object sender, EventArgs e) + { + chooseColor(5, buttonColor5); + } + + private void chooseColor(int region, Button sender) + { + if (!colorPicker.isShown) + { + colorPicker.SetColors(colorIDs, region, colorRegions[region].name, colorRegions[region].colorIds); + if (colorPicker.ShowDialog() == DialogResult.OK) + { + // color was chosen + setColorButton(sender, species.CreatureColors.creatureColor(colorIDs[region])); + RegionColorChosen?.Invoke(); + } + } + } + + private void setColorButton(Button bt, Color cl) + { + bt.BackColor = cl; + bt.ForeColor = Utils.foreColor(cl); + } + + private void RegionColorChooser_Disposed(object sender, EventArgs e) + { + tt.RemoveAll(); + } + + } +} diff --git a/ARKBreedingStats/uiControls/RegionColorChooser.resx b/ARKBreedingStats/uiControls/RegionColorChooser.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/RegionColorChooser.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/TagSelector.cs b/ARKBreedingStats/uiControls/TagSelector.cs index 313ea6ca..5b278947 100644 --- a/ARKBreedingStats/uiControls/TagSelector.cs +++ b/ARKBreedingStats/uiControls/TagSelector.cs @@ -12,7 +12,6 @@ namespace ARKBreedingStats.uiControls { public partial class TagSelector : UserControl { - private string tagName; private tagStatus status; private ToolTip tt; diff --git a/ARKBreedingStats/ver.txt b/ARKBreedingStats/ver.txt index 11323f25..fd90eacb 100644 --- a/ARKBreedingStats/ver.txt +++ b/ARKBreedingStats/ver.txt @@ -1 +1 @@ -279.22,0.26.3 +279.22,0.27.0