private void ButtonStart_Click(object sender, EventArgs e) { int iTemp; BuySellListBox.Text = ""; BuySellListBox.AppendText(Constants.vbTab + "buyselllist_begin " + BuySellListTextBox.Text + Constants.vbNewLine); var loopTo = DataGridView.RowCount - 2; for (iTemp = 0; iTemp <= loopTo; iTemp++) { // {6125; 20; 0.000000; 0 } BuySellListBox.AppendText(Constants.vbTab + Constants.vbTab + "{" + Array.IndexOf(ItemPch, DataGridView[0, iTemp].Value).ToString() + "; " + DataGridView[1, iTemp].Value.ToString() + "; 0.000000; 0 }" + Constants.vbNewLine); } BuySellListBox.AppendText(Constants.vbTab + "buyselllist_end"); TabControl1.SelectedIndex = 1; // Result page }
private void ButtonStart_Click(object sender, EventArgs e) { int iTemp; BuySellListBox.Text = ""; if (MultisellNoteBox.Text != "") { BuySellListBox.AppendText("// " + MultisellNoteBox.Text + Constants.vbNewLine); } BuySellListBox.AppendText("MultiSell_begin" + Constants.vbTab + "[" + BuySellListTextBox.Text + "]" + Constants.vbTab + MultisellIDBox.Text + Constants.vbNewLine); if (IsDutyfreeBox.SelectedIndex > 0) { BuySellListBox.AppendText("is_dutyfree = " + ((SelectedItem)IsDutyfreeBox.SelectedItem).Value + Constants.vbNewLine); } if (IsShowAllBox.SelectedIndex > 0) { BuySellListBox.AppendText("is_show_all = " + ((SelectedItem)IsShowAllBox.SelectedItem).Value + Constants.vbNewLine); } if (KeepEnchantedBox.SelectedIndex > 0) { BuySellListBox.AppendText("keep_enchanted = " + ((SelectedItem)KeepEnchantedBox.SelectedItem).Value + Constants.vbNewLine); } BuySellListBox.AppendText("selllist={" + Constants.vbNewLine); var loopTo = DataGridView.RowCount - 2; for (iTemp = 0; iTemp <= loopTo; iTemp++) { // {{{[flamberge];1}};{{[crystal_c];573};{[crystal_d];2865}}}; if (DataGridView[0, iTemp].Value != null) { if (iTemp > 0) { BuySellListBox.AppendText("}};" + Constants.vbNewLine); } BuySellListBox.AppendText("{{{[" + DataGridView[0, iTemp].Value + "];" + DataGridView[1, iTemp].Value + "}}"); } if (DataGridView[3, iTemp].Value == null) { MessageBox.Show("Required component item", "Required component value", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } // BuySellListBox.AppendText("{{{[" + DataGridView[0, iTemp].Value.ToString() + "];" + DataGridView[1, iTemp].Value.ToString() + "}}"); BuySellListBox.AppendText(";{[" + DataGridView[2, iTemp].Value.ToString() + "];" + DataGridView[3, iTemp].Value.ToString() + "}"); if (iTemp == loopTo) { BuySellListBox.AppendText("}}" + Constants.vbNewLine); } //if (DataGridView[0, iTemp].Value.ToString() == "") //{ // if (iTemp > 0) // // end of all lines, but not for first and not for last // BuySellListBox.AppendText("}};" + Constants.vbNewLine); // BuySellListBox.AppendText("{{{[" + DataGridView[0, iTemp].Value.ToString() + "];" + DataGridView[1, iTemp].Value.ToString() + "}}"); // BuySellListBox.AppendText(";{{[" + DataGridView[2, iTemp].Value.ToString() + "];" + DataGridView[3, iTemp].Value.ToString() + "}"); //} //else // BuySellListBox.AppendText(";{[" + DataGridView[2, iTemp].Value.ToString() + "];" + DataGridView[3, iTemp].Value.ToString() + "}"); } // BuySellListBox.AppendText("}}" + Constants.vbNewLine + "}" + Constants.vbNewLine); BuySellListBox.AppendText("}" + Constants.vbNewLine); BuySellListBox.AppendText("MultiSell_end"); TabControl1.SelectedIndex = 1; // Result page }