Ejemplo n.º 1
0
        private void OnMenuItemClick(object sender, EventArgs e)
        {
            ToolStripItem item = sender as ToolStripItem;

            if (item == null)
            {
                return;
            }

            if (_objectHelpRequested != null && _objectInfo != null)
            {
                ObjectHelpActionEventArgs args = new ObjectHelpActionEventArgs();
                args.ActionType = (ActionType)item.Tag;
                args.objectInfo.CopyFrom(_objectInfo);
                _objectHelpRequested(sender, args);
            }
        }
Ejemplo n.º 2
0
        private void OnMenuItemClick(object sender, EventArgs e)
        {
            ToolStripItem item = sender as ToolStripItem;

            if (item == null || String.IsNullOrEmpty(WordAtCursor))
            {
                return;
            }

            if (_objectInfo == null || _objectInfo.ObjectName.ToLowerInvariant() != WordAtCursor.ToLowerInvariant())
            {
                FetchObjectInfoFromDatabase();
            }

            if (_objectHelpRequested != null && _objectInfo != null)
            {
                ObjectHelpActionEventArgs args = new ObjectHelpActionEventArgs();
                args.ActionType = (ActionType)item.Tag;
                args.objectInfo.CopyFrom(_objectInfo);
                _objectHelpRequested(sender, args);
            }
        }