示例#1
0
        private static ATImportExportedFolderLocation editFolderLocation(ATImportExportedFolderLocation atExportFolderLocation)
        {
            ATImportExportedFolderLocationDialog aTImportExportedFolderLocationDialog = new ATImportExportedFolderLocationDialog(atExportFolderLocation);

            return(aTImportExportedFolderLocationDialog.ShowDialog() == DialogResult.OK &&
                   !string.IsNullOrWhiteSpace(aTImportExportedFolderLocationDialog.ATImportExportedFolderLocation.FolderPath) ?
                   aTImportExportedFolderLocationDialog.ATImportExportedFolderLocation : null);
        }
示例#2
0
 private void btAddExportFolder_Click(object sender, EventArgs e)
 {
     ATImportExportedFolderLocation aTImportExportedFolderLocation = EditFolderLocation(new ATImportExportedFolderLocation());
     if (aTImportExportedFolderLocation != null)
     {
         aTExportFolderLocationsBindingSource.Add(aTImportExportedFolderLocation);
     }
 }
示例#3
0
 private static ATImportExportedFolderLocation EditFolderLocation(ATImportExportedFolderLocation atExportFolderLocation)
 {
     ATImportExportedFolderLocation atiefl = null;
     using (ATImportExportedFolderLocationDialog aTImportExportedFolderLocationDialog = new ATImportExportedFolderLocationDialog(atExportFolderLocation))
     {
         if (aTImportExportedFolderLocationDialog.ShowDialog() == DialogResult.OK &&
                                 !string.IsNullOrWhiteSpace(aTImportExportedFolderLocationDialog.ATImportExportedFolderLocation.FolderPath))
             atiefl = aTImportExportedFolderLocationDialog.ATImportExportedFolderLocation;
     }
     return atiefl;
 }
示例#4
0
        private void dataGridViewExportFolders_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgvExportFolderChange.Index)
            {
                ATImportExportedFolderLocation aTImportExportedFolderLocation = editFolderLocation((ATImportExportedFolderLocation)aTExportFolderLocationsBindingSource[e.RowIndex]);
                if (aTImportExportedFolderLocation != null)
                {
                    aTExportFolderLocationsBindingSource[e.RowIndex] = aTImportExportedFolderLocation;
                }
            }

            if (e.ColumnIndex == dgvExportFolderDelete.Index)
            {
                aTExportFolderLocationsBindingSource.RemoveAt(e.RowIndex);
            }
        }
示例#5
0
        private void LoadSettings(CreatureCollection cc)
        {
            if (cc.serverMultipliers?.statMultipliers != null)
            {
                for (int s = 0; s < Values.STATS_COUNT; s++)
                {
                    if (s < cc.serverMultipliers.statMultipliers.Length && cc.serverMultipliers.statMultipliers[s].Length > 3)
                    {
                        multSetter[s].Multipliers = cc.serverMultipliers.statMultipliers[s];
                    }
                    else
                    {
                        multSetter[s].Multipliers = null;
                    }
                }
            }
            cbSingleplayerSettings.Checked = cc.singlePlayerSettings;

            nudMaxDomLevels.ValueSave             = cc.maxDomLevel;
            numericUpDownMaxBreedingSug.ValueSave = cc.maxBreedingSuggestions;
            nudMaxWildLevels.ValueSave            = cc.maxWildLevel;
            nudMaxServerLevel.ValueSave           = cc.maxServerLevel > 0 ? cc.maxServerLevel : 0;
            nudMaxGraphLevel.ValueSave            = cc.maxChartLevel;
            #region Non-event multiplier
            nudMatingSpeed.ValueSave              = (decimal)cc.serverMultipliers.MatingSpeedMultiplier;
            nudMatingInterval.ValueSave           = (decimal)cc.serverMultipliers.MatingIntervalMultiplier;
            nudEggHatchSpeed.ValueSave            = (decimal)cc.serverMultipliers.EggHatchSpeedMultiplier;
            nudBabyMatureSpeed.ValueSave          = (decimal)cc.serverMultipliers.BabyMatureSpeedMultiplier;
            nudBabyImprintingStatScale.ValueSave  = (decimal)cc.serverMultipliers.BabyImprintingStatScaleMultiplier;
            nudBabyCuddleInterval.ValueSave       = (decimal)cc.serverMultipliers.BabyCuddleIntervalMultiplier;
            nudTamingSpeed.ValueSave              = (decimal)cc.serverMultipliers.TamingSpeedMultiplier;
            nudDinoCharacterFoodDrain.ValueSave   = (decimal)cc.serverMultipliers.DinoCharacterFoodDrainMultiplier;
            nudBabyFoodConsumptionSpeed.ValueSave = (decimal)cc.serverMultipliers.BabyFoodConsumptionSpeedMultiplier;
            #endregion
            #region event-multiplier
            ServerMultipliers serverMultipliersEvent = cc.serverMultipliersEvents ?? cc.serverMultipliers;
            nudBabyCuddleIntervalEvent.ValueSave       = (decimal)serverMultipliersEvent.BabyCuddleIntervalMultiplier;
            nudTamingSpeedEvent.ValueSave              = (decimal)serverMultipliersEvent.TamingSpeedMultiplier;
            nudDinoCharacterFoodDrainEvent.ValueSave   = (decimal)serverMultipliersEvent.DinoCharacterFoodDrainMultiplier;
            nudMatingIntervalEvent.ValueSave           = (decimal)serverMultipliersEvent.MatingIntervalMultiplier;
            nudEggHatchSpeedEvent.ValueSave            = (decimal)serverMultipliersEvent.EggHatchSpeedMultiplier;
            nudBabyMatureSpeedEvent.ValueSave          = (decimal)serverMultipliersEvent.BabyMatureSpeedMultiplier;
            nudBabyFoodConsumptionSpeedEvent.ValueSave = (decimal)serverMultipliersEvent.BabyFoodConsumptionSpeedMultiplier;
            #endregion

            checkBoxAutoSave.Checked = Properties.Settings.Default.autosave;
            numericUpDownAutosaveMinutes.ValueSave = Properties.Settings.Default.autosaveMinutes;
            chkbSpeechRecognition.Checked          = Properties.Settings.Default.SpeechRecognition;
            chkCollectionSync.Checked = Properties.Settings.Default.syncCollection;
            if (Properties.Settings.Default.celsius)
            {
                radioButtonCelsius.Checked = true;
            }
            else
            {
                radioButtonFahrenheit.Checked = true;
            }
            cbIgnoreSexInBreedingPlan.Checked  = Properties.Settings.Default.IgnoreSexInBreedingPlan;
            checkBoxDisplayHiddenStats.Checked = Properties.Settings.Default.oxygenForAll;
            tbDefaultFontName.Text             = Properties.Settings.Default.DefaultFontName;
            nudDefaultFontSize.Value           = (decimal)Properties.Settings.Default.DefaultFontSize;

            #region overlay
            nudOverlayInfoDuration.ValueSave = Properties.Settings.Default.OverlayInfoDuration;
            nudOverlayTimerPosX.ValueSave    = Properties.Settings.Default.OverlayTimerPosition.X;
            nudOverlayTimerPosY.ValueSave    = Properties.Settings.Default.OverlayTimerPosition.Y;
            nudOverlayInfoPosDFR.ValueSave   = Properties.Settings.Default.OverlayInfoPosition.X;
            nudOverlayInfoPosY.ValueSave     = Properties.Settings.Default.OverlayInfoPosition.Y;
            cbCustomOverlayLocation.Checked  = Properties.Settings.Default.UseCustomOverlayLocation;
            nudCustomOverlayLocX.ValueSave   = Properties.Settings.Default.CustomOverlayLocation.X;
            nudCustomOverlayLocY.ValueSave   = Properties.Settings.Default.CustomOverlayLocation.Y;
            #endregion

            #region Timers
            cbTimersInOverlayAutomatically.Checked = Properties.Settings.Default.DisplayTimersInOverlayAutomatically;
            cbKeepExpiredTimersInOverlay.Checked   = Properties.Settings.Default.KeepExpiredTimersInOverlay;
            cbDeleteExpiredTimersOnSaving.Checked  = Properties.Settings.Default.DeleteExpiredTimersOnSaving;
            #endregion

            #region OCR
            cbShowOCRButton.Checked = Properties.Settings.Default.showOCRButton;
            nudWaitBeforeScreenCapture.ValueSave = Properties.Settings.Default.waitBeforeScreenCapture;
            nudWhiteThreshold.ValueSave          = Properties.Settings.Default.OCRWhiteThreshold;
            tbOCRCaptureApp.Text = Properties.Settings.Default.OCRApp;

            cbOCRIgnoreImprintValue.Checked = Properties.Settings.Default.OCRIgnoresImprintValue;
            #endregion

            customSCStarving.SoundFile = Properties.Settings.Default.soundStarving;
            customSCWakeup.SoundFile   = Properties.Settings.Default.soundWakeup;
            customSCBirth.SoundFile    = Properties.Settings.Default.soundBirth;
            customSCCustom.SoundFile   = Properties.Settings.Default.soundCustom;

            tbPlayAlarmsSeconds.Text = Properties.Settings.Default.playAlarmTimes;

            cbConsiderWildLevelSteps.Checked         = cc.considerWildLevelSteps;
            nudWildLevelStep.ValueSave               = cc.wildLevelStep;
            cbInventoryCheck.Checked                 = Properties.Settings.Default.inventoryCheckTimer;
            cbAllowMoreThanHundredImprinting.Checked = cc.allowMoreThanHundredImprinting;

            #region library
            cbCreatureColorsLibrary.Checked        = Properties.Settings.Default.showColorsInLibrary;
            cbApplyGlobalSpeciesToLibrary.Checked  = Properties.Settings.Default.ApplyGlobalSpeciesToLibrary;
            cbLibraryHighlightTopCreatures.Checked = Properties.Settings.Default.LibraryHighlightTopCreatures;
            #endregion

            #region import exported
            if (Properties.Settings.Default.ExportCreatureFolders != null)
            {
                foreach (string path in Properties.Settings.Default.ExportCreatureFolders)
                {
                    aTExportFolderLocationsBindingSource.Add(ATImportExportedFolderLocation.CreateFromString(path));
                }
            }
            nudWarnImportMoreThan.Value           = Properties.Settings.Default.WarnWhenImportingMoreCreaturesThan;
            cbApplyNamePatternOnImport.Checked    = Properties.Settings.Default.applyNamePatternOnImportIfEmptyName;
            cbCopyPatternNameToClipboard.Checked  = Properties.Settings.Default.copyNameToClipboardOnImportWhenAutoNameApplied;
            cbAutoImportExported.Checked          = Properties.Settings.Default.AutoImportExportedCreatures;
            cbPlaySoundOnAutomaticImport.Checked  = Properties.Settings.Default.PlaySoundOnAutoImport;
            cbMoveImportedFileToSubFolder.Checked = Properties.Settings.Default.MoveAutoImportedFileToSubFolder;
            cbDeleteAutoImportedFile.Checked      = Properties.Settings.Default.DeleteAutoImportedFile;
            nudImportLowerBoundTE.ValueSave       = (decimal)Properties.Settings.Default.ImportLowerBoundTE * 100;
            #endregion

            #region import savegame
            if (Properties.Settings.Default.arkSavegamePaths != null)
            {
                foreach (string path in Properties.Settings.Default.arkSavegamePaths)
                {
                    aTImportFileLocationBindingSource.Add(ATImportFileLocation.CreateFromString(path));
                }
            }
            fileSelectorExtractedSaveFolder.Link = Properties.Settings.Default.savegameExtractionPath;

            cbImportUpdateCreatureStatus.Checked  = cc.changeCreatureStatusOnSavegameImport;
            textBoxImportTribeNameFilter.Text     = Properties.Settings.Default.ImportTribeNameFilter;
            cbIgnoreUnknownBPOnSaveImport.Checked = Properties.Settings.Default.IgnoreUnknownBlueprintsOnSaveImport;
            cbSaveImportCryo.Checked = Properties.Settings.Default.SaveImportCryo;
            #endregion

            cbDevTools.Checked = Properties.Settings.Default.DevTools;

            cbPrettifyJSON.Checked = Properties.Settings.Default.prettifyCollectionJson;

            cbAdminConsoleCommandWithCheat.Checked = Properties.Settings.Default.AdminConsoleCommandWithCheat;

            string langKey = languages.FirstOrDefault(x => x.Value == Properties.Settings.Default.language).Key ?? "";
            int    langI   = cbbLanguage.Items.IndexOf(langKey);
            cbbLanguage.SelectedIndex = langI == -1 ? 0 : langI;
        }
示例#6
0
        private void loadSettings(CreatureCollection cc)
        {
            for (int s = 0; s < statsCount; s++)
            {
                if (s < cc.multipliers.Length && cc.multipliers[s].Length > 3)
                {
                    multSetter[s].Multipliers = cc.multipliers[s];
                }
                else
                {
                    multSetter[s].Multipliers = null;
                }
            }
            cbSingleplayerSettings.Checked = cc.singlePlayerSettings;

            nudEggHatchSpeed.ValueSave            = (decimal)cc.EggHatchSpeedMultiplier;
            nudBabyMatureSpeed.ValueSave          = (decimal)cc.BabyMatureSpeedMultiplier;
            numericUpDownDomLevelNr.ValueSave     = cc.maxDomLevel;
            numericUpDownMaxBreedingSug.ValueSave = cc.maxBreedingSuggestions;
            numericUpDownMaxWildLevel.ValueSave   = cc.maxWildLevel;
            nudMaxServerLevel.ValueSave           = cc.maxServerLevel > 0 ? cc.maxServerLevel : 0;
            numericUpDownMaxChartLevel.ValueSave  = cc.maxChartLevel;
            nudBabyImprintingStatScale.ValueSave  = (decimal)cc.imprintingMultiplier;
            nudBabyCuddleInterval.ValueSave       = (decimal)cc.babyCuddleIntervalMultiplier;
            nudTamingSpeed.ValueSave              = (decimal)cc.tamingSpeedMultiplier;
            nudDinoCharacterFoodDrain.ValueSave   = (decimal)cc.tamingFoodRateMultiplier;
            nudMatingInterval.ValueSave           = (decimal)cc.MatingIntervalMultiplier;
            nudBabyFoodConsumptionSpeed.ValueSave = (decimal)cc.BabyFoodConsumptionSpeedMultiplier;
            // event-multiplier
            nudBabyCuddleIntervalEvent.ValueSave       = (decimal)cc.babyCuddleIntervalMultiplierEvent;
            nudTamingSpeedEvent.ValueSave              = (decimal)cc.tamingSpeedMultiplierEvent;
            nudDinoCharacterFoodDrainEvent.ValueSave   = (decimal)cc.tamingFoodRateMultiplierEvent;
            nudMatingIntervalEvent.ValueSave           = (decimal)cc.MatingIntervalMultiplierEvent;
            nudEggHatchSpeedEvent.ValueSave            = (decimal)cc.EggHatchSpeedMultiplierEvent;
            nudBabyMatureSpeedEvent.ValueSave          = (decimal)cc.BabyMatureSpeedMultiplierEvent;
            nudBabyFoodConsumptionSpeedEvent.ValueSave = (decimal)cc.BabyFoodConsumptionSpeedMultiplierEvent;

            checkBoxAutoSave.Checked = Properties.Settings.Default.autosave;
            numericUpDownAutosaveMinutes.ValueSave = Properties.Settings.Default.autosaveMinutes;
            nudWhiteThreshold.ValueSave            = Properties.Settings.Default.OCRWhiteThreshold;
            chkbSpeechRecognition.Checked          = Properties.Settings.Default.SpeechRecognition;
            nudOverlayInfoDuration.ValueSave       = Properties.Settings.Default.OverlayInfoDuration;
            chkCollectionSync.Checked = Properties.Settings.Default.syncCollection;
            if (Properties.Settings.Default.celsius)
            {
                radioButtonCelsius.Checked = true;
            }
            else
            {
                radioButtonFahrenheit.Checked = true;
            }
            cbIgnoreSexInBreedingPlan.Checked    = Properties.Settings.Default.IgnoreSexInBreedingPlan;
            checkBoxOxygenForAll.Checked         = Properties.Settings.Default.oxygenForAll;
            nudWaitBeforeScreenCapture.ValueSave = Properties.Settings.Default.waitBeforeScreenCapture;

            cbShowOCRButton.Checked = Properties.Settings.Default.showOCRButton;
            string ocrApp = Properties.Settings.Default.OCRApp;
            int    ocrI   = cbOCRApp.Items.IndexOf(ocrApp);

            if (ocrI == -1)
            {
                textBoxOCRCustom.Text  = ocrApp;
                cbOCRApp.SelectedIndex = cbOCRApp.Items.IndexOf("Custom");
            }
            else
            {
                cbOCRApp.SelectedIndex = ocrI;
            }

            customSCStarving.SoundFile = Properties.Settings.Default.soundStarving;
            customSCWakeup.SoundFile   = Properties.Settings.Default.soundWakeup;
            customSCBirth.SoundFile    = Properties.Settings.Default.soundBirth;
            customSCCustom.SoundFile   = Properties.Settings.Default.soundCustom;

            tbPlayAlarmsSeconds.Text = Properties.Settings.Default.playAlarmTimes;

            cbConsiderWildLevelSteps.Checked         = cc.considerWildLevelSteps;
            nudWildLevelStep.ValueSave               = cc.wildLevelStep;
            cbInventoryCheck.Checked                 = Properties.Settings.Default.inventoryCheckTimer;
            cbAllowMoreThanHundredImprinting.Checked = cc.allowMoreThanHundredImprinting;
            cbCreatureColorsLibrary.Checked          = Properties.Settings.Default.showColorsInLibrary;
            cbApplyGlobalSpeciesToLibrary.Checked    = Properties.Settings.Default.ApplyGlobalSpeciesToLibrary;

            // export paths
            if (Properties.Settings.Default.ExportCreatureFolders != null)
            {
                foreach (string path in Properties.Settings.Default.ExportCreatureFolders)
                {
                    aTExportFolderLocationsBindingSource.Add(ATImportExportedFolderLocation.CreateFromString(path));
                }
            }

            // savegame paths
            if (Properties.Settings.Default.arkSavegamePaths != null)
            {
                foreach (string path in Properties.Settings.Default.arkSavegamePaths)
                {
                    aTImportFileLocationBindingSource.Add(ATImportFileLocation.CreateFromString(path));
                }
            }
            fileSelectorExtractedSaveFolder.Link = Properties.Settings.Default.savegameExtractionPath;

            cbImportUpdateCreatureStatus.Checked = Properties.Settings.Default.importChangeCreatureStatus;
            textBoxImportTribeNameFilter.Text    = Properties.Settings.Default.ImportTribeNameFilter;

            cbDevTools.Checked = Properties.Settings.Default.DevTools;

            string langKey = languages.FirstOrDefault(x => x.Value == Properties.Settings.Default.language).Key ?? "";
            int    langI   = cbbLanguage.Items.IndexOf(langKey);

            cbbLanguage.SelectedIndex = langI == -1 ? 0 : langI;
        }