Exemple #1
0
        /// <summary>
        /// Creates new instance of the class with specified parameters.
        /// </summary>
        public SuperTooltipInfo(string headerText, string footerText, string bodyText, Image bodyImage, Image footerImage, eTooltipColor color, bool headerVisible, bool footerVisible, Size customSize)
        {
            m_HeaderText = headerText;
            m_FooterText = footerText;
            m_BodyText = bodyText;
            m_BodyImage = bodyImage;
			m_FooterImage = footerImage;
            m_HeaderVisible = headerVisible;
            m_FooterVisible = footerVisible;
            m_CustomSize = customSize;
			m_Color=color;
        }
Exemple #2
0
 /// <summary>
 /// Creates new instance of the class with specified parameters.
 /// </summary>
 public SuperTooltipInfo(string headerText, string footerText, string bodyText, Image bodyImage, Image footerImage, eTooltipColor color)
 {
     m_HeaderText = headerText;
     m_FooterText = footerText;
     m_BodyText = bodyText;
     m_BodyImage = bodyImage;
     m_FooterImage = footerImage;
     m_Color = color;
 }
Exemple #3
0
        private void ApplyColors(eTooltipColor c)
        {
            this.ResetStyle();
            this.ResetStyleMouseOver();
            this.ResetStyleMouseDown();

            ElementStyle style = this.Style;

            Color color1 = Color.Empty;
            Color color2 = Color.Empty;

            TypeDescriptor.GetProperties(style)["WordWrap"].SetValue(style, true);
            TypeDescriptor.GetProperties(style)["TextAlignment"].SetValue(style, eStyleTextAlignment.Near);
            TypeDescriptor.GetProperties(style)["TextLineAlignment"].SetValue(style, eStyleTextAlignment.Near);
            TypeDescriptor.GetProperties(style)["BackColorGradientAngle"].SetValue(style, 90);
            TypeDescriptor.GetProperties(style)["BorderColor"].SetValue(style, Color.DimGray);
            TypeDescriptor.GetProperties(style)["BorderWidth"].SetValue(style, 1);
            TypeDescriptor.GetProperties(style)["TextColor"].SetValue(style, Color.Black);
            TypeDescriptor.GetProperties(style)["Border"].SetValue(style, eStyleBorderType.Solid);
            TypeDescriptor.GetProperties(style)["CornerType"].SetValue(style, eCornerType.Rounded);
            TypeDescriptor.GetProperties(style)["CornerDiameter"].SetValue(style, 2);
            
            switch (c)
            {
                case eTooltipColor.System:
                    {
                        if (GlobalManager.Renderer is Office2007Renderer)
                        {
                            Office2007ColorTable ct = ((Office2007Renderer)GlobalManager.Renderer).ColorTable;
                            color1 = ct.SuperTooltip.BackgroundColors.Start;
                            color2 = ct.SuperTooltip.BackgroundColors.End;
                            style.TextColor = ct.SuperTooltip.TextColor;
                        }
                        break;
                    }
                case eTooltipColor.Apple:
                    {
                        color1 = Color.FromArgb(232, 248, 224);
                        color2 = Color.FromArgb(173, 231, 146);
                        break;
                    }
                case eTooltipColor.Blue:
                    {
                        color1 = Color.FromArgb(221, 230, 247);
                        color2 = Color.FromArgb(138, 168, 228);
                        break;
                    }
                case eTooltipColor.BlueMist:
                    {
                        color1 = Color.FromArgb(227, 236, 243);
                        color2 = Color.FromArgb(155, 187, 210);
                        break;
                    }
                case eTooltipColor.Cyan:
                    {
                        color1 = Color.FromArgb(227, 236, 243);
                        color2 = Color.FromArgb(155, 187, 210);
                        break;
                    }
                case eTooltipColor.Green:
                    {
                        color1 = Color.FromArgb(234, 240, 226);
                        color2 = Color.FromArgb(183, 201, 151);
                        break;
                    }
                case eTooltipColor.Lemon:
                    {
                        color1 = Color.FromArgb(252, 253, 215);
                        color2 = Color.FromArgb(245, 249, 111);
                        break;
                    }
                case eTooltipColor.Magenta:
                    {
                        color1 = Color.FromArgb(243, 229, 236);
                        color2 = Color.FromArgb(213, 164, 187);
                        break;
                    }
                case eTooltipColor.Orange:
                    {
                        color1 = Color.FromArgb(252, 233, 217);
                        color2 = Color.FromArgb(246, 176, 120);
                        break;
                    }
                case eTooltipColor.Purple:
                    {
                        color1 = Color.FromArgb(234, 227, 245);
                        color2 = Color.FromArgb(180, 158, 222);
                        break;
                    }
                case eTooltipColor.PurpleMist:
                    {
                        color1 = Color.FromArgb(232, 227, 234);
                        color2 = Color.FromArgb(171, 156, 183);
                        break;
                    }
                case eTooltipColor.Red:
                    {
                        color1 = Color.FromArgb(249, 225, 226);
                        color2 = Color.FromArgb(238, 149, 151);
                        break;
                    }
                case eTooltipColor.Silver:
                    {
                        color1 = Color.FromArgb(225, 225, 232);
                        color2 = Color.FromArgb(149, 149, 170);
                        break;
                    }
                case eTooltipColor.Tan:
                    {
                        color1 = Color.FromArgb(248, 242, 226);
                        color2 = Color.FromArgb(232, 209, 153);
                        break;
                    }
                case eTooltipColor.Teal:
                    {
                        color1 = Color.FromArgb(205, 236, 240);
                        color2 = Color.FromArgb(78, 188, 202);
                        break;
                    }
                case eTooltipColor.Yellow:
                    {
                        color1 = Color.FromArgb(255, 244, 213);
                        color2 = Color.FromArgb(255, 216, 105);
                        break;
                    }
                case eTooltipColor.Gray:
                    {
                        color1 = Color.White;
                        color2 = ColorScheme.GetColor("E4E4F0");
                        break;
                    }
                case eTooltipColor.Office2003:
                    {
                        TypeDescriptor.GetProperties(style)["BackColor"].SetValue(style, Color.White);
                        TypeDescriptor.GetProperties(style)["BackColor2SchemePart"].SetValue(style, eColorSchemePart.MenuSide);
                        break;
                    }
                default:
                    {
                        color1 = Color.Empty;
                        color2 = Color.Empty;
                        break;
                    }
            }

            if(!color1.IsEmpty)
                TypeDescriptor.GetProperties(style)["BackColor"].SetValue(style, color1);
            if(!color2.IsEmpty)
                TypeDescriptor.GetProperties(style)["BackColor2"].SetValue(style, color2);

            this.SetRegion();
        }