Beispiel #1
0
        private void ProcessClick(object sender, bool b2)
        {
            ToolStripMenuItem tsi = (sender as ToolStripMenuItem);

            if (tsi == null)
            {
                Debug.Assert(false); return;
            }

            string strName = tsi.Text;
            object oTag    = tsi.Tag;

            MoveItemToTop(strName);

            if (m_handler != null)
            {
                if (b2)
                {
                    m_handler.OnMruExecute2(strName, oTag);
                }
                else
                {
                    m_handler.OnMruExecute(strName, oTag);
                }
            }
        }
Beispiel #2
0
        private void ClickHandler(object sender, EventArgs args)
        {
            ToolStripMenuItem tsmi = (sender as ToolStripMenuItem);

            if (tsmi == null)
            {
                Debug.Assert(false); return;
            }
            Debug.Assert(m_lMruMenuItems.Contains(tsmi));

            ToolStripMenuItem tsmiParent = (tsmi.OwnerItem as ToolStripMenuItem);

            if (tsmiParent == null)
            {
                Debug.Assert(false); return;
            }
            if (!m_lContainers.Contains(tsmiParent))
            {
                Debug.Assert(false); return;
            }

            if (m_handler == null)
            {
                Debug.Assert(false); return;
            }

            string strName = tsmi.Text;
            object oTag    = tsmi.Tag;

            m_handler.OnMruExecute(strName, oTag, tsmiParent);

            // MoveItemToTop(strName);
        }
Beispiel #3
0
        private void ClickedHandler(object sender, EventArgs args)
        {
            ToolStripMenuItem tsi = sender as ToolStripMenuItem;

            if (tsi == null)
            {
                Debug.Assert(false); return;
            }

            string strName = tsi.Text;
            object oTag    = tsi.Tag;

            this.MoveItemToTop(strName);

            if (m_handler != null)
            {
                m_handler.OnMruExecute(strName, oTag);
            }
        }