Example #1
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (DesignMode)
            {
                return;
            }


            NodeIndent         = 15;
            EnableClientScript = true;
            ShowLines          = true;

            NodeStyle.Font.Size         = FontUnit.Point(8);
            NodeStyle.ForeColor         = Color.Black;
            NodeStyle.HorizontalPadding = Unit.Pixel(2);
            NodeStyle.NodeSpacing       = Unit.Pixel(0);
            NodeStyle.VerticalPadding   = Unit.Pixel(2);

            HoverNodeStyle.Font.Underline = true;
            HoverNodeStyle.ForeColor      = ConverterColor.ToColor("#6666AA");

            Nodes.Add(CreateNode("Root", 0, true));
        }
Example #2
0
        private Color GetInversColor(Color color)
        {
            HSBColor hsbColor = ConverterColor.ToHSBColor(color);
            //return (hsbColor.B > 127) ? Colors.White : Colors.Black;
            var newBlack      = (hsbColor.B > 127) ? hsbColor.B - 125 : hsbColor.B + 125;
            var newSaturation = (hsbColor.S > 127) ? hsbColor.S - 125 : hsbColor.S + 125;

            return(HSBColor.FromHSB(hsbColor.A, hsbColor.H, newSaturation, newBlack));
        }
Example #3
0
     /// <summary>
     /// Sends server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter"></see> object, which writes the content to be rendered on the client.
     /// </summary>
     /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter"></see> object that receives the server control content.</param>
     protected override void Render(HtmlTextWriter writer)
     {
         writer.Write(
             String.Format(
                 @"<frameset rows='50px,*' framespacing='0px'  border='0'  >
     <frame name='HeaderFrame' src='HeaderPage.aspx' noresize='noresize' scrolling='no' frameborder='0' marginwidth ='0' marginheight ='0' border='0' />
     <frameset  framespacing='5px' cols='{2},*'  border='5' bordercolor='{0}' >
         <frame name='" + NavigationFrameName + @"' src='NavigationPage.aspx' frameborder='1' bordercolor='{0}'   />
         <frame name='" + ContentFrameName + @"' src='{1}' frameborder='0' scrolling='no'  />
     </frameset>
 </frameset>", ConverterColor.ToHTMLColor(BorderColor), PageUrl, NavigatePanelWidth)
             );
     }
Example #4
0
        private void SetValueFromClipBoard()
        {
            string text = Clipboard.GetText();

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

            try
            {
                colorPicker1.Value = ConverterColor.ToColor(text);
            }
            catch
            {
            }
        }
Example #5
0
        private void CreateMessageBoxTable()
        {
            if (BackColor != Color.Empty)
            {
                table.BgColor = ConverterColor.ToHTMLColor(BackColor);
            }

            table.CellPadding = 0;
            table.CellSpacing = 0;
            table.Border      = 0;

            table.Width  = "100%";
            table.Height = "100%";

            table.Rows.Add(CreateTitleRow());
            table.Rows.Add(CreateMessageRow());
            table.Rows.Add(CreateButtonRow());
        }
Example #6
0
 private void copyHTMLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Clipboard.SetText(ConverterColor.ToHTMLColor(colorPicker1.Value));
 }