Пример #1
0
        /// <summary>
        /// Event received when context menu of the form is open
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event args</param>
        private void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
        {
            EventHandler <FormContextMenuEventArgs> handler = ShowContextMenu;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        /// <summary>
        /// Occurs when pages context menu button was clicked
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event arguments</param>
        private void OnViewContextMenuClick(object sender, FormEventArgs e)
        {
            EventHandler <FormContextMenuEventArgs> handler = ShowContextMenu;

            if (handler != null)
            {
                Point menuLocation = Control.MousePosition;
                menuLocation   = e.Form.PointToClient(menuLocation);
                menuLocation.Y = 0;
                FormContextMenuEventArgs args = new FormContextMenuEventArgs(menuLocation, e.Form, e.FormId);
                handler(this, args);
            }
        }
Пример #3
0
 void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
 {
     contextMenuStrip1.Show(e.Form, e.MenuLocation);
 }
Пример #4
0
 /// <summary>
 /// Event received when context menu of the form is open
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event args</param>
 private void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
 {
     EventHandler<FormContextMenuEventArgs> handler = ShowContextMenu;
      if (handler != null)
      {
     handler(this, e);
      }
 }
Пример #5
0
 void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
 {
 }
Пример #6
0
 /// <summary>
 /// Occurs when pages context menu button was clicked
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event arguments</param>
 private void OnViewContextMenuClick(object sender, FormEventArgs e)
 {
     EventHandler<FormContextMenuEventArgs> handler = ShowContextMenu;
      if (handler != null)
      {
     Point menuLocation = Control.MousePosition;
     menuLocation       = e.Form.PointToClient(menuLocation);
     menuLocation.Y     = 0;
     FormContextMenuEventArgs args = new FormContextMenuEventArgs(e.Form, menuLocation);
     handler(this, args);
      }
 }