The base class for items displayed in a GameModeListView.
Inheritance: ManagedFontUserControl
        /// <summary>
        /// Handles the <see cref="Control.GotFocus"/> event of list view items.
        /// </summary>
        /// <remarks>
        /// This tracks the currently focussed item, and decorates the item to look focussed.
        /// </remarks>
        /// <param name="sender">The <see cref="GameModeListViewItemBase"/> that raised the event.</param>
        /// <param name="e">An <see cref="EventArgs"/> descriibng the event arguments.</param>
        private void GameModeListView_GotFocus(object sender, EventArgs e)
        {
            GameModeListViewItemBase lviItem = (GameModeListViewItemBase)sender;

            FocussedItem        = lviItem;
            lviItem.BorderStyle = BorderStyle.FixedSingle;
        }
        /// <summary>
        /// Handles the <see cref="Control.LostFocus"/> event of list view items.
        /// </summary>
        /// <remarks>
        /// This tracks the currently focussed item, and decorates the item to look unfocussed.
        /// </remarks>
        /// <param name="sender">The <see cref="GameModeListViewItemBase"/> that raised the event.</param>
        /// <param name="e">An <see cref="EventArgs"/> descriibng the event arguments.</param>
        private void GameModeListView_LostFocus(object sender, EventArgs e)
        {
            GameModeListViewItemBase lviItem = (GameModeListViewItemBase)sender;

            if (FocussedItem == lviItem)
            {
                FocussedItem = null;
            }
            lviItem.BorderStyle = BorderStyle.None;
        }
		/// <summary>
		/// Raises the <see cref="SelectedItemChanged"/> event.
		/// </summary>
		/// <param name="p_lviSelected">The newly selected list view item.</param>
		protected virtual void OnSelectedItemChanged(GameModeListViewItemBase p_lviSelected)
		{
			OnSelectedItemChanged(new SelectedItemEventArgs(p_lviSelected));
		}
 /// <summary>
 /// Raises the <see cref="SelectedItemChanged"/> event.
 /// </summary>
 /// <param name="p_lviSelected">The newly selected list view item.</param>
 protected virtual void OnSelectedItemChanged(GameModeListViewItemBase p_lviSelected)
 {
     OnSelectedItemChanged(new SelectedItemEventArgs(p_lviSelected));
 }
Exemple #5
0
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_lviSelectedItem">The selected item.</param>
 public SelectedItemEventArgs(GameModeListViewItemBase p_lviSelectedItem)
 {
     SelectedItem = p_lviSelectedItem;
 }
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_lviSelectedItem">The selected item.</param>
		public SelectedItemEventArgs(GameModeListViewItemBase p_lviSelectedItem)
		{
			SelectedItem = p_lviSelectedItem;
		}