示例#1
0
        private void buttonOtherModify_Click(object sender, EventArgs e)
        {
            var row   = _tableOtherData.Rows[dataGridViewExpressions.SelectedRows[0].Index];
            int assoc = _otherDataRowAssoc.FirstOrDefault(v => v.Value == row).Key;

            var modifyVar = new ModifyAddWatchVariableForm(_miscData[assoc]);

            modifyVar.ShowDialog();
        }
示例#2
0
        private void dataGridViewOther_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.ColumnIndex == 2)
            {
                return;
            }

            var row   = _tableOtherData.Rows[dataGridViewExpressions.SelectedRows[0].Index];
            int assoc = _otherDataRowAssoc.FirstOrDefault(v => v.Value == row).Key;

            var modifyVar = new ModifyAddWatchVariableForm(_miscData[assoc]);

            modifyVar.ShowDialog();
        }
示例#3
0
        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);
            }
        }