Ejemplo n.º 1
0
        private void addFormulaToolTipTo(SuperToolTip toolTip, IParameterDTO parameterDTO)
        {
            if (parameterDTO.FormulaType != FormulaType.Rate)
            {
                return;
            }

            var formula = parameterDTO.Parameter.Formula as ExplicitFormula;

            if (formula == null)
            {
                return;
            }

            toolTip.Items.AddSeparator();
            toolTip.WithTitle(PKSimConstants.Information.Formula);
            toolTip.WithText(formula.FormulaString);

            toolTip.Items.AddSeparator();
            toolTip.WithTitle(PKSimConstants.Information.ObjectReferences);

            var sb = new StringBuilder();

            foreach (var objectPath in formula.ObjectPaths)
            {
                sb.AppendLine(string.Format("<I>{0}</I> is defined as: {1}", objectPath.Alias, displayObjectPathFrom(objectPath)));
            }

            toolTip.WithText(sb.ToString());
        }
        private static SuperToolTip addFormulaToolTip(FormulaBuilderDTO formula, SuperToolTip toolTip, string title)
        {
            if (formula == null || formula.FormulaType != ObjectTypes.ExplicitFormula)
            {
                return(toolTip);
            }

            toolTip.Items.AddSeparator();
            toolTip.WithTitle(title);
            toolTip.WithText(formula.FormulaString);

            toolTip.Items.AddSeparator();
            toolTip.WithTitle(AppConstants.Captions.References);

            var sb = new StringBuilder();

            foreach (var objectPath in formula.ObjectPaths)
            {
                sb.AppendLine($"<I>{objectPath.Alias}</I> is defined as: {objectPath.Path}");
            }

            toolTip.WithText(sb.ToString());

            return(toolTip);
        }
Ejemplo n.º 3
0
 public SuperToolTip AddSubItemTo(SuperToolTip toolTip, string title, string text)
 {
     toolTip.Items.AddSeparator();
     toolTip.WithTitle(title);
     toolTip.WithText(text);
     return(toolTip);
 }
Ejemplo n.º 4
0
 private void addValueDescriptionToolTip(SuperToolTip toolTip, IParameterDTO parameterDTO)
 {
     if (string.IsNullOrEmpty(parameterDTO.ValueDescription))
     {
         return;
     }
     toolTip.Items.AddSeparator();
     toolTip.WithTitle(PKSimConstants.UI.ValueDescription);
     toolTip.WithText(parameterDTO.ValueDescription);
 }
Ejemplo n.º 5
0
        private void addValueDescriptionToolTip(SuperToolTip toolTip, IParameterDTO parameterDTO)
        {
            var valueOriginAsString = parameterDTO.ValueOrigin.Display;

            if (string.IsNullOrEmpty(valueOriginAsString))
            {
                return;
            }

            toolTip.Items.AddSeparator();
            toolTip.WithTitle(Captions.ValueOrigin);
            toolTip.WithText(valueOriginAsString);
        }
        public SuperToolTip MapFrom(IEnumerable <ToolTipPart> toolTipParts)
        {
            var superToolTip = new SuperToolTip();

            superToolTip.Appearance.TextOptions.HotkeyPrefix = HKeyPrefix.None;

            for (int i = 0; i < toolTipParts.Count(); i++)
            {
                var toolTipPart = toolTipParts.ElementAt(i);
                superToolTip.WithTitle(toolTipPart.Title);
                superToolTip.WithText(toolTipPart.Content);

                if (i != toolTipParts.Count() - 1)
                {
                    superToolTip.Items.AddSeparator();
                }
            }

            return(superToolTip);
        }