private void buttonUpdate_Click(object sender, EventArgs e) { try { string bcLevel = null; if (comboBC.Text == Resources.hcStringResources.setexp_wotlk) bcLevel = "2"; if (comboBC.Text == Resources.hcStringResources.setexp_bc) bcLevel = "1" ; if (comboBC.Text == Resources.hcStringResources.setexp_classic) bcLevel = "0"; if (!String.IsNullOrEmpty(accountComboBox1.Text)) { if (!String.IsNullOrEmpty(bcLevel)) { ServerData sData = new ServerData(); if (sData.checkAccountExists(accountComboBox1.Text)) { string commandString = "account set addon " + accountComboBox1.Text + " " + bcLevel; ManguiMain.mangosProcess.StandardInput.WriteLine(commandString); ConfigAccess.updateLog(commandString); MessageBox.Show(string.Format(Resources.hcStringResources.Global_CommandSuccesful, commandString)); this.Close(); } else { MessageBox.Show(Resources.hcStringResources.setBC_AccountUnknown); } } else { MessageBox.Show(Resources.hcStringResources.setBC_ChooseAction); } } else { MessageBox.Show(Resources.hcStringResources.setBC_EnterAccount); } } catch { MessageBox.Show(Resources.hcStringResources.Global_CommandError); } }
private void buttonCreate_Click(object sender, EventArgs e) { ServerData sData = new ServerData(); if (sData.checkAccountExists(textAccountName.Text) == false) { try { if (!String.IsNullOrEmpty(textAccountName.Text)) { if (!String.IsNullOrEmpty(textPassword.Text)) { string commandString = "account create " + textAccountName.Text + " " + textPassword.Text; ManguiMain.mangosProcess.StandardInput.WriteLine(commandString); ConfigAccess.updateLog(commandString); MessageBox.Show(string.Format(Resources.hcStringResources.Global_CommandSuccesful, commandString)); this.Close(); } else { MessageBox.Show(Resources.hcStringResources.createAccount_EnterPassword); } } else { MessageBox.Show(Resources.hcStringResources.createAccount_EnterAccountName); } } catch { MessageBox.Show(Resources.hcStringResources.Global_CommandError); } } else { MessageBox.Show(Resources.hcStringResources.createAccount_AccountExists); ConfigAccess.updateLog("Account creation failed"); } }
private void buttonLoad_Click(object sender, EventArgs e) { try { if (!String.IsNullOrEmpty(textFileName.Text)) { if (!String.IsNullOrEmpty(textAccountName.Text)) { ServerData sData = new ServerData(); if (sData.checkAccountExists(textAccountName.Text)) { string commandString = "loadpdump " + textFileName.Text + " " + textAccountName.Text; ManguiMain.mangosProcess.StandardInput.WriteLine(commandString); ConfigAccess.updateLog(commandString); MessageBox.Show(string.Format(Resources.hcStringResources.Global_CommandSuccesful, commandString)); this.Close(); } else { MessageBox.Show(hcStringResources.loadDump_AccountDoesntExist); } } else { MessageBox.Show(hcStringResources.loadDump_EnterNameOrGuid); } } else { MessageBox.Show(hcStringResources.loadDump_EnterFileName); } } catch { MessageBox.Show(hcStringResources.Global_CommandError); } }
private void buttonUpdate_Click(object sender, EventArgs e) { try { if (!String.IsNullOrEmpty(accountComboBox1.Text )) { if (!String.IsNullOrEmpty(comboGMLevel.Text)) { ServerData sData = new ServerData(); if (sData.checkAccountExists(accountComboBox1.Text)) { string commandString = "setgm " + accountComboBox1.Text + " " + comboGMLevel.Text; ManguiMain.mangosProcess.StandardInput.WriteLine(commandString); ConfigAccess.updateLog(commandString); MessageBox.Show(string.Format(Resources.hcStringResources.Global_CommandSuccesful, commandString)); this.Close(); } else { MessageBox.Show(Resources.hcStringResources.setGM_AccountUnknown ); } } else { MessageBox.Show(Resources.hcStringResources.setGM_ChooseGMLevel ); } } else { MessageBox.Show(Resources.hcStringResources.setGM_EnterAccount ); } } catch { MessageBox.Show(Resources.hcStringResources.Global_CommandError ); } }
private void buttonDelete_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(textAccountName.Text)) { if (MessageBox.Show(hcStringResources.deleteAccount_ConfirmDelete, hcStringResources.deleteAccount_ConfirmDeleteCaption, MessageBoxButtons.OKCancel) == DialogResult.OK) { try { ServerData sData = new ServerData(); if (sData.checkAccountExists(textAccountName.Text)) { string commandString = "account delete " + textAccountName.Text; ManguiMain.mangosProcess.StandardInput.WriteLine(commandString); ConfigAccess.updateLog(commandString); MessageBox.Show(string.Format(Resources.hcStringResources.Global_CommandSuccesful, commandString)); this.Close(); } else { MessageBox.Show(hcStringResources.deleteAccount_AccountDoesntExist); } } catch { MessageBox.Show(hcStringResources.Global_CommandError); } } } else { MessageBox.Show(hcStringResources.deleteAccount_EnterAccount); } }