private void configWindow_Loaded(object sender, RoutedEventArgs e) { checkIgnoreHead.IsChecked = (bIgnoreHead) ? true : false; checkIgnoreShoulders.IsChecked = (bIgnoreShoulders) ? true : false; checkIgnoreTorso.IsChecked = (bIgnoreTorso) ? true : false; checkIgnoreHands.IsChecked = (bIgnoreHands) ? true : false; checkIgnoreWrists.IsChecked = (bIgnoreWrists) ? true : false; checkIgnoreWaist.IsChecked = (bIgnoreWaist) ? true : false; checkIgnoreLegs.IsChecked = (bIgnoreLegs) ? true : false; checkIgnoreFeet.IsChecked = (bIgnoreFeet) ? true : false; checkIgnoreNeck.IsChecked = (bIgnoreNeck) ? true : false; checkIgnoreFingerL.IsChecked = (bIgnoreFingerL) ? true : false; checkIgnoreFingerR.IsChecked = (bIgnoreFingerR) ? true : false; checkIgnoreHand.IsChecked = (bIgnoreHand) ? true : false; checkIgnoreOffhand.IsChecked = (bIgnoreOffhand) ? true : false; checkIdentifyItems.IsChecked = (bIdentifyItems) ? true : false; checkBuyPots.IsChecked = (bBuyPots) ? true : false; checkDisable60.IsChecked = (bDisable60) ? true : false; checkCheckStash.IsChecked = (bCheckStash) ? true : false; ehpFactor.Text = EHPFactor.ToString(); damageFactor.Text = DamageFactor.ToString(); sldPotion1.Value = iQtyPotion1; sldPotion2.Value = iQtyPotion2; sldPotion3.Value = iQtyPotion3; sldPotion4.Value = iQtyPotion4; sldPotion5.Value = iQtyPotion5; sldPotion6.Value = iQtyPotion6; sldPotion7.Value = iQtyPotion7; sldPotion8.Value = iQtyPotion8; sldPotion9.Value = iQtyPotion9; sldPotion10.Value = iQtyPotion10; }
private void SaveConfiguration() { if (bSavingConfig) { return; } bSavingConfig = true; FileStream configStream = File.Open(sConfigFile, FileMode.Create, FileAccess.Write, FileShare.Read); using (StreamWriter configWriter = new StreamWriter(configStream)) { configWriter.WriteLine("bIgnoreHead=" + (bIgnoreHead.ToString()).ToLower()); configWriter.WriteLine("bIgnoreShoulders=" + (bIgnoreShoulders.ToString()).ToLower()); configWriter.WriteLine("bIgnoreTorso=" + (bIgnoreTorso.ToString()).ToLower()); configWriter.WriteLine("bIgnoreHands=" + (bIgnoreHands.ToString()).ToLower()); configWriter.WriteLine("bIgnoreWrists=" + (bIgnoreWrists.ToString()).ToLower()); configWriter.WriteLine("bIgnoreWaist=" + (bIgnoreWaist.ToString()).ToLower()); configWriter.WriteLine("bIgnoreLegs=" + (bIgnoreLegs.ToString()).ToLower()); configWriter.WriteLine("bIgnoreFeet=" + (bIgnoreFeet.ToString()).ToLower()); configWriter.WriteLine("bIgnoreNeck=" + (bIgnoreNeck.ToString()).ToLower()); configWriter.WriteLine("bIgnoreFingerL=" + (bIgnoreFingerL.ToString()).ToLower()); configWriter.WriteLine("bIgnoreFingerR=" + (bIgnoreFingerR.ToString()).ToLower()); configWriter.WriteLine("bIgnoreHand=" + (bIgnoreHand.ToString()).ToLower()); configWriter.WriteLine("bIgnoreOffhand=" + (bIgnoreOffhand.ToString()).ToLower()); configWriter.WriteLine("bIdentifyItems=" + (bIdentifyItems.ToString()).ToLower()); configWriter.WriteLine("bBuyPots=" + (bBuyPots.ToString()).ToLower()); configWriter.WriteLine("bDisable60=" + (bDisable60.ToString()).ToLower()); configWriter.WriteLine("bCheckStash=" + (bCheckStash.ToString()).ToLower()); configWriter.WriteLine("damageFactor=" + DamageFactor.ToString()); configWriter.WriteLine("ehpFactor=" + EHPFactor.ToString()); configWriter.WriteLine("iQtyPotion1=" + iQtyPotion1.ToString()); configWriter.WriteLine("iQtyPotion2=" + iQtyPotion2.ToString()); configWriter.WriteLine("iQtyPotion3=" + iQtyPotion3.ToString()); configWriter.WriteLine("iQtyPotion4=" + iQtyPotion4.ToString()); configWriter.WriteLine("iQtyPotion5=" + iQtyPotion5.ToString()); configWriter.WriteLine("iQtyPotion6=" + iQtyPotion6.ToString()); configWriter.WriteLine("iQtyPotion7=" + iQtyPotion7.ToString()); configWriter.WriteLine("iQtyPotion8=" + iQtyPotion8.ToString()); configWriter.WriteLine("iQtyPotion9=" + iQtyPotion9.ToString()); configWriter.WriteLine("iQtyPotion10=" + iQtyPotion10.ToString()); } configStream.Close(); bSavingConfig = false; }