Ejemplo n.º 1
0
        private void NewInstructionEditor(EditInstructionMode mode)
        {
            NewInstruction       = null;
            _editInstructionMode = mode;

            if (dgBody.SelectedRows.Count > 0)
            {
                EditedInstructionIndex = dgBody.SelectedRows.TopmostRow().Index;
            }

            if (mode == EditInstructionMode.Edit)
            {
                var form =
                    new EditInstructionForm(
                        CurrentAssembly.Method.Body.Instructions[dgBody.SelectedRows.TopmostRow().Index]);
                form.FormClosed += EditInstructionForm_FormClosed;
                form.ShowDialog();
            }
            else
            {
                var form = new EditInstructionForm();
                form.FormClosed += EditInstructionForm_FormClosed;
                form.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void NewInstructionEditor(EditInstructionMode mode)
        {
            NewInstruction = null;
            _editInstructionMode = mode;

            if (dgBody.SelectedRows.Count > 0)
                EditedInstructionIndex = dgBody.SelectedRows.TopmostRow().Index;

            if (mode == EditInstructionMode.Edit)
            {
                var form =
                    new EditInstructionForm(
                        CurrentAssembly.Method.Body.Instructions[dgBody.SelectedRows.TopmostRow().Index]);
                form.FormClosed += EditInstructionForm_FormClosed;
                form.ShowDialog();
            }
            else
            {
                var form = new EditInstructionForm();
                form.FormClosed += EditInstructionForm_FormClosed;
                form.ShowDialog();
            }
        }