private void btnCatchType_Click(object sender, EventArgs e)
 {
     cbCatchType.Enabled = false;
     cbCatchType.DropDownStyle = ComboBoxStyle.Simple;
     var form = new PickReferenceForm("Type");
     form.FormClosed += form_FormClosed;
     form.ShowDialog();
 }
        private void btnCatchType_Click(object sender, EventArgs e)
        {
            cbCatchType.Enabled       = false;
            cbCatchType.DropDownStyle = ComboBoxStyle.Simple;
            var form = new PickReferenceForm("Type");

            form.FormClosed += form_FormClosed;
            form.ShowDialog();
        }
Beispiel #3
0
        private void btnSelectOperand_Click(object sender, EventArgs e)
        {
            switch (cbOperandType.Text)
            {
            case ("-> Multiple instructions reference"):
                Instruction[] selectedInstructions = null;

                if (_addedOperands.Count > 0)
                {
                    selectedInstructions = _addedOperands.Cast <Instruction>().ToArray();
                }

                var form =
                    new MultipleInstructionsSelectForm(
                        MainForm.CurrentAssembly.Method.Body.Instructions.ToArray(), selectedInstructions);
                form.FormClosed += form_FormClosedMultipleInstructions;
                form.ShowDialog();
                break;

            case ("-> Field reference"):
                cbOperand.Enabled       = false;
                cbOperand.DropDownStyle = ComboBoxStyle.Simple;
                var form2 = new PickReferenceForm("Field");
                form2.FormClosed += form_FormClosedField;
                form2.ShowDialog();
                break;

            case ("-> Method reference"):
                cbOperand.Enabled       = false;
                cbOperand.DropDownStyle = ComboBoxStyle.Simple;
                var form3 = new PickReferenceForm("Method");
                form3.FormClosed += form_FormClosedMethod;
                form3.ShowDialog();
                break;

            case ("-> Type reference"):
                cbOperand.Enabled       = false;
                cbOperand.DropDownStyle = ComboBoxStyle.Simple;
                var form4 = new PickReferenceForm("Type");
                form4.FormClosed += form_FormClosedType;
                form4.ShowDialog();
                break;
            }
        }