Beispiel #1
0
        public MenuItem SetAction(GwenEventHandler handler)
        {
            if (m_Accelerator != null)
            {
                AddAccelerator(m_Accelerator.Text, handler);
            }

            Selected += handler;
            return(this);
        }
Beispiel #2
0
        public MenuItem SetAction(GwenEventHandler <EventArgs> handler, GwenEventHandler <ItemSelectedEventArgs> selHandler)
        {
            if (m_Accelerator != null)
            {
                AddAccelerator(m_Accelerator.Text, handler);
            }

            Selected += selHandler;
            return(this);
        }
Beispiel #3
0
 /// <summary>
 /// Adds keyboard accelerator.
 /// </summary>
 /// <param name="accelerator">Accelerator text.</param>
 /// <param name="handler">Handler.</param>
 public void AddAccelerator(string accelerator, GwenEventHandler <EventArgs> handler)
 {
     accelerator = accelerator.Trim().ToUpperInvariant();
     m_Accelerators[accelerator] = handler;
 }
Beispiel #4
0
 /// <summary>
 /// Adds keyboard accelerator.
 /// </summary>
 /// <param name="accelerator">Accelerator text.</param>
 /// <param name="handler">Handler.</param>
 public void AddAccelerator(string accelerator, GwenEventHandler<EventArgs> handler)
 {
     accelerator = accelerator.Trim().ToUpperInvariant();
     m_Accelerators[accelerator] = handler;
 }
Beispiel #5
0
        public MenuItem SetAction(GwenEventHandler handler)
        {
            if (m_Accelerator != null)
            {
                AddAccelerator(m_Accelerator.Text, handler);
            }

            Selected += handler;
            return this;
        }
Beispiel #6
0
        public MenuItem SetAction(GwenEventHandler<EventArgs> handler, GwenEventHandler<ItemSelectedEventArgs> selHandler)
        {
            if (m_Accelerator != null)
            {
                AddAccelerator(m_Accelerator.Text, handler);
            }

            Selected += selHandler;
            return this;
        }