Ejemplo n.º 1
0
        private void EditVar(object sender, RoutedEventArgs e)
        {
            if (grdVariables.CurrentItem != null && grdVariables.CurrentItem.ToString() != "{NewItemPlaceholder}")
            {
                VariableBase selectedVarb = (VariableBase)grdVariables.CurrentItem;
                selectedVarb.NameBeforeEdit = selectedVarb.Name;
                VariableEditPage.eEditMode mode = VariableEditPage.eEditMode.Default;
                switch (mVariablesLevel)// variable page is generic so need to change editmode as per type of variable.
                {
                case eVariablesLevel.BusinessFlow:
                case eVariablesLevel.Activity:
                    mode = VariableEditPage.eEditMode.Default;
                    break;

                case eVariablesLevel.Solution:
                    mode = VariableEditPage.eEditMode.Global;
                    break;
                }
                VariableEditPage w = new VariableEditPage(selectedVarb, mContext, false, mode);
                w.ShowAsWindow(eWindowShowStyle.Dialog);
                RefreshGrid(sender, e);

                if (selectedVarb.NameBeforeEdit != selectedVarb.Name)
                {
                    UpdateVariableNameChange(selectedVarb);
                }
            }
            else
            {
                Reporter.ToUser(eUserMsgKey.AskToSelectVariable);
            }
        }
Ejemplo n.º 2
0
        private void VariablesGrid_grdMain_MouseDoubleClick(object sender, EventArgs e)
        {
            VariableBase selectedVarb = (VariableBase)grdVariables.CurrentItem;

            selectedVarb.NameBeforeEdit = selectedVarb.Name;
            VariableEditPage.eEditMode editMode = VariableEditPage.eEditMode.Default;
            if (mContext != null && mContext.BusinessFlow == null)
            {
                editMode = VariableEditPage.eEditMode.SharedRepository;
            }
            if (mVariablesLevel == eVariablesLevel.Solution)
            {
                editMode = VariableEditPage.eEditMode.Global;
            }
            VariableEditPage w = new VariableEditPage(selectedVarb, mContext, false, editMode);

            w.ShowAsWindow(eWindowShowStyle.Dialog);

            if (selectedVarb.NameBeforeEdit != selectedVarb.Name)
            {
                UpdateVariableNameChange(selectedVarb);
            }
        }