Example #1
0
        public frmEditRelocation(uint oldAddress, Relocations.BASE_RELOCATION_TYPE oldType)
        {
            InitializeComponent();

            this.oldAddress = oldAddress;

            txtAddress.Text       = oldAddress.ToString("X8");
            cboType.SelectedIndex = (int)oldType - 1;
        }
Example #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (!uint.TryParse(txtNewAddress.Text, System.Globalization.NumberStyles.AllowHexSpecifier, null, out newAddress))
            {
                MessageBox.Show("\"" + txtNewAddress.Text.ToUpper() + "\" isn't a valid address");
                return;
            }

            type = (Relocations.BASE_RELOCATION_TYPE)(cboType.SelectedIndex + 1);

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (!uint.TryParse(txtAddress.Text, System.Globalization.NumberStyles.AllowHexSpecifier, null, out address))
            {
                MessageBox.Show("\"" + txtAddress.Text.ToUpper() + "\" isn't a valid address");
                return;
            }

            type = (Relocations.BASE_RELOCATION_TYPE)(cboType.SelectedIndex + 1);

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }