private void buttonOtherAdd_Click(object sender, EventArgs e) { var modifyVar = new ModifyAddWatchVariableForm(); if (modifyVar.ShowDialog() == DialogResult.OK) { var watchVar = modifyVar.Value; // Create new row var row = _tableOtherData.Rows.Add(watchVar.Name, watchVar.Type.ToString(), "", watchVar.AbsoluteAddressing ? watchVar.Address : watchVar.Address + Config.RamStartAddress); // Add variable to lists int newIndex = _miscData.Count; _miscData.Add(watchVar); _otherDataRowAssoc.Add(newIndex, row); XmlConfigParser.AddWatchVariableOtherData(watchVar); } }