Beispiel #1
0
        /// <summary>
        /// Called when the trackbar value changes.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="EventArgs"/> that contains no data.</param>
        void toolStripTrackBarItem_ValueChanged(object sender, EventArgs e)
        {
            NuGenToolStripTrackBar  item = sender as NuGenToolStripTrackBar;
            NuGenApplicationCommand applicationCommand = CommandManager.GetApplicationCommandByItem(item);

            if (applicationCommand != null)
            {
                Control ownerControl = GetOwnerControl(sender);
                applicationCommand.Execute(ownerControl, item);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Called when an item is clicked.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="ToolBarButtonClickEventArgs"/> that contains event data.</param>
        void Parent_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            ToolBarButton           item = e.Button;
            NuGenApplicationCommand applicationCommand = _commandManager.GetApplicationCommandByItem(item);

            if (applicationCommand != null)
            {
                Control ownerControl = GetOwnerControl(sender);
                _owner = null;
                applicationCommand.Execute(ownerControl, item);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Called when an item is clicked.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="EventArgs"/> that contains no data.</param>
        void menuItem_Click(object sender, EventArgs e)
        {
            MenuItem item = sender as MenuItem;
            NuGenApplicationCommand applicationCommand = _commandManager.GetApplicationCommandByItem(item);

            if (applicationCommand != null)
            {
                Control ownerControl = GetOwnerControl(sender);
                _owner = null;
                applicationCommand.Execute(ownerControl, item);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Called when an item is clicked.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="EventArgs"/> that contains no data.</param>
        void toolStripItem_Click(object sender, EventArgs e)
        {
            ToolStripItem           item = sender as ToolStripItem;
            NuGenApplicationCommand applicationCommand = _commandManager.GetApplicationCommandByItem(item);

            if (applicationCommand != null)
            {
                Control ownerControl = GetOwnerControl(sender);
                if ((ownerControl == null) && (cachedOwnerControl != null))
                {
                    ownerControl = cachedOwnerControl;
                }
                cachedOwnerControl = null;

                applicationCommand.Execute(ownerControl, item);
            }
        }