Example #1
0
        /// <summary>
        /// Event: Occurs when a navigation panel is clicked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void navPanel_Click(object sender, EventArgs e)
        {
            f0t0NavPanel panel = sender as f0t0NavPanel;

            if (panel != null)
            {
                NavigationActionArgs n = new NavigationActionArgs(panel.Action, e);
                if (NavigationInvoked != null)
                {
                    NavigationInvoked(this, n);
                }
                else
                {
                    if (this.fotopage != null)
                    {
                        if (panel.Action == NavigationAction.MoveForward)
                        {
                            this.fotopage.ShowNextPicture();
                        }
                        else
                        {
                            this.fotopage.ShowPreviousPicture();
                        }
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        /// Event: occurs when the mouse button goes up.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void f0t0NavPanel_MouseUp(object sender, MouseEventArgs e)
        {
            f0t0NavPanel panel = sender as f0t0NavPanel;

            if (panel != null && panel.CanNavigate)
            {
                panel.BorderStyle   = BorderStyle.None;
                repeatTimer.Enabled = false;
                buttonDown          = false;
            }
        }
Example #3
0
 /// <summary>
 /// Uninvoke navigation on an object with a given action (navigation action)
 /// </summary>
 /// <param name="a"></param>
 public void UninvokeNavigation(NavigationAction a)
 {
     foreach (Control c in this.Controls)
     {
         f0t0NavPanel f = c as f0t0NavPanel;
         if (f != null && f.Action == a && f.IsInvoked)
         {
             f.EndInvoke();
             break;
         }
     }
 }
Example #4
0
        /// <summary>
        /// Event: Occurs when the mouse is down.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void f0t0NavPanel_MouseDown(object sender, MouseEventArgs e)
        {
            f0t0NavPanel panel = sender as f0t0NavPanel;

            if (panel != null && panel.CanNavigate)
            {
                panel.BorderStyle    = BorderStyle.Fixed3D;
                repeatTimer.Interval = v_initDelay;
                repeatTimer.Enabled  = true;
                buttonDown           = true;
            }
        }
Example #5
0
        protected void f0t0NavPanel_MouseLeave(object sender, EventArgs e)
        {
            f0t0NavPanel panel = sender as f0t0NavPanel;

            if (panel != null && panel.CanNavigate)
            {
                hasfocus        = false;
                panel.BackColor = panel.Parent.BackColor;
                //this.BorderStyle = BorderStyle.None;
                this.Refresh();
            }
            this.Focus();
        }
Example #6
0
 /// <summary>
 /// Invoke navigation on an object with a given action (navigation action)
 /// </summary>
 /// <param name="a"></param>
 public void InvokeNavigation(NavigationAction a)
 {
     foreach (Control c in this.Controls)
     {
         f0t0NavPanel f = c as f0t0NavPanel;
         if (f != null && f.Action == a)
         {
             if (!f.IsInvoked)
             {
                 f.PerformInvoke();
             }
             break;
         }
     }
 }
Example #7
0
        protected void f0t0NavPanel_MouseEnter(object sender, EventArgs e)
        {
            f0t0NavPanel panel = sender as f0t0NavPanel;

            if (panel != null && panel.CanNavigate)
            {
                hasfocus = true;
                //panel.BackColor = SystemColors.ButtonShadow;
                panel.BackColor = Color.DodgerBlue;
                if (LockOnMouseOver)
                {
                    this.BorderStyle = BorderStyle.FixedSingle;
                }
                else
                {
                    this.BorderStyle = BorderStyle.None;
                }

                this.Refresh();
            }
            this.Focus();
        }