private void setMysqlConnection() { if (mysqlRow != null && mysqlRow.Enabled == true) { DialogResult mysqlDialog; mysql_test mysqlTest = new mysql_test(mysqlRow); mysqlDialog = mysqlTest.DialogResult; if (mysqlDialog == DialogResult.OK) { this.mysqlConnection = mysqlTest.mysqlConnection; this.mysql_enabled = true; } else { mysqlTest.ShowDialog(); mysqlDialog = mysqlTest.DialogResult; if (mysqlDialog == DialogResult.OK) { this.mysqlConnection = mysqlTest.mysqlConnection; this.mysql_enabled = true; } else this.mysql_enabled = false; } mysqlTest.Dispose(); } else this.mysql_enabled = false; //Buttons zur mysql unterstützung de-/aktivieren if (mysql_enabled == false) { this.checkKeyword.Enabled = false; this.searchSpellID.Enabled = false; this.searchSpellID1.Enabled = false; this.searchProcSpellID.Enabled = false; this.searchProcSpellID1.Enabled = false; this.searchPoisonSpellID.Enabled = false; this.loadItemFromDatabase.Enabled = false; } else { this.checkKeyword.Enabled = true; this.searchSpellID.Enabled = true; this.searchSpellID1.Enabled = true; this.searchProcSpellID.Enabled = true; this.searchProcSpellID1.Enabled = true; this.searchPoisonSpellID.Enabled = true; this.loadItemFromDatabase.Enabled = true; } if(item.ItemTemplate.Count > 0) getLootTemplatesOfItem(); }
private void setMysqlConnection() { if (mysqlRow != null && mysqlRow.Enabled == true) { DialogResult mysqlDialog; mysql_test mysqlTest = new mysql_test(mysqlRow); mysqlDialog = mysqlTest.DialogResult; if (mysqlDialog == DialogResult.OK) { this.mysqlConnection = mysqlTest.mysqlConnection; this.mysql_enabled = true; } else { mysqlTest.ShowDialog(); mysqlDialog = mysqlTest.DialogResult; if (mysqlDialog == DialogResult.OK) { this.mysqlConnection = mysqlTest.mysqlConnection; this.mysql_enabled = true; } else { this.mysql_enabled = false; } } mysqlTest.Dispose(); } else { this.mysql_enabled = false; } //Buttons zur mysql unterstützung de-/aktivieren if (mysql_enabled == false) { this.checkKeyword.Enabled = false; this.searchSpellID.Enabled = false; this.searchSpellID1.Enabled = false; this.searchProcSpellID.Enabled = false; this.searchProcSpellID1.Enabled = false; this.searchPoisonSpellID.Enabled = false; this.loadItemFromDatabase.Enabled = false; } else { this.checkKeyword.Enabled = true; this.searchSpellID.Enabled = true; this.searchSpellID1.Enabled = true; this.searchProcSpellID.Enabled = true; this.searchProcSpellID1.Enabled = true; this.searchPoisonSpellID.Enabled = true; this.loadItemFromDatabase.Enabled = true; } if (item.ItemTemplate.Count > 0) { getLootTemplatesOfItem(); } }