void frmRecipeEdit_Load(object sender, EventArgs e) { Recipe.RecipeRarity recipeRarity = Recipe.RecipeRarity.Common; this.cbRarity.BeginUpdate(); this.cbRarity.Items.Clear(); this.cbRarity.Items.AddRange((object[])Enum.GetNames(recipeRarity.GetType())); this.cbRarity.EndUpdate(); this.cbEnh.BeginUpdate(); this.cbEnh.Items.Clear(); this.cbEnh.Items.Add("None"); int num1 = DatabaseAPI.Database.Enhancements.Length - 1; for (int index = 0; index <= num1; ++index) { if (DatabaseAPI.Database.Enhancements[index].UID != "") { this.cbEnh.Items.Add(DatabaseAPI.Database.Enhancements[index].UID); } else { this.cbEnh.Items.Add(("X - " + DatabaseAPI.Database.Enhancements[index].Name)); } } this.cbEnh.EndUpdate(); this.cbSal0.BeginUpdate(); this.cbSal1.BeginUpdate(); this.cbSal2.BeginUpdate(); this.cbSal3.BeginUpdate(); this.cbSal4.BeginUpdate(); this.cbSal0.Items.Clear(); this.cbSal1.Items.Clear(); this.cbSal2.Items.Clear(); this.cbSal3.Items.Clear(); this.cbSal4.Items.Clear(); this.cbSal0.Items.Add("None"); this.cbSal1.Items.Add("None"); this.cbSal2.Items.Add("None"); this.cbSal3.Items.Add("None"); this.cbSal4.Items.Add("None"); int num2 = DatabaseAPI.Database.Salvage.Length - 1; for (int index = 0; index <= num2; ++index) { var salvageName = DatabaseAPI.Database.Salvage[index].ExternalName; this.cbSal0.Items.Add(salvageName); this.cbSal1.Items.Add(salvageName); this.cbSal2.Items.Add(salvageName); this.cbSal3.Items.Add(salvageName); this.cbSal4.Items.Add(salvageName); } this.cbSal0.EndUpdate(); this.cbSal1.EndUpdate(); this.cbSal2.EndUpdate(); this.cbSal3.EndUpdate(); this.cbSal4.EndUpdate(); this.NoUpdate = false; this.FillList(); }
void frmSalvageEdit_Load(object sender, EventArgs e) { Salvage.SalvageOrigin salvageOrigin = Salvage.SalvageOrigin.Tech; Recipe.RecipeRarity recipeRarity = Recipe.RecipeRarity.Common; this.FillList(); this.cbRarity.Items.AddRange(Enum.GetNames(recipeRarity.GetType())); this.cbOrigin.Items.AddRange(Enum.GetNames(salvageOrigin.GetType())); this.cbLevel.Items.Add("10 - 25"); this.cbLevel.Items.Add("26 - 40"); this.cbLevel.Items.Add("41 - 53"); this.Updating = false; if (this.lvSalvage.Items.Count > 0) { this.lvSalvage.Items[0].Selected = true; } }