/// <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)); }
private void SetValueFromClipBoard() { string text = Clipboard.GetText(); if (string.IsNullOrEmpty(text)) { return; } try { colorPicker1.Value = ConverterColor.ToColor(text); } catch { } }