Esempio n. 1
0
 /// <summary>
 /// 添加按钮
 /// </summary>
 /// <param name="textLebel">文本标签</param>
 /// <param name="clickHandler">单击事件</param>
 /// <param name="imageUri">图片地址</param>
 /// <param name="description">工具提示</param>
 /// <param name="isRadioButton">是否单选按钮</param>
 public void AddButton(
     string textLebel,
     Action clickHandler,
     string imageUri        = null,
     string description     = null,
     ToolbarButtonType type = ToolbarButtonType.Default)
 {
     this.Buttons.Add(new ToolbarButton
     {
         TextLabel    = textLebel,
         ClickHandler = clickHandler,
         Description  = description,
         ImageUri     = imageUri,
         ButtonType   = type
     });
 }
Esempio n. 2
0
 void IStateManager.LoadViewState(object savedSate)
 {
     if (savedSate != null)
     {
         object[] myState = (object[])savedSate;
         _buttonOverImage = (bool)myState[0];
         _buttonDownImage = (bool)myState[1];
         _buttonOverStyle = (bool)myState[2];
         _buttonDownStyle = (bool)myState[3];
         _buttonPath      = (string)myState[4];
         _buttonExtension = (string)myState[5];
         _buttonType      = (ToolbarButtonType)myState[6];
         ((IStateManager)_buttonStyle).LoadViewState(myState[7]);
         _backgroundImage        = (bool)myState[8];
         _backColor              = (Color)myState[9];
         _gutterBackColor        = (Color)myState[10];
         _gutterBorderColorLight = (Color)myState[11];
         _gutterBorderColorDark  = (Color)myState[12];
         _startImage             = (bool)myState[13];
         _endImage = (bool)myState[14];
     }
 }