Ejemplo n.º 1
0
        private void NewVariableEditor(EditVariableMode mode)
        {
            NewVariable       = null;
            _editVariableMode = mode;

            if (dgVariables.SelectedRows.Count > 0)
            {
                EditedVariableIndex = dgVariables.SelectedRows.TopmostRow().Index;
            }

            if (mode == EditVariableMode.Edit)
            {
                var form =
                    new EditVariableForm(
                        CurrentAssembly.Method.Body.Variables[dgVariables.SelectedRows.TopmostRow().Index]);
                form.FormClosed += EditVariableForm_FormClosed;
                form.ShowDialog();
            }
            else
            {
                var form = new EditVariableForm();
                form.FormClosed += EditVariableForm_FormClosed;
                form.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void NewVariableEditor(EditVariableMode mode)
        {
            NewVariable = null;
            _editVariableMode = mode;

            if (dgVariables.SelectedRows.Count > 0)
                EditedVariableIndex = dgVariables.SelectedRows.TopmostRow().Index;

            if (mode == EditVariableMode.Edit)
            {
                var form =
                    new EditVariableForm(
                        CurrentAssembly.Method.Body.Variables[dgVariables.SelectedRows.TopmostRow().Index]);
                form.FormClosed += EditVariableForm_FormClosed;
                form.ShowDialog();
            }
            else
            {
                var form = new EditVariableForm();
                form.FormClosed += EditVariableForm_FormClosed;
                form.ShowDialog();
            }
        }