/// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="ArgumentOutOfRangeException"></exception>
        private void OnFreeModTypeChanged(object sender, FreeModTypeChangedEventArgs e)
        {
            OnlineManager.CurrentGame.FreeModType = e.Type;

            switch (e.Type)
            {
            case MultiplayerFreeModType.None:
                if (RightAligned.Contains(SelectModifiers) && OnlineManager.CurrentGame.Host != OnlineManager.Self.OnlineUser)
                {
                    RightAligned.Remove(SelectModifiers);
                    SelectModifiers.Parent = null;
                }
                break;

            default:
                if (!RightAligned.Contains(SelectModifiers))
                {
                    RightAligned.Add(SelectModifiers);
                }
                break;
            }

            AlignRightItems(RightAligned);
        }
Пример #2
0
 private void OnFreeModTypeChanged(object sender, FreeModTypeChangedEventArgs e)
 {
     Value.Text = FreeModTypeToString(Type);
 }