Example #1
0
 public static HClickDropdown ComboButton(HBefore beforeIcon, string caption, 
   bool isLeftDropListAlignment, params IHtmlControl[] listControls)
 {
   return new HClickDropdown(
     new HDropStyle().
       DropList(new HTone()
         .Top("31px")
         .CssAttribute(isLeftDropListAlignment ? "left" : "right", "0px")
         .Background("#f7f7f7")
         .Border("1px", "solid", "#e0e0e0", "2px")
         .CssAttribute("border-top", "none")
         .Padding(4, 0)
       ).
       RootWhenDropped(new HTone()
         .Background("#f7f7f7")
         .Border("1px", "solid", "#e0e0e0", "0px")
         .CssAttribute("border-bottom", "none")
       ).
       AnyItem(new HTone().Padding(4, 8)).
       SelectedItem(new HTone()
         .Color("#f5ffe6")
         .Background("#999999")
       ),
     new HButton(caption,
       beforeIcon,
       new HAfter().Content(@"▼").FontSize("60%").MarginLeft(5).MarginRight(-2).VAlign(1),
       new HHover().Border("1px", "solid", "#aaaaaa", "2px")
         .Background("#eaeaea")
         .LinearGradient("to top right", "#cccccc", "#eaeaea")
     ).Padding(6, 12)
       .Background("#f1f1f1")
       .LinearGradient("to top right", "#dddddd", "#f1f1f1")
       .Border("1px", "solid", "#bbbbbb", "2px"),
     listControls
   );
 }
Example #2
0
    public static HPanel OperationState(WebOperation operation)
    {
      //HHover closeHover = new HHover().Background(Color.FromArgb(189, 216, 249));

      HBefore alert = new HBefore().Content(@"!").CssAttribute("border-radius", 5).MarginRight(4);

      return new HPanel(
        new HButton("",
          new HAfter().Content(@"\2A2F").FontWeight("700").FontSize("125%"))
          .CssAttribute("margin-top", "-6px")
          .MarginRight("4px").FloatRight().Color("#4e545b")
          .Event("currentOperationState_Hide", "currentOperationState",
            delegate(JsonData json)
            {
              operation.Message = "";
            }
          ),
        new HLabel(operation.Message, alert).Padding(10, 12, 8, 12)
      ).EditContainer("currentOperationState").
      CssAttribute("position", "relative").Display("inline-block").
      Border("2px", "outset", Color.Blue, "2px").Color(Color.FromArgb(220, 50, 47)).
      Background(Color.LightBlue).WidthLimit("200px", "").
      Hide(operation.Completed || StringHlp.IsEmpty(operation.Message));
    }