Exemplo n.º 1
0
        private static void SetToolTip(ITweakInfo info, LinkedControl linkedControl)
        {
            string description = info.Description;

            TranslatedDescriptions.TryGetValue(info.Identifier, out description);
            linkedControl.Tip.SetToolTip(linkedControl.Control, BuildToolTipText(description, info.AffectedFiles, info.AffectedValues));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Link a tweak to a control's tooltip.
        /// </summary>
        /// <param name="control"></param>
        /// <param name="tweakInfo"></param>
        public static void LinkInfo(Control control, ToolTip tip, ITweakInfo tweakInfo)
        {
            LinkedControl linkedControl = new LinkedControl();

            linkedControl.Control = control;
            linkedControl.Tip     = tip;
            LinkedTweakInfos.Add(linkedControl, tweakInfo);

            if (!TranslatedDescriptions.ContainsKey(tweakInfo.Identifier))
            {
                TranslatedDescriptions[tweakInfo.Identifier] = tweakInfo.Description;
            }
        }