Beispiel #1
0
        private void mnuAdd_Click(object sender, EventArgs e)
        {
            frmAddRelocation frm = new frmAddRelocation();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
            {
                return;
            }

            int code = rel.AddRelocation(frm.GetAddress(), frm.GetRelocType());

            switch (code)
            {
            case -1:
                MessageBox.Show("This address is already in the relocation table");
                break;

            case 0:
                MessageBox.Show("Cannot add this address (0x" + frm.GetAddress().ToString("X8") + ")");
                break;

            case 1:
            case 2:
                RefreshData();
                break;

            default:
                MessageBox.Show("Unknown error");
                break;
            }
        }
        private void mnuAdd_Click(object sender, EventArgs e)
        {
            frmAddRelocation frm = new frmAddRelocation();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
                return;

            int code = rel.AddRelocation(frm.GetAddress(), frm.GetRelocType());

            switch (code)
            {
                case -1:
                    MessageBox.Show("This address is already in the relocation table");
                    break;
                case 0:
                    MessageBox.Show("Cannot add this address (0x" + frm.GetAddress().ToString("X8") + ")");
                    break;
                case 1:
                case 2:
                    RefreshData();
                    break;
                default:
                    MessageBox.Show("Unknown error");
                    break;
            }
        }