private void buttonApply_Click(object sender, EventArgs e) { //Apply Properties Properties.Settings.Default.unitXpGold = comboBoxUnitXpGold.SelectedItem.ToString(); Properties.Settings.Default.cardDropTime = comboBoxCardDrop.SelectedItem.ToString(); int time; if (string.IsNullOrEmpty(textBoxRefreshTimer.Text)) { Properties.Settings.Default.refreshTimer = 30; time = 30; } else { Properties.Settings.Default.refreshTimer = int.Parse(textBoxRefreshTimer.Text); time = int.Parse(textBoxRefreshTimer.Text); } Properties.Settings.Default.sigFigures = int.Parse(comboBoxSigFig.SelectedItem.ToString()); if (radioButtonDCYes.Checked == true) { Properties.Settings.Default.doubleCards = true; } else { Properties.Settings.Default.doubleCards = false; } Properties.Settings.Default.ascTier = comboBoxAscTier.SelectedItem.ToString(); if (radioButtonMOYes.Checked == true) { Properties.Settings.Default.moveOverlay = true; } else { Properties.Settings.Default.moveOverlay = false; } Properties.Settings.Default.overlayColor = labelColor.BackColor; //Gold and XP Settings if (string.IsNullOrEmpty(textBoxGoldAdd.Text)) { Properties.Settings.Default.goldAdd = 0; } else { Properties.Settings.Default.goldAdd = decimal.Parse(textBoxGoldAdd.Text); } if (string.IsNullOrEmpty(textBoxXpAdd.Text)) { Properties.Settings.Default.xpAdd = 0; } else { Properties.Settings.Default.xpAdd = decimal.Parse(textBoxXpAdd.Text); } Properties.Settings.Default.goldOrb = int.Parse(comboBoxGoldOrb.SelectedItem.ToString()); Properties.Settings.Default.xpOrb = int.Parse(comboBoxXpOrb.SelectedItem.ToString()); double partyBoost = double.Parse(comboBoxPartyBoost.SelectedItem.ToString()); partyBoost = partyBoost / 10; Properties.Settings.Default.partyBoost = partyBoost; Properties.Settings.Default.players = int.Parse(comboBoxPlayers.SelectedItem.ToString()); if (string.IsNullOrEmpty(textBoxGlobalXp.Text)) { Properties.Settings.Default.globalXp = 0; } else { Properties.Settings.Default.globalXp = int.Parse(textBoxGlobalXp.Text); } if (string.IsNullOrEmpty(textBoxGlobalGold.Text)) { Properties.Settings.Default.globalGold = 0; } else { Properties.Settings.Default.globalGold = int.Parse(textBoxGlobalGold.Text); } if (string.IsNullOrEmpty(textBoxPlayerLevel.Text)) { Properties.Settings.Default.playerLevel = 400; } else { Properties.Settings.Default.playerLevel = int.Parse(textBoxPlayerLevel.Text); } if (string.IsNullOrEmpty(textBoxFilterMob.Text) || textBoxFilterMob.Text == "0") { Properties.Settings.Default.filterMob = 0; } else { Properties.Settings.Default.filterMob = uint.Parse(textBoxFilterMob.Text); } _form1.setOverlayColor(labelColor.BackColor); _form1.applyProSettings(time); Properties.Settings.Default.Save(); MessageBox.Show("IOU Helper Pro settings have been applied."); this.Close(); }