Exemplo n.º 1
0
        //private frmClassEditVariable _frmEditVar = null;
        private bool CallEditVariable(frmClassEditVariable.EditModes editMode)
        {
            int varIndex = GetVariableIndex(dgVariable.CurrentRow);

            if (varIndex >= 0 || editMode == frmClassEditVariable.EditModes.Append)
            {
                //if (_frmEditVar == null)
                //{
                //    _frmEditVar = new frmClassEditVariable(_currentMethod, varIndex, editMode);
                //}
                //else
                //{
                //    _frmEditVar.InitForm(_currentMethod, varIndex, editMode);
                //}

                MethodDefinition     currentMethod = _form.BodyGridHandler.CurrentMethod;
                frmClassEditVariable f             = new frmClassEditVariable(currentMethod, varIndex, editMode);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    _form.BodyGridHandler.InitBody(currentMethod);
                }
                return(true);
            }
            return(false);
        }
        //private frmClassEditVariable _frmEditVar = null;
        private bool CallEditVariable(frmClassEditVariable.EditModes editMode)
        {
            int varIndex = GetVariableIndex(dgVariable.CurrentRow);
            if (varIndex >= 0 || editMode == frmClassEditVariable.EditModes.Append)
            {
                //if (_frmEditVar == null)
                //{
                //    _frmEditVar = new frmClassEditVariable(_currentMethod, varIndex, editMode);
                //}
                //else
                //{
                //    _frmEditVar.InitForm(_currentMethod, varIndex, editMode);
                //}

                MethodDefinition currentMethod = _form.BodyGridHandler.CurrentMethod;
                frmClassEditVariable f = new frmClassEditVariable(currentMethod, varIndex, editMode);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    _form.BodyGridHandler.InitBody(currentMethod);
                }
                return true;
            }
            return false;
        }