/// <summary>
		/// </summary>
		/// <param name="mouse"></param>
		/// <param name="but"></param>
		/// <param name="act"></param>
		/// <returns></returns>
		public override NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act)
		{
			if (this.ClientRectangle.Contains(mouse))
			{
				if (act == NuGenMiniBarUpdateAction.MouseDown)
					_click = true;
				else if (act == NuGenMiniBarUpdateAction.MouseUp && _click)
				{
					if (this.Owner != null)
						this.Owner.ClickButton(this);
					_click = false;
				}
				return _click ? NuGenMiniBarButtonState.Pressed : NuGenMiniBarButtonState.Hot;
			}
			else
				return NuGenMiniBarButtonState.Normal;
		}
示例#2
0
        /// <summary>
        /// </summary>
        public void UpdateButtons(NuGenMiniBarUpdateAction act)
        {
            NuGenMiniBarButtonState st;
            Point        pt  = this.PointToClient(Control.MousePosition);
            MouseButtons but = Control.MouseButtons;
            int          i   = 0;

            foreach (NuGenMiniBarControl btn in _coll)
            {
                st = btn.Action(pt, but, act);
                if (st != _btnStates[i])
                {
                    _btnStates[i] = st;
                    this.Invalidate(Rectangle.Inflate(btn.ClientRectangle, 1, 1));
                    this.Update();
                }
                i++;
            }
        }
示例#3
0
		/// <summary>
		/// </summary>
		public void UpdateButtons(NuGenMiniBarUpdateAction act)
		{
			NuGenMiniBarButtonState st;
			Point pt = this.PointToClient(Control.MousePosition);
			MouseButtons but = Control.MouseButtons;
			int i = 0;
			foreach (NuGenMiniBarControl btn in _coll)
			{
				st = btn.Action(pt, but, act);
				if (st != _btnStates[i])
				{
					_btnStates[i] = st;
					this.Invalidate(Rectangle.Inflate(btn.ClientRectangle, 1, 1));
					this.Update();
				}
				i++;
			}
		}
		/// <summary>
		/// </summary>
		public abstract NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act);
示例#5
0
 /// <summary>
 /// </summary>
 /// <param name="mouse"></param>
 /// <param name="but"></param>
 /// <param name="act"></param>
 /// <returns></returns>
 public override NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act)
 {
     if (this.ClientRectangle.Contains(mouse))
     {
         if (act == NuGenMiniBarUpdateAction.MouseDown)
         {
             _click = true;
         }
         else if (act == NuGenMiniBarUpdateAction.MouseUp && _click)
         {
             if (this.Owner != null)
             {
                 this.Owner.ClickButton(this);
             }
             _click = false;
         }
         return(_click ? NuGenMiniBarButtonState.Pressed : NuGenMiniBarButtonState.Hot);
     }
     else
     {
         return(NuGenMiniBarButtonState.Normal);
     }
 }
示例#6
0
 /// <summary>
 /// </summary>
 /// <param name="mouse"></param>
 /// <param name="but"></param>
 /// <param name="act"></param>
 /// <returns></returns>
 public override NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act)
 {
     return(NState);
 }
		/// <summary>
		/// </summary>
		/// <param name="mouse"></param>
		/// <param name="but"></param>
		/// <param name="act"></param>
		/// <returns></returns>
		public override NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act)
		{
			return NState;
		}
示例#8
0
 /// <summary>
 /// </summary>
 public abstract NuGenMiniBarButtonState Action(Point mouse, MouseButtons but, NuGenMiniBarUpdateAction act);