private void Button15_Click(object sender, EventArgs e) { Text = "Please wait..."; UseWaitCursor = true; ProgressBar.Value = 0; ProgressBar.Visible = true; int LoopVar; LoopVar = 0; while (LoopVar < Conversions.ToDouble(Ini.GetString(Conversions.ToString(MMainFunctions.GetIniFileLocation()), MainObject.Header, "NumberOfAttacks", "")) == true) { ComboBox3.SelectedIndex = LoopVar; LoopVar = LoopVar + 1; Refresh(); Enabled = false; ModifyNameCommands.ChangeAttackName(LoopVar, MMainFunctions.DecapString(Conversions.ToString(GetNameFunctions.GetAttackName(LoopVar)))); ProgressBar.Value = (int)(LoopVar / Conversions.ToDouble(Ini.GetString(Conversions.ToString(MMainFunctions.GetIniFileLocation()), MainObject.Header, "NumberOfAttacks", "")) * 100d); } LoopVar = 1; ComboBox3.Items.Clear(); while (LoopVar < Conversions.ToDouble(Ini.GetString(Conversions.ToString(MMainFunctions.GetIniFileLocation()), MainObject.Header, "NumberOfAttacks", "")) + 1d == true) { ComboBox3.Items.Add(GetNameFunctions.GetAttackName(LoopVar)); LoopVar = LoopVar + 1; } ComboBox3.SelectedIndex = 0; Text = "Attack Editor"; UseWaitCursor = false; Enabled = true; ProgressBar.Visible = false; BringToFront(); }
private void Button1_Click(object sender, EventArgs e) { int tempy; tempy = ComboBox3.SelectedIndex; ModifyNameCommands.ChangeAttackName(ComboBox3.SelectedIndex + 1, TextBox1.Text); int LoopVar; LoopVar = 1; ComboBox3.Items.Clear(); while (LoopVar < Conversions.ToDouble(Ini.GetString(Conversions.ToString(MMainFunctions.GetIniFileLocation()), MainObject.Header, "NumberOfAttacks", "")) + 1d == true) { ComboBox3.Items.Add(GetNameFunctions.GetAttackName(LoopVar)); LoopVar = LoopVar + 1; } ComboBox3.SelectedIndex = tempy; }