private void NPCCreator_Load(object sender, EventArgs e) { //Set Default Values rankComboBoxEx.SelectedIndex = 0; factionComboBoxEx.SelectedIndex = 0; typeComboBoxEx.SelectedIndex = 0; familyComboItemEx.SelectedIndex = 0; classComboBoxEx.SelectedIndex = 0; aiNameComboBoxEx.SelectedIndex = 0; movementTypeComboBoxEx.SelectedIndex = 0; inhabitComboBoxEx.SelectedIndex = 0; mysql = new SQLMethods(Settings.Default.MySQLHost, Settings.Default.MySQLPort, Settings.Default.MySQLUsername, Settings.Default.MySQLPassword); if (!editor) { //Test MySQL Connection wizardPage1.NextButtonEnabled = eWizardButtonState.False; MySQLConnProgressBarX.Enabled = true; MySQLConnProgressBarX.Visible = true; MySQLConnLabelX.Visible = true; MySQLConnBackgroundWorker.RunWorkerAsync(); } else { //Get Item Information wizardPage1.NextButtonEnabled = eWizardButtonState.False; MySQLConnProgressBarX.Enabled = true; MySQLConnProgressBarX.Visible = true; MySQLConnLabelX.Visible = true; MySQLConnLabelX.Text = "Getting NPC Information..."; npcInfoBackgroundWorker.RunWorkerAsync(); } }
private void wizard_Load(object sender, EventArgs e) { mysql = new SQLMethods(Settings.Default.MySQLHost, Settings.Default.MySQLPort, Settings.Default.MySQLUsername, Settings.Default.MySQLPassword); if (!editor) { qualityComboBoxEX.SelectedIndex = 0; itemTypeComboBoxEX.SelectedIndex = 0; itemBindsComboBoxEX.SelectedIndex = 0; skillProfressionComboBoxEX.SelectedIndex = 0; //Test MySQL Connection wizardPage1.NextButtonEnabled = eWizardButtonState.False; MySQLConnProgressBarX.Enabled = true; MySQLConnProgressBarX.Visible = true; MySQLConnLabelX.Visible = true; MySQLConnBackgroundWorker.RunWorkerAsync(); } else { //Get Item Information wizardPage1.NextButtonEnabled = eWizardButtonState.False; MySQLConnProgressBarX.Enabled = true; MySQLConnProgressBarX.Visible = true; MySQLConnLabelX.Visible = true; MySQLConnLabelX.Text = "Getting Item Information..."; itemInfoBackgroundWorker.RunWorkerAsync(); } }