Beispiel #1
0
 private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (PopupNotifierOld.CloseButton)
     {
         if (RectClose.Contains(e.X, e.Y))
         {
             bMouseOnClose = true;
         }
         else
         {
             bMouseOnClose = false;
         }
     }
     if (PopupNotifierOld.OptionsButton)
     {
         if (RectOptions.Contains(e.X, e.Y))
         {
             bMouseOnOptions = true;
         }
         else
         {
             bMouseOnOptions = false;
         }
     }
     if (RectText.Contains(e.X, e.Y))
     {
         bMouseOnLink = true;
     }
     else
     {
         bMouseOnLink = false;
     }
     Invalidate();
 }
Beispiel #2
0
 /// <summary>
 /// Update form to display hover styles when the mouse moves over the notification form.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PopupNotifierForm_MouseMove(object sender, MouseEventArgs e)
 {
     if (Parent.ShowCloseButton)
     {
         mouseOnClose = RectClose.Contains(e.X, e.Y);
     }
     if (Parent.ShowOptionsButton)
     {
         mouseOnOptions = RectOptions.Contains(e.X, e.Y);
     }
     mouseOnLink = RectContentText.Contains(e.X, e.Y);
     Invalidate();
 }
Beispiel #3
0
 private void Form_MouseUp(object Sender, MouseEventArgs e)
 {
     if (RectClose.Contains(e.X, e.Y))
     {
         CloseClick(this, EventArgs.Empty);
     }
     if (RectText.Contains(e.X, e.Y))
     {
         LinkClick(this, EventArgs.Empty);
     }
     if (RectOptions.Contains(e.X, e.Y))
     {
         if (Parent.OptionsMenu != null)
         {
             Parent.OptionsMenu.Show(this, new Point(RectOptions.Right - Parent.OptionsMenu.Width, RectOptions.Bottom));
             Parent.bShouldRemainVisible = true;
         }
     }
 }
Beispiel #4
0
 private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (RectClose.Contains(e.X, e.Y))
     {
         OnCloseClick();
     }
     if (RectText.Contains(e.X, e.Y))
     {
         OnLinkClick();
     }
     if (RectOptions.Contains(e.X, e.Y))
     {
         if ((PopupNotifierOld.OptionsMenu != null))
         {
             PopupNotifierOld.OptionsMenu.Show(this, new Point(RectOptions.Right - PopupNotifierOld.OptionsMenu.Width, RectOptions.Bottom));
             PopupNotifierOld.bShouldRemainVisible = true;
         }
     }
 }
 /// <summary>
 /// A mouse button has been released, check if something has been clicked.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PopupNotifierForm_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         if (RectClose.Contains(e.X, e.Y) && (CloseClick != null))
         {
             CloseClick(this, EventArgs.Empty);
         }
         if (RectOptions.Contains(e.X, e.Y) && (Parent.OptionsMenu != null))
         {
             if (ContextMenuOpened != null)
             {
                 ContextMenuOpened(this, EventArgs.Empty);
             }
             Parent.OptionsMenu.Show(this, new Point(RectOptions.Right - Parent.OptionsMenu.Width, RectOptions.Bottom));
             Parent.OptionsMenu.Closed += new ToolStripDropDownClosedEventHandler(OptionsMenu_Closed);
         }
     }
 }
Beispiel #6
0
 /// <summary>
 /// A mouse button has been released, check if something has been clicked.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PopupNotifierForm_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (RectClose.Contains(e.X, e.Y))
         {
             CloseClick?.Invoke(this, EventArgs.Empty);
         }
         if (RectContentText.Contains(e.X, e.Y))
         {
             LinkClick?.Invoke(this, EventArgs.Empty);
         }
         if (RectOptions.Contains(e.X, e.Y) && (Parent.OptionsMenu != null))
         {
             ContextMenuOpened?.Invoke(this, EventArgs.Empty);
             Parent.OptionsMenu.Show(this, new Point(RectOptions.Right - Parent.OptionsMenu.Width, RectOptions.Bottom));
             Parent.OptionsMenu.Closed += OptionsMenu_Closed;
         }
     }
 }
Beispiel #7
0
        private void Form_MouseMove(object Sender, MouseEventArgs e)
        {
            if (Parent.CloseButton)
            {
                if (RectClose.Contains(e.X, e.Y))
                {
                    bMouseOnClose = true;
                }
                else
                {
                    bMouseOnClose = false;
                }
            }

            if (Parent.OptionsButton)
            {
                if (RectOptions.Contains(e.X, e.Y))
                {
                    bMouseOnOptions = true;
                }
                else
                {
                    bMouseOnOptions = false;
                }
            }

            if (RectText.Contains(e.X, e.Y))
            {
                bMouseOnLink = true;
            }
            else
            {
                bMouseOnLink = false;
            }

            Invalidate();
        }
 /// <summary>
 /// Update form to display hover styles when the mouse moves over the notification form.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PopupNotifierForm_MouseMove(object sender, MouseEventArgs e)
 {
     mouseOnClose   = RectClose.Contains(e.X, e.Y);
     mouseOnOptions = RectOptions.Contains(e.X, e.Y);
     Invalidate();
 }