Esempio n. 1
0
        /// <summary>
        /// Internal handler for item selected event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected override void OnItemSelected(ControlBase control, ItemSelectedEventArgs args)
        {
            if (!IsDisabled)
            {
                MenuItem item = control as MenuItem;
                if (null == item)
                {
                    return;
                }

                m_TextBox.Text = item.Text;
            }

            base.OnItemSelected(control, args);
        }
Esempio n. 2
0
        /// <summary>
        /// Handler for the row selection event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void OnRowSelected(ControlBase control, ItemSelectedEventArgs args)
        {
            ListBoxRow row = args.SelectedItem as ListBoxRow;

            if (row == null)
            {
                return;
            }

            if (row.IsSelected)
            {
                if (IsToggle)
                {
                    UnselectRow(row);
                }
            }
            else
            {
                SelectRow(row, false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Handler for the row selection event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void onRowSelected(ControlBase control, ItemSelectedEventArgs args)
        {
            // [omeg] changed default behavior
            bool       clear = false;// !InputHandler.InputHandler.IsShiftDown;
            ListBoxRow row   = args.SelectedItem as ListBoxRow;

            if (row == null)
            {
                return;
            }

            if (row.IsSelected)
            {
                if (IsToggle)
                {
                    UnselectRow(row);
                }
            }
            else
            {
                SelectRow(row, clear);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Internal handler for item selected event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void OnItemSelected(Base control, ItemSelectedEventArgs args)
        {
            if (!IsDisabled)
            {
                //Convert selected to a menu item
                MenuItem item = control as MenuItem;
                if (null == item)
                {
                    return;
                }

                m_SelectedItem  = item;
                Text            = m_SelectedItem.Text;
                m_Menu.IsHidden = true;

                if (ItemSelected != null)
                {
                    ItemSelected.Invoke(this, args);
                }

                Focus();
                Invalidate();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Internal handler for item selected event.
        /// </summary>
        /// <param name="control">Event source.</param>
		protected virtual void OnItemSelected(Base control, ItemSelectedEventArgs args)
        {
            if (!IsDisabled)
            {
                //Convert selected to a menu item
                MenuItem item = control as MenuItem;
                if (null == item) return;

                m_SelectedItem = item;
                Text = m_SelectedItem.Text;
                m_Menu.IsHidden = true;

                if (ItemSelected != null)
                    ItemSelected.Invoke(this, args);

                Focus();
                Invalidate();
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Handler for the row selection event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void OnRowSelected(Base control, ItemSelectedEventArgs args)
        {
            // [omeg] changed default behavior
            bool clear = false;// !InputHandler.InputHandler.IsShiftDown;
			ListBoxRow row = args.SelectedItem as ListBoxRow;
            if (row == null)
                return;

            if (row.IsSelected)
            {
                if (IsToggle)
                    UnselectRow(row);
            }
            else
            {
                SelectRow(row, clear);
            }
        }
Esempio n. 7
0
 void handleSelect (Base sender, ItemSelectedEventArgs args)
 {
     var item = sender as ComboBox;
     Localizer.Instance.CurrentLocale = (LocaleEnum) Enum.Parse(typeof (LocaleEnum), item.SelectedItem.Name);
     ConfigManager.Instance["freezing_archer"].SetString("general", "language", item.SelectedItem.Name);
 }
Esempio n. 8
0
 void MenuItemSelect(Base control, ItemSelectedEventArgs args)
 {
     MenuItem item = control as MenuItem;
     UnitPrint(String.Format("Menu item selected: {0}", item.Text));
 }