示例#1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            var dialog = new MemoryOffsetEditor();
            var res    = dialog.ShowDialog(ParentForm);

            if (res == DialogResult.OK)
            {
                _list.Add(dialog.MemoryOffset);
                saveMemoryOffsetsToFile();
                comboBox1.SelectedIndex = _list.Count - 1;
                updateButtons();
            }
        }
示例#2
0
        private void editButton_Click(object sender, EventArgs e)
        {
            int index = comboBox1.SelectedIndex;

            if (index > 0)
            {
                var dialog = new MemoryOffsetEditor(SelectedOffset);
                var res    = dialog.ShowDialog(ParentForm);
                if (res == DialogResult.OK)
                {
                    _list.RemoveAt(index);
                    _list.Insert(index, dialog.MemoryOffset);
                    saveMemoryOffsetsToFile();
                    updateButtons();
                    comboBox1.SelectedIndex = index;
                }
            }
        }