private void exexLoadButton_Click(object sender, EventArgs e) { exexFile = FormUtils.openExexFileDialog(); if (exexFile != null && !exexFile.Trim().Equals("")) { try { // Disable listener for aura combo box exexAuraSlotComboBox.SelectedIndexChanged -= new System.EventHandler(exexAuraSlotComboBox_SelectedIndexChanged); exexFileLabel.Text = exexFile; exexTable = new ExexTable(exexFile); populateFields(exexTable); // Restore listener exexAuraSlotComboBox.SelectedIndexChanged += new System.EventHandler(exexAuraSlotComboBox_SelectedIndexChanged); } catch (Exception ex) { MessageBoxEx.Show(this, "The .exex file you tried to load is not a vaild .exex"); Logger.Log(TAG, ex); } } }
private void populateFields(ExexTable table) { // Config aura slots ArrayList exexAuraSlots = new ArrayList(); for (Byte i = 0; i < table.entries.Count; i++) { exexAuraSlots.Add(i + 1); } exexAuraSlotComboBox.DataSource = exexAuraSlots; // Enable fields for editing exexAuraSlotComboBox.Enabled = true; exexSmoke1InvertCheckBox.Enabled = true; exexSmoke2InvertCheckBox.Enabled = true; exexBoltsInvertCheckBox.Enabled = true; exexSaveButton.Enabled = true; labelBoxesEnabled = true; // Populate colors for index 0 currentAuraSlotIndex = 0; populateColorsForAura(currentAuraSlotIndex); }