예제 #1
0
    private string GetActionText(WorkflowStepInfo currentStep, WorkflowStepInfo nextStep)
    {
        string text = ResHelper.LocalizeString(nextStep.StepDisplayName);
        WorkflowTransitionInfo transition = nextStep.RelatedTransition;
        SourcePoint            def        = (transition != null) ? currentStep.GetSourcePoint(transition.TransitionSourcePointGUID) : null;

        if (!String.IsNullOrEmpty(def?.Text))
        {
            text = String.Format(ResHelper.LocalizeString(def.Text), text);
        }

        return(text);
    }
    private string GetActionText(WorkflowStepInfo currentStep, WorkflowStepInfo nextStep)
    {
        string text = ResHelper.LocalizeString(nextStep.StepDisplayName);
        WorkflowTransitionInfo transition = nextStep.RelatedTransition;
        SourcePoint def = (transition != null) ? currentStep.GetSourcePoint(transition.TransitionSourcePointGUID) : null;
        if (def != null)
        {
            if (!string.IsNullOrEmpty(def.Text))
            {
                text = string.Format(ResHelper.LocalizeString(def.Text), text);
            }
        }

        return text;
    }
예제 #3
0
    private void ProcessAction(HeaderAction action, WorkflowStepInfo currentStep, WorkflowStepInfo nextStep)
    {
        if (action == null)
        {
            return;
        }

        string      nextStepName = null;
        SourcePoint def          = null;

        if (nextStep != null)
        {
            WorkflowTransitionInfo transition = nextStep.RelatedTransition;
            if (transition != null)
            {
                def          = currentStep.GetSourcePoint(transition.TransitionSourcePointGUID);
                nextStepName = HTMLHelper.HTMLEncode(ResHelper.LocalizeString(nextStep.StepDisplayName));
            }
        }
        else
        {
            def = currentStep.StepDefinition.DefinitionPoint;
        }

        if (def != null)
        {
            if (!string.IsNullOrEmpty(def.Text))
            {
                action.Text = string.Format(HTMLHelper.HTMLEncode(ResHelper.LocalizeString(def.Text)), nextStepName);
            }

            if (!string.IsNullOrEmpty(def.Tooltip))
            {
                action.Tooltip = string.Format(ResHelper.LocalizeString(def.Tooltip), action.Text);
            }
        }
    }
    private void ProcessAction(HeaderAction action, WorkflowStepInfo currentStep, WorkflowStepInfo nextStep)
    {
        if (action == null)
        {
            return;
        }

        string nextStepName = null;
        SourcePoint def = null;
        if (nextStep != null)
        {
            WorkflowTransitionInfo transition = nextStep.RelatedTransition;
            if (transition != null)
            {
                def = currentStep.GetSourcePoint(transition.TransitionSourcePointGUID);
                nextStepName = HTMLHelper.HTMLEncode(ResHelper.LocalizeString(nextStep.StepDisplayName));
            }
        }
        else
        {
            def = currentStep.StepDefinition.DefinitionPoint;
        }

        if (def != null)
        {
            if (!string.IsNullOrEmpty(def.Text))
            {
                action.Text = string.Format(HTMLHelper.HTMLEncode(ResHelper.LocalizeString(def.Text)), nextStepName);
            }

            if (!string.IsNullOrEmpty(def.Tooltip))
            {
                action.Tooltip = string.Format(ResHelper.LocalizeString(def.Tooltip), action.Text);
            }
        }
    }