Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            InsertInstruction insert = new InsertInstruction(method.Body.Instructions.Count - 1);
            insert.ShowDialog();

            if (insert.DialogResult == DialogResult.OK)
            {
                methodInstructions1.InsertInstruction(insert);
            }
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            InsertInstruction insert = new InsertInstruction(method.Body.Instructions.Count - 1);

            insert.ShowDialog();

            if (insert.DialogResult == DialogResult.OK)
            {
                methodInstructions1.InsertInstruction(insert);
            }
        }
Exemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (methodInstructions1.SelectedItem != null)
            {
                InsertInstruction insert = new InsertInstruction(method.Body.Instructions.Count - 1);
                insert.numericUpDown1.Value = methodInstructions1.SelectedIndex;
                insert.comboBox1.SelectedItem = methodInstructions1.SelectedInstruction.OpCode.Code.ToString();
                if (methodInstructions1.SelectedInstruction.Operand != null)
                    insert.textBox1.Text = methodInstructions1.SelectedInstruction.Operand.ToString();
                insert.button1.Text = "Modify";
                insert.ShowDialog();

                if (insert.DialogResult == DialogResult.OK)
                {
                    methodInstructions1.RemoveSelected();
                    methodInstructions1.InsertInstruction(insert);
                }
            }
        }
Exemplo n.º 4
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (methodInstructions1.SelectedItem != null)
            {
                InsertInstruction insert = new InsertInstruction(method.Body.Instructions.Count - 1);
                insert.numericUpDown1.Value   = methodInstructions1.SelectedIndex;
                insert.comboBox1.SelectedItem = methodInstructions1.SelectedInstruction.OpCode.Code.ToString();
                if (methodInstructions1.SelectedInstruction.Operand != null)
                {
                    insert.textBox1.Text = methodInstructions1.SelectedInstruction.Operand.ToString();
                }
                insert.button1.Text = "Modify";
                insert.ShowDialog();

                if (insert.DialogResult == DialogResult.OK)
                {
                    methodInstructions1.RemoveSelected();
                    methodInstructions1.InsertInstruction(insert);
                }
            }
        }