private void listBox_items_CellValueChanged(object sender, DataGridViewCellEventArgs ea) { if (locked) { return; } if (listBox_items.CurrentCell != null && eLC != null) { int list = comboBox_lists.SelectedIndex; int item = listBox_items.CurrentCell.RowIndex; if (list > -1 && item > -1) { // DataGridViewSelectedRowCollection selected = listBox_items.SelectedRows; // for (int x = 0; x < listBox_items.SelectedRows.Count; x++) // { //System.Windows.Forms.Application.DoEvents(); // progress_bar("Changing ...", x, listBox_items.SelectedRows.Count); string valeu = Convert.ToString(listBox_items.Rows[ea.RowIndex].Cells[ea.ColumnIndex].Value); eLC.SetValue(list, item, ea.ColumnIndex, 2, valeu); // } } } progress_bar("Ready"); }
public void Import(object filename) { dst = ed.LoadElements((string)filename); ProgressStatus.Maximum = dst.Lists.Length; int a, b, c, d; for (a = 0; a < dst.Lists.Length; ++a) { if (a == dst.ConversationListIndex) { dst.Lists[a] = src.Lists[a]; } for (c = 0; c < etl.Count; ++c) { if (dst.Lists[a].listName == etl[c].list) { for (b = 0; b < dst.Lists[a].elementValues.Length; ++b) { if (dst.Lists[a].elementFields[0] == "ID") { if (Convert.ToInt32(dst.GetValue(a, b, 0)) == etl[c].id) { for (d = 0; d < dst.Lists[a].elementFields.Length; ++d) { foreach (Fields f in etl[c].f) { if (dst.Lists[a].elementFields[d].IndexOf(f.field) > -1) { dst.SetValue(a, b, d, f.value); //debugBox.Text += "ID: " + dst.GetValue(a, b, 0) + " => " + f.value + "\n"; } } } } } } } } ProgressStatus.Value++; } dst.Save((string)filename); ProgressStatus.Value = 0; debugBox.Text += "Русификация Elements.data успешно завершена\n"; }